mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Service fingerprint lengths are in hex, not decimal
This commit is contained in:
@@ -59,7 +59,7 @@ local unescape = lpeg.P {
|
|||||||
|
|
||||||
-- Turn the service fingerprint reply to a probe into a binary blob
|
-- Turn the service fingerprint reply to a probe into a binary blob
|
||||||
local function get_response (fp, probe)
|
local function get_response (fp, probe)
|
||||||
local i, e = string.find(fp, string.format("%s,%%d+,", probe))
|
local i, e = string.find(fp, string.format("%s,%%x+,", probe))
|
||||||
if i == nil then return nil end
|
if i == nil then return nil end
|
||||||
return unescape:match(getquote:match(fp, e+1))
|
return unescape:match(getquote:match(fp, e+1))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ local unescape = lpeg.P {
|
|||||||
|
|
||||||
-- Turn the service fingerprint reply to a probe into a binary blob
|
-- Turn the service fingerprint reply to a probe into a binary blob
|
||||||
local function get_response (fp, probe)
|
local function get_response (fp, probe)
|
||||||
local i, e = string.find(fp, string.format("%s,%%d+,", probe))
|
local i, e = string.find(fp, string.format("%s,%%x+,", probe))
|
||||||
if i == nil then return nil end
|
if i == nil then return nil end
|
||||||
return unescape:match(getquote:match(fp, e+1))
|
return unescape:match(getquote:match(fp, e+1))
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user