From 1ee730515423860d6010489a0f63b85b73667398 Mon Sep 17 00:00:00 2001 From: tomsellers Date: Sun, 2 Oct 2011 22:44:21 +0000 Subject: [PATCH] Small patch to jdwp-version.nse to address a corner case false positive. --- scripts/jdwp-version.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/jdwp-version.nse b/scripts/jdwp-version.nse index f57e1be90..282a39901 100644 --- a/scripts/jdwp-version.nse +++ b/scripts/jdwp-version.nse @@ -37,7 +37,7 @@ action = function(host, port) end -- match jdwp m|JDWP-Handshake| p/$1/ v/$3/ i/$2\n$4/ local match = {string.match(result, "^JDWP%-Handshake%z%z..%z%z%z\1\128%z%z%z%z..([^%z\n]*)\n([^%z]*)%z%z..%z%z..%z%z..([0-9._]+)%z%z..([^%z]*)")} - if match == nil then + if match == nil or #match == 0 then -- if we have one \128 (reply marker), it is at least not echo because the request did not contain \128 if (string.match(result,"^JDWP%-Handshake%z.*\128") ~= nil) then port.version.name="jdwp"