From 3dbe66e9be3cf0c5989412e78f67da5d610e07a5 Mon Sep 17 00:00:00 2001 From: patrik Date: Sat, 12 Apr 2014 21:31:08 +0000 Subject: [PATCH] Change heartbeat request size from 0x0fe9 to 0x4000 --- scripts/ssl-heartbleed.nse | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ssl-heartbleed.nse b/scripts/ssl-heartbleed.nse index 8d8dcbda1..49700afe9 100644 --- a/scripts/ssl-heartbleed.nse +++ b/scripts/ssl-heartbleed.nse @@ -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