Land #15779, Add Nil-Check in Auxiliary report for vuln reporting

This commit is contained in:
Grant Willcox 2021-12-15 11:52:48 -06:00
commit 2e7e24a833
No known key found for this signature in database
GPG Key ID: D35E05C0F2B81E83
1 changed files with 2 additions and 0 deletions

View File

@ -292,6 +292,8 @@ module Auxiliary::Report
}.merge(opts) }.merge(opts)
vuln = framework.db.report_vuln(opts) vuln = framework.db.report_vuln(opts)
raise Msf::ValidationError, "Failed to report vuln for #{opts[:host]}:#{opts[:port]} to the database" if vuln.nil?
# add vuln attempt audit details here during report # add vuln attempt audit details here during report
timestamp = opts[:timestamp] timestamp = opts[:timestamp]