More small tweaks to import/export of attempts

unstable
HD Moore 2012-07-10 00:18:06 -05:00
parent 25fee46020
commit 64e8956319
2 changed files with 3 additions and 3 deletions

View File

@ -1008,7 +1008,7 @@ class DBManager
info[k] = opts[k] if opts[k] info[k] = opts[k] if opts[k]
end end
return unless info[:attempted_at] and info.has_key?(:exploited) return unless info[:attempted_at]
vuln.vuln_attempts.create(info) vuln.vuln_attempts.create(info)
} }

View File

@ -529,12 +529,12 @@ class Export
# Vuln details sub-elements # Vuln details sub-elements
report_file.write(" <vuln_details>\n") report_file.write(" <vuln_details>\n")
e.vuln_details.find(:all).each do |d| e.vuln_details.find(:all).each do |d|
report_file.write(" <vuln_detail>\n") report_file.write(" <vuln_detail>\n")
d.attributes.each_pair do |k,v| d.attributes.each_pair do |k,v|
el = create_xml_element(k,v) el = create_xml_element(k,v)
report_file.write(" #{el}\n") report_file.write(" #{el}\n")
end end
report_file.write(" </vuln_detail>\n") report_file.write(" </vuln_detail>\n")
end end
report_file.write(" </vuln_details>\n") report_file.write(" </vuln_details>\n")