Show errors when no results are found
parent
ec3aecbc9d
commit
cddf72cd57
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue