Importing Nexpose reports should retain test keys (which are usually some kind of proof or expanded details about a vulnerability).

git-svn-id: file:///home/svn/framework3/trunk@12442 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2011-04-26 17:31:26 +00:00
parent 8cf4733535
commit 2031c0d288
2 changed files with 20 additions and 0 deletions

View File

@ -3243,6 +3243,22 @@ class DBManager
report_import_note(wspace, hobj)
end
if h["notes"]
note = {
:workspace => wspace,
:host => (hobj || addr),
:type => "host.vuln.nexpose_keys",
:data => {},
:mode => :unique_data
}
h["notes"].each do |v,k|
note[:data][v] ||= []
next if note[:data][v].include? k
note[:data][v] << k
end
report_note(note)
end
if h["os_family"]
note = {
:workspace => wspace,

View File

@ -51,6 +51,10 @@ class NexposeXMLStreamParser
when "test"
if attributes["status"] == "vulnerable-exploited" or attributes["status"] == "vulnerable-version"
@host["vulns"][attributes["id"]] = attributes.dup
if attributes["key"]
@host["notes"] ||= []
@host["notes"] << [attributes["id"], attributes["key"]]
end
end
when "vulnerability"
@vuln.merge! attributes