Module: Vulnerability::Output
- Included in:
- Vulnerability
- Defined in:
- lib/common/models/vulnerability/output.rb
Class Method Summary (collapse)
-
+ (String) metasploit_module_url(module_path)
The url to the metasploit module page.
Instance Method Summary (collapse)
-
- (Object) output
output the vulnerability.
Class Method Details
+ (String) metasploit_module_url(module_path)
The url to the metasploit module page
19 20 21 22 23 |
# File 'lib/common/models/vulnerability/output.rb', line 19 def self.(module_path) # remove leading slash module_path = module_path.sub(/^\//, '') "http://www.metasploit.com/modules/#{module_path}" end |
Instance Method Details
- (Object) output
output the vulnerability
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/common/models/vulnerability/output.rb', line 7 def output puts ' |' puts ' | ' + red("* Title: #{title}") references.each do |r| puts ' | ' + red("* Reference: #{r}") end .each do |m| puts ' | ' + red("* Metasploit module: #{Output.(m)}") end end |