mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 08:29:04 +00:00
Change heartbeat request size from 0x0fe9 to 0x4000
This commit is contained in:
@@ -146,7 +146,7 @@ local function testversion(host, port, version)
|
||||
local payload = "Nmap ssl-heartbleed"
|
||||
local hb = tls.record_write("heartbeat", version, bin.pack("C>SA",
|
||||
1, -- HeartbeatMessageType heartbeat_request
|
||||
0x0fe9, -- payload length (falsified)
|
||||
0x4000, -- payload length (falsified)
|
||||
-- payload length is based on 4096 - 16 bytes padding - 8 bytes packet
|
||||
-- header + 1 to overflow
|
||||
payload -- less than payload length.
|
||||
@@ -245,7 +245,7 @@ local function testversion(host, port, version)
|
||||
end
|
||||
if typ == 24 then
|
||||
local pay
|
||||
status, pay = recvmsg(s, len)
|
||||
status, pay = recvmsg(s, 0x0fe9)
|
||||
s:close()
|
||||
if #pay > 3 then
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user