1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

Fixed a bug where the scan would hit a nil-pointer exception when scanning broken implementations (reported by Steve Horejsi -- http://www.skullsecurity.org/blog/?p=209&cpage=2#comment-219). This was due to using incorrect variable names.

This commit is contained in:
ron
2009-04-02 14:09:52 +00:00
parent 28c491c744
commit 08fadd08fc

View File

@@ -1045,13 +1045,13 @@ function negotiate_protocol(smb)
end end
-- Some broken implementations of SMB don't send these variables -- Some broken implementations of SMB don't send these variables
if(smb['time'] == nil) then if(smb['time'] == nil) then
time = 0 smb['time'] = 0
end end
if(smb['timezone'] == nil) then if(smb['timezone'] == nil) then
timezone = 0 smb['timezone'] = 0
end end
if(smb['key_length'] == nil) then if(smb['key_length'] == nil) then
key_length = 0 smb['key_length'] = 0
end end
-- Convert the time and timezone to more useful values -- Convert the time and timezone to more useful values
@@ -1109,6 +1109,11 @@ function negotiate_protocol(smb)
end end
end end
-- Attempt to fix a bug where an empty server challenges causes an error
if(smb['server_challenge'] == "") then
smb['server_challenge'] = "AAAAAAAA"
end
return true return true
end end