Module: Vulnerability::Output

Included in:
Vulnerability
Defined in:
lib/common/models/vulnerability/output.rb

Instance Method Summary collapse

Instance Method Details

#output(verbose = false) ⇒ Object

output the vulnerability


7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/common/models/vulnerability/output.rb', line 7

def output(verbose = false)
  puts
  puts "#{critical('[!]')} Title: #{title}"
  references.each do |key, urls|
    methodname = "url_#{key}"
    urls.each do |u|
      url = send(methodname, u)
      puts "    Reference: #{url}" if url
    end
  end
  if !fixed_in.nil?
     puts "#{notice('[i]')} Fixed in: #{fixed_in}"
  end
end