diff --git a/scripts/ssl-heartbleed.nse b/scripts/ssl-heartbleed.nse index 9467f711c..afd89d21a 100644 --- a/scripts/ssl-heartbleed.nse +++ b/scripts/ssl-heartbleed.nse @@ -27,8 +27,11 @@ The code is based on the Python script ssltest.py authored by Jared Stafford (js local bin = require('bin') local match = require('match') +local nmap = require('nmap') local shortport = require('shortport') +local sslcert = require('sslcert') local stdnse = require('stdnse') +local string = require('string') local vulns = require('vulns') author = "Patrik Karlsson " @@ -46,6 +49,7 @@ local function recvmsg(s) return end local pos, typ, ver, ln = bin.unpack('>CSS', hdr) + local pay status, pay = s:receive_buf(match.numbytes(ln), true) if not status then stdnse.print_debug(3, 'Unexpected EOF receiving record payload - server closed connection') @@ -124,4 +128,4 @@ OpenSSL versions 1.0.1 and 1.0.2-beta releases (including 1.0.1f and 1.0.2-beta1 end end return report:make_output(vuln_table) -end \ No newline at end of file +end