mirror of
https://github.com/nmap/nmap.git
synced 2025-12-16 12:49:02 +00:00
avoid string reallocation in innermost loop of http-slowloris
This commit is contained in:
@@ -146,9 +146,9 @@ local function do_half_http(host, port, obj)
|
|||||||
end
|
end
|
||||||
stdnse.sleep(SendInterval)
|
stdnse.sleep(SendInterval)
|
||||||
try(slowloris:send("X-a: b\r\n"))
|
try(slowloris:send("X-a: b\r\n"))
|
||||||
ServerNotice = " (attack against " .. host.ip .. "): Feeding HTTP stream..."
|
|
||||||
Queries = Queries + 1
|
Queries = Queries + 1
|
||||||
ServerNotice = ServerNotice .. "\n(attack against " .. host.ip .. "): " .. Queries .. " queries sent using " .. ThreadCount .. " connections."
|
ServerNotice = ("(attack against %s): Feeding HTTP stream...\n(attack against %s): %d queries sent using %d connections."):format(
|
||||||
|
host.ip, host.ip, Queries, ThreadCount)
|
||||||
end
|
end
|
||||||
slowloris:close()
|
slowloris:close()
|
||||||
ThreadCount = ThreadCount - 1
|
ThreadCount = ThreadCount - 1
|
||||||
|
|||||||
Reference in New Issue
Block a user