1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-16 04:39:03 +00:00

Rectify error "bad argument #2 to 'format'" in SMB scripts

Fixes #1713, closes #1714, closes #1480
This commit is contained in:
nnposter
2019-09-06 04:13:07 +00:00
parent 991a2fa888
commit ce28753b89
2 changed files with 5 additions and 1 deletions

View File

@@ -1206,7 +1206,8 @@ local function start_session_basic(smb, log_errors, overrides)
return false, "SMB: ERROR: Server returned less data than it was supposed to (one or more fields are missing); aborting [17]"
end
-- Check if we were allowed in
local protocol_version, command, status, flags, flags2, pid_high, signature, unused, tid, pid, uid, mid, pos = string.unpack(header_format, header)
local protocol_version, command, flags, flags2, pid_high, signature, unused, tid, pid, uid, mid, pos
protocol_version, command, status, flags, flags2, pid_high, signature, unused, tid, pid, uid, mid, pos = string.unpack(header_format, header)
-- Check if we're successful
if(status == 0) then