diff --git a/modules/auxiliary/gather/shodan_search.rb b/modules/auxiliary/gather/shodan_search.rb index f8a89fa433..b070ff50bc 100644 --- a/modules/auxiliary/gather/shodan_search.rb +++ b/modules/auxiliary/gather/shodan_search.rb @@ -151,7 +151,7 @@ class Metasploit4 < Msf::Auxiliary page = 1 my_filter = datastore['FILTER'] for i in page..tpages - next if results[i].nil? + next if results[i].nil? or results[i]['matches'].nil? results[i]['matches'].each { |host| city = host['city'] || 'N/A'