diff --git a/CHANGELOG b/CHANGELOG index bad75a58b..d485a4fab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,9 @@ o [NSE][GH#1720] Functions lsa_lookupnames2 and lsa_lookupsids2 in library msrpc were incorrectly referencing function strjoin when called with debug level 2 or higher. [Ivan Ivanov] +o [NSE][GH#1480][GH#1713][GH#1714] A bug in SMB library was causing scripts to + fail with bad format argument error. [Ivan Ivanov] + o [NSE] New script, dicom-brute.nse, attempts to brute force the called Application Entity Title of DICOM servers. [Paulino Calderon] diff --git a/nselib/smb.lua b/nselib/smb.lua index 0cb440f99..588794a03 100644 --- a/nselib/smb.lua +++ b/nselib/smb.lua @@ -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