mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Fix more non-explicit endianness things
This commit is contained in:
@@ -48,12 +48,12 @@ local encode = function(username, password)
|
||||
if string.len(username) <= 31 then -- http://wiki.msgpack.org/display/MSGPACK/Format+specification#Formatspecification-fixraw
|
||||
username_prefix = bin.pack("C",0xa0 + string.len(username))
|
||||
else -- http://wiki.msgpack.org/display/MSGPACK/Format+specification#Formatspecification-raw16
|
||||
username_prefix = "\xda" .. bin.pack("s",string.len(username))
|
||||
username_prefix = "\xda" .. bin.pack(">s",string.len(username))
|
||||
end
|
||||
if string.len(password) <= 31 then
|
||||
password_prefix = bin.pack("C",0xa0 + string.len(password))
|
||||
else
|
||||
password_prefix = "\xda" .. bin.pack("s",string.len(password))
|
||||
password_prefix = "\xda" .. bin.pack(">s",string.len(password))
|
||||
end
|
||||
|
||||
return "\x93\xaa" .. method .. username_prefix .. username .. password_prefix .. password
|
||||
|
||||
Reference in New Issue
Block a user