mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Fixed a regexp escape sequence and shortened code.
This commit is contained in:
@@ -461,8 +461,7 @@ request = function( host, port, data, options )
|
|||||||
local last_header, match, key
|
local last_header, match, key
|
||||||
for number, line in ipairs( header or {} ) do
|
for number, line in ipairs( header or {} ) do
|
||||||
if number == 1 then
|
if number == 1 then
|
||||||
local code
|
local code = line:match "HTTP/%d%.%d (%d+)";
|
||||||
_, _, code = string.find( line, "HTTP/%d\.%d (%d+)")
|
|
||||||
result.status = tonumber(code)
|
result.status = tonumber(code)
|
||||||
if code then result["status-line"] = line end
|
if code then result["status-line"] = line end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user