Show errors when no results are found

bug/bundler_fix
HD Moore 2015-09-10 14:05:40 -07:00
parent ec3aecbc9d
commit cddf72cd57
1 changed files with 6 additions and 1 deletions

View File

@ -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