mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Correctly pack TCP payload size for dns.lua
This commit is contained in:
parent
cffc94e845
commit
d21a4ee4ce
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue