dEEpEst
☣☣ In The Depths ☣☣
Staff member
Administrator
Super Moderator
Hacker
Specter
Crawler
Shadow
- Joined
- Mar 29, 2018
- Messages
- 13,860
- Solutions
- 4
- Reputation
- 27
- Reaction score
- 45,546
- Points
- 1,813
- Credits
- 55,340
7 Years of Service
56%
[HIDE-THANKS][LANGUAGE=ruby]#!/usr/bin/env ruby
# gem install typhoeus
# gem install nokogiri
require 'typhoeus'
require 'nokogiri'
nist_url = 'https://web.nvd.nist.gov/view/vuln/detail?vulnId='
cve_hash = {}
cve_output = ''
cves = File.open('cves.txt').read
cves.gsub!(/\r\n?/, "\n") # normalize EOL chars
cves.split("\n").each do |cve|
puts "Getting CVSS for #{cve}..."
doc = Nokogiri::HTML(Typhoeus.get("#{nist_url}#{cve}").b ody)
cvss_links = doc.css('#BodyPlaceHolder_cplPageContent_plcZones_ lt_zoneCenter_VulnerabilityDetail_VulnFormView_Vul nCvssPanel .row a')
cve_hash[cve] = cvss_links[0].text
end
puts
puts
cve_hash = Hash[cve_hash.sort_by{|k, v| v}.reverse]
cve_hash.each_pair do |cve, score|
cve_output
end
puts cve_output[/LANGUAGE][/HIDE-THANKS]
# gem install typhoeus
# gem install nokogiri
require 'typhoeus'
require 'nokogiri'
nist_url = 'https://web.nvd.nist.gov/view/vuln/detail?vulnId='
cve_hash = {}
cve_output = ''
cves = File.open('cves.txt').read
cves.gsub!(/\r\n?/, "\n") # normalize EOL chars
cves.split("\n").each do |cve|
puts "Getting CVSS for #{cve}..."
doc = Nokogiri::HTML(Typhoeus.get("#{nist_url}#{cve}").b ody)
cvss_links = doc.css('#BodyPlaceHolder_cplPageContent_plcZones_ lt_zoneCenter_VulnerabilityDetail_VulnFormView_Vul nCvssPanel .row a')
cve_hash[cve] = cvss_links[0].text
end
puts
puts
cve_hash = Hash[cve_hash.sort_by{|k, v| v}.reverse]
cve_hash.each_pair do |cve, score|
cve_output
end
puts cve_output[/LANGUAGE][/HIDE-THANKS]