diff --git a/nselib/brute.lua b/nselib/brute.lua index 76829a5e6..b001e6f5a 100644 --- a/nselib/brute.lua +++ b/nselib/brute.lua @@ -525,9 +525,14 @@ Engine = -- Prevent locked accounts from appearing several times if ( not(self.found_accounts) or self.found_accounts[response.username] == nil ) then if ( response.username and #response.username > 0 ) then - stdnse.print_debug("Found valid password %s:%s on target %s", response.username, response.password, self.host.ip ) + stdnse.print_debug("Found valid password %s:%s on target %s", + response.username, + ( response.password and #response.password > 0 ) and response.password or "", + self.host.ip ) else - stdnse.print_debug("Found valid password %s on target %s", response.password, self.host.ip ) + stdnse.print_debug("Found valid password %s on target %s", + ( response.password and #response.password > 0 ) and response.password or "", + self.host.ip ) end table.insert( valid_accounts, response:toString() ) self.found_accounts[response.username] = true