From 72b7fcc299b621f38e883825d60b3544fc80a5ae Mon Sep 17 00:00:00 2001 From: patrik Date: Sat, 12 Mar 2011 23:50:57 +0000 Subject: [PATCH] Fixed bug so that empty passwords are printed as in script results. Bug reported by Toni Ruottu http://seclists.org/nmap-dev/2011/q1/789 --- nselib/brute.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/brute.lua b/nselib/brute.lua index 150ebd542..f97669655 100644 --- a/nselib/brute.lua +++ b/nselib/brute.lua @@ -262,7 +262,7 @@ Account = if ( #self.username > 0 ) then creds = ("%s:%s"):format( self.username, #self.password > 0 and self.password or "" ) else - creds = ("%s"):format( self.password ) + creds = ("%s"):format( ( self.password and #self.password > 0 ) and self.password or "" ) end -- An account have the following states