mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Fixes issue when parsing NTLM headers. Closes #922
This commit is contained in:
@@ -78,10 +78,10 @@ action = function(host, port)
|
||||
local recvtime = os.time()
|
||||
|
||||
-- Continue only if correct header (www-authenticate) and NTLM response are included
|
||||
if response.header["www-authenticate"] and string.match(response.header["www-authenticate"], "NTLM (.*)") then
|
||||
if response.header["www-authenticate"] and string.match(response.header["www-authenticate"], "NTLM ([a-zA-Z0-9///+=]*)") then
|
||||
|
||||
-- Extract NTLMSSP response and base64 decode
|
||||
local data = base64.dec(string.match(response.header["www-authenticate"], "NTLM (.*)"))
|
||||
local data = base64.dec(string.match(response.header["www-authenticate"], "NTLM ([a-zA-Z0-9///+=]*)"))
|
||||
|
||||
-- Leverage smbauth.get_host_info_from_security_blob() for decoding
|
||||
local ntlm_decoded = smbauth.get_host_info_from_security_blob(data)
|
||||
|
||||
Reference in New Issue
Block a user