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:
@@ -1045,13 +1045,13 @@ function negotiate_protocol(smb)
|
||||
end
|
||||
-- Some broken implementations of SMB don't send these variables
|
||||
if(smb['time'] == nil) then
|
||||
time = 0
|
||||
smb['time'] = 0
|
||||
end
|
||||
if(smb['timezone'] == nil) then
|
||||
timezone = 0
|
||||
smb['timezone'] = 0
|
||||
end
|
||||
if(smb['key_length'] == nil) then
|
||||
key_length = 0
|
||||
smb['key_length'] = 0
|
||||
end
|
||||
|
||||
-- Convert the time and timezone to more useful values
|
||||
@@ -1109,6 +1109,11 @@ function negotiate_protocol(smb)
|
||||
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
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user