From 5631774d92bf45c00b6658ef8e35b75665209ed4 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Fri, 20 Jan 2012 10:58:02 -0600 Subject: [PATCH] Fix bug: NoMethodError undefined method `each' for nil:NilClass (line 155) --- modules/auxiliary/gather/shodan_search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'