This commit is contained in:
ethicalhack3r
2014-09-21 22:02:30 +02:00
parent 6800d51347
commit b19696090f
6 changed files with 40 additions and 38 deletions

View File

@@ -43,9 +43,11 @@ class Vulnerability
def self.load_from_json_item(json_item)
references = {}
[:url, :cve, :secunia, :osvdb, :metasploit, :exploitdb].each do |key|
#json_item['id'] = json_item['id'].to_s.split(',')
references[key] = json_item[key.to_s].to_s.split(',') if json_item[key.to_s]
%w(url cve secunia osvdb metasploit exploitdb).each do |key|
if json_item[key]
json_item[key] = [json_item[key]] if json_item[key].class != Array
references[key] = json_item[key]
end
end
new(