Initial attempt at implementing apiv2 #853

This commit is contained in:
ethicalhack3r
2015-08-14 00:19:22 +02:00
parent cc737090a2
commit c4aed0ec89
15 changed files with 81 additions and 65 deletions

View File

@@ -2,22 +2,22 @@
class Vulnerability
module Output
# output the vulnerability
def output(verbose = false)
puts
puts critical("Title: #{title}")
references.each do |key, urls|
methodname = "url_#{key}"
urls.each do |u|
next unless respond_to?(methodname)
url = send(methodname, u)
puts " Reference: #{url}" if url
end
end
unless fixed_in.nil?
puts notice("Fixed in: #{fixed_in}")
end
puts notice("Fixed in: #{fixed_in}") if fixed_in
end
end
end