1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 12:19:02 +00:00

fixed bug in authentication encryption function as reported by Sergey

http://seclists.org/nmap-dev/2010/q4/83

changed the way the library reports "Must change password at next logon"
fixed bug in ms-sql-hasdbaccess that would occur if no rows were returned
[Patrik]
This commit is contained in:
patrik
2010-10-15 19:47:54 +00:00
parent ce075558de
commit 1aed246b69
3 changed files with 4 additions and 4 deletions

View File

@@ -619,7 +619,7 @@ LoginPacket =
local c = bit.bxor( string.byte( password:sub( i, i ) ), xormask )
local m1= bit.band( bit.rshift( c, 4 ), 0x0F0F )
local m2= bit.band( bit.lshift( c, 4 ), 0xF0F0 )
result = result .. bin.pack("s", bit.bor( m1, m2 ) )
result = result .. bin.pack("S", bit.bor( m1, m2 ) )
end
return result
end,
@@ -831,7 +831,7 @@ Helper =
-- Let's check for user must change password, it appears as if this is
-- reported as ERROR 18488
if ( token.type == TokenType.ErrorMessage and token.errno == 18488 ) then
return true, "Must change password at next logon"
return false, "Must change password at next logon"
elseif ( token.type == TokenType.LoginAcknowledgement ) then
return true, "Login Success"
end