mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 12:29:03 +00:00
Correctly pack TCP payload size for dns.lua
This commit is contained in:
@@ -145,8 +145,7 @@ local function sendPacketsTCP(data, host, port, timeout)
|
||||
local responses = {}
|
||||
socket:set_timeout(timeout)
|
||||
socket:connect(host, port)
|
||||
-- add payload size we are assuming a minimum size here of 256?
|
||||
local send_data = '\000' .. string.char(#data) .. data
|
||||
local send_data = string.pack(">s2", data)
|
||||
socket:send(send_data)
|
||||
local response = ''
|
||||
local got_response = false
|
||||
|
||||
Reference in New Issue
Block a user