Skip to content

Commit f5161ea

Browse files
Code Review
1 parent 4ccab45 commit f5161ea

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/msf/core/db_manager/exploit_attempt.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,9 @@ def report_exploit_failure(opts)
7979

8080
vuln = nil
8181
if rids.present?
82-
if svc
83-
# Try to find an existing vulnerability with the same service & references
84-
vuln = find_vuln_by_refs(rids, host, svc, false)
85-
else
86-
# Try to find an existing vulnerability with the same host & references
87-
vuln = find_vuln_by_refs(rids, host, nil, false)
88-
end
82+
# Try to find an existing vulnerability with the same service & references
83+
# or, if svc is nil, with the same host & references
84+
vuln = find_vuln_by_refs(rids, host, svc, false)
8985
end
9086

9187
opts[:service] = svc

0 commit comments

Comments
 (0)