1
0
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:
dmiller
2015-09-20 12:11:32 +00:00
parent f411d2ee28
commit 10fdd80035

View File

@@ -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