diff --git a/modules/auxiliary/gather/shodan_search.rb b/modules/auxiliary/gather/shodan_search.rb index f508510cbd..0c192067d9 100644 --- a/modules/auxiliary/gather/shodan_search.rb +++ b/modules/auxiliary/gather/shodan_search.rb @@ -112,7 +112,12 @@ class Metasploit4 < Msf::Auxiliary results[page] = shodan_query(query, apikey, page) if results[page]['total'].nil? || results[page]['total'] == 0 - print_error('No Results Found!') + msg = "No results." + if results[page]['error'].to_s.length > 0 + msg << " Error: #{results[page]['error']}" + end + print_error(msg) + return end # Determine page count based on total results