mirror of
https://github.com/nmap/nmap.git
synced 2026-06-09 17:22:26 +00:00
Use host.ip, not just (undefined) ip in whois.nse exception error
messages. Instead of handling an error nicely, it caused a format string error of its own: ./nselib/stdnse.lua:61: bad argument #3 to 'format' (string expected, got nil) It seems that a deadlock happens immediately after one of these errors occurs. This change doesn't fix the deadlock but allows the underlying error message to be printed.
This commit is contained in:
parent
318688acd5
commit
22a77a865c
1 changed files with 3 additions and 3 deletions
|
|
@ -191,7 +191,7 @@ action = function( host )
|
|||
|
||||
status, retval = pcall( get_next_action, tracking, host.ip )
|
||||
if not status then
|
||||
stdnse.print_debug( "%s %s pcall caught an exception in get_next_action: %s.", filename, ip, retval )
|
||||
stdnse.print_debug( "%s %s pcall caught an exception in get_next_action: %s.", filename, host.ip, retval )
|
||||
else tracking = retval end
|
||||
|
||||
if tracking.this_db then
|
||||
|
|
@ -202,13 +202,13 @@ action = function( host )
|
|||
-- analyse data
|
||||
status, retval = pcall( analyse_response, tracking, host.ip, response, data )
|
||||
if not status then
|
||||
stdnse.print_debug( "%s %s pcall caught an exception in analyse_response: %s.", filename, ip, retval )
|
||||
stdnse.print_debug( "%s %s pcall caught an exception in analyse_response: %s.", filename, host.ip, retval )
|
||||
else data = retval end
|
||||
|
||||
-- get next action
|
||||
status, retval = pcall( get_next_action, tracking, host.ip )
|
||||
if not status then
|
||||
stdnse.print_debug( "%s %s pcall caught an exception in get_next_action: %s.", filename, ip, retval )
|
||||
stdnse.print_debug( "%s %s pcall caught an exception in get_next_action: %s.", filename, host.ip, retval )
|
||||
if not tracking.last_db then tracking.last_db, tracking.this_db = tracking.this_db or tracking.next_db, nil end
|
||||
else tracking = retval end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue