Module: Vulnerability::Urls

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

Instance Method Summary collapse

Instance Method Details

#url_cve(cve) ⇒ Object


16
17
18
# File 'lib/common/models/vulnerability/urls.rb', line 16

def url_cve(cve)
  "http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-#{cve}"
end

#url_exploitdb(id) ⇒ Object


28
29
30
# File 'lib/common/models/vulnerability/urls.rb', line 28

def url_exploitdb(id)
  "http://www.exploit-db.com/exploits/#{id}/"
end

#url_id(id) ⇒ Object


32
33
34
# File 'lib/common/models/vulnerability/urls.rb', line 32

def url_id(id)
  "https://wpvulndb.com/vulnerabilities/#{id}"
end

#url_metasploit(module_path) ⇒ String

Returns The url to the metasploit module page

Returns:

  • (String)

    The url to the metasploit module page


6
7
8
9
10
# File 'lib/common/models/vulnerability/urls.rb', line 6

def url_metasploit(module_path)
  # remove leading slash
  module_path = module_path.sub(/^\//, '')
  "http://www.rapid7.com/db/modules/#{module_path}"
end

#url_osvdb(id) ⇒ Object


20
21
22
# File 'lib/common/models/vulnerability/urls.rb', line 20

def url_osvdb(id)
  "http://osvdb.org/#{id}"
end

#url_secunia(id) ⇒ Object


24
25
26
# File 'lib/common/models/vulnerability/urls.rb', line 24

def url_secunia(id)
  "https://secunia.com/advisories/#{id}"
end

#url_url(url) ⇒ Object


12
13
14
# File 'lib/common/models/vulnerability/urls.rb', line 12

def url_url(url)
  url
end