adjust vuln logic as `nil` service should be valid

This commit is contained in:
Jeffrey Martin 2020-07-09 15:13:33 -05:00
parent 1e348e0a90
commit 1fdcde9d03
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
2 changed files with 4 additions and 6 deletions

View File

@ -454,4 +454,4 @@ DEPENDENCIES
yard
BUNDLED WITH
1.17.2
1.17.3

View File

@ -179,11 +179,9 @@ module Msf::DBManager::Vuln
# Try to match based on vuln_details records
if not vuln and opts[:details_match]
if service
vuln = find_vuln_by_details(opts[:details_match], host, service)
if vuln and not vuln.service
vuln.service = service
end
vuln = find_vuln_by_details(opts[:details_match], host, service)
if vuln && service && vuln.service.nil?
vuln.service = service
end
end