1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 05:39:01 +00:00

Change more bin lib to string packing/fromhex. Closes #755. Closes #769

This commit is contained in:
dmiller
2017-03-25 13:39:44 +00:00
parent d66dd69df2
commit 0e7f11673c
24 changed files with 50 additions and 50 deletions

View File

@@ -67,7 +67,7 @@ Driver =
--If we find the challenge value we continue the connection process
if ret then
stdnse.debug1("Challenge value found:%s", ret)
local md5str = bin.pack("xAA", password, bin.pack("H", ret)) --appends pwd and challenge
local md5str = bin.pack("xAA", password, stdnse.fromhex( ret)) --appends pwd and challenge
local chksum = stdnse.tohex(openssl.md5(md5str))
local user_l = username:len()+6 --we add six because of the string "=name="
local login_pkt = bin.pack("cAcAcAx", 0x6, "/login", user_l, "=name="..username, 0x2c, "=response=00"..chksum)