beginnings of the advisory hash
This commit is contained in:
parent
9925e0d28b
commit
05c5c87808
1 changed files with 21 additions and 3 deletions
|
@ -5,13 +5,13 @@ class AdobeScraper
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@index_url = 'https://helpx.adobe.com/security/security-bulletin.html'
|
@index_url = 'https://helpx.adobe.com/security/security-bulletin.html'
|
||||||
@doc = read_html(get_html)
|
@doc = read_html(get_html(index_url))
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_html
|
def get_html(url)
|
||||||
r = RestClient::Request.execute(
|
r = RestClient::Request.execute(
|
||||||
:method => :get,
|
:method => :get,
|
||||||
:url => index_url
|
:url => url
|
||||||
)
|
)
|
||||||
if r.code == 200
|
if r.code == 200
|
||||||
r.body
|
r.body
|
||||||
|
@ -34,6 +34,7 @@ class AdobeScraper
|
||||||
# adobe product security bulletin
|
# adobe product security bulletin
|
||||||
if url.include? 'apsb'
|
if url.include? 'apsb'
|
||||||
result = url.scan(APSB_ID_MATCHER).first.upcase
|
result = url.scan(APSB_ID_MATCHER).first.upcase
|
||||||
|
# adobe product security advisory
|
||||||
elsif url.include? 'apsa'
|
elsif url.include? 'apsa'
|
||||||
result = url.scan(APSA_ID_MATCHER).first.upcase
|
result = url.scan(APSA_ID_MATCHER).first.upcase
|
||||||
else
|
else
|
||||||
|
@ -58,4 +59,21 @@ class AdobeScraper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_advisory(url)
|
||||||
|
html = get_html(url)
|
||||||
|
doc = read_html(html)
|
||||||
|
end
|
||||||
|
|
||||||
|
def advisory_hash
|
||||||
|
{
|
||||||
|
:bulletin_id => nil,
|
||||||
|
:date_published => nil,
|
||||||
|
:priority => nil,
|
||||||
|
:summary => nil,
|
||||||
|
:affected_versions => {:product => nil, :version => nil, :platform => nil},
|
||||||
|
:solution => {:product => nil, :updated_version => nil, :platform => nil, :priority_rating => nil, :installation_instructions => nil },
|
||||||
|
:vulnerability_details => {:vulnerability_category => nil, :vulnerability_impact => nil, :severity => nil, :authentication_required_to_exploit? => nil, :exploit_requires_admin_privileges? => nil, :cvss_base_score => nil, :cvss_vector => nil, :cve_number => nil}
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
Loading…
Add table
Reference in a new issue