Fix bug in output

This commit is contained in:
ethicalhack3r
2014-09-21 21:05:49 +02:00
parent 604299a1ac
commit d7488bd402
6 changed files with 40 additions and 37 deletions

View File

@@ -43,8 +43,11 @@ class Vulnerability
def self.load_from_json_item(json_item)
references = {}
[:id, :url, :cve, :secunia, :osvdb, :metasploit, :exploitdb].each do |key|
references[key] = json_item[key.to_s].to_s.split(',') if json_item[key.to_s]
%w(id 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(