Skip to content

Commit cec20ec

Browse files
author
HD Moore
committed
Handle a rare corner case
1 parent 135958a commit cec20ec

File tree

1 file changed

+3
-0
lines changed
  • lib/metasploit/framework/login_scanner

1 file changed

+3
-0
lines changed

lib/metasploit/framework/login_scanner/snmp.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ def scan!
153153
# Associate the community with the original credential
154154
result_options[:credential] = credential_map[result_options.delete(:community)]
155155

156+
# In the rare chance that we got a result for a community we didn't scan...
157+
next unless result_options[:credential]
158+
156159
# Create, freeze, and yield the result
157160
result = ::Metasploit::Framework::LoginScanner::Result.new(result_options)
158161
result.freeze

0 commit comments

Comments
 (0)