mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Use keeppattern=true when using match.numbytes. Fixes #1855
This commit is contained in:
parent
ff61845ce2
commit
a5a945347b
2 changed files with 3 additions and 3 deletions
|
|
@ -78,7 +78,7 @@ Response = {
|
|||
|
||||
local len = tonumber(data:match("^%$(%d*)"))
|
||||
-- we should only have a single line, so we can just peel of the length
|
||||
status, data = self.socket:receive_buf(match.numbytes(len), false)
|
||||
status, data = self.socket:receive_buf(match.numbytes(len), true)
|
||||
if( not(status) ) then
|
||||
return false, "Failed to receive data from server"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -152,13 +152,13 @@ Helper = {
|
|||
return false, data
|
||||
end
|
||||
|
||||
status, data = self.socket:receive_buf(match.numbytes(4), false)
|
||||
status, data = self.socket:receive_buf(match.numbytes(4), true)
|
||||
if ( not(status) ) then
|
||||
return false, data
|
||||
end
|
||||
|
||||
local len = string.unpack("<I2", data)
|
||||
status, data = self.socket:receive_buf(match.numbytes(len), false)
|
||||
status, data = self.socket:receive_buf(match.numbytes(len), true)
|
||||
if ( not(status) ) then
|
||||
return false, data
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue