Commit 716daaef authored by PidgeyL's avatar PidgeyL
Browse files

change search format to list of CVEs instead of list of dictionaries with cve as ID

parent f490b99c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -138,11 +138,12 @@ class PluginManager():
      # Validate format
      if type(data) == list and all([(type(x) == dict and 'n' in x and 'd' in x) for x in data]):
        results.extend(data)
    # Sort through data
    for collection in results:
      for item in collection['d']:
        # Check if already in result data
        if not any(item['id']==entry['id'] for entry in result['data']):
          entry=db.getCVE(item['id'])
        if not any(item==entry['id'] for entry in result['data']):
          entry=db.getCVE(item)
          entry['reason']=collection['n']
          result['data'].append(entry)
    return result