create a quick class for normalizing nvd urls given cve ids
This commit is contained in:
parent
3e845a22e1
commit
e668654f47
1 changed files with 14 additions and 0 deletions
14
classes/nvd_url_generator.rb
Normal file
14
classes/nvd_url_generator.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env ruby
|
||||
# take a list of cve and spit out nvd urls for them
|
||||
|
||||
class NvdCveUrlGen
|
||||
def initialize(cve_ids)
|
||||
@cve_ids = cve_ids
|
||||
end
|
||||
|
||||
def generate_url
|
||||
@cve_ids.map do |cve|
|
||||
"https://nvd.nist.gov/vuln/detail/#{cve}"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue