From 9857aa6ac217d1a54b2aeee1d936746f6fae3086 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 18 Dec 2014 03:29:20 +0000 Subject: [PATCH] Service fingerprint lengths are in hex, not decimal --- scripts/http-server-header.nse | 2 +- scripts/snmp-info.nse | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/http-server-header.nse b/scripts/http-server-header.nse index ef2fecb4c..1f70c2dc3 100644 --- a/scripts/http-server-header.nse +++ b/scripts/http-server-header.nse @@ -59,7 +59,7 @@ local unescape = lpeg.P { -- Turn the service fingerprint reply to a probe into a binary blob local function get_response (fp, probe) - local i, e = string.find(fp, string.format("%s,%%d+,", probe)) + local i, e = string.find(fp, string.format("%s,%%x+,", probe)) if i == nil then return nil end return unescape:match(getquote:match(fp, e+1)) end diff --git a/scripts/snmp-info.nse b/scripts/snmp-info.nse index 57094f04c..294a28067 100644 --- a/scripts/snmp-info.nse +++ b/scripts/snmp-info.nse @@ -63,7 +63,7 @@ local unescape = lpeg.P { -- Turn the service fingerprint reply to a probe into a binary blob local function get_response (fp, probe) - local i, e = string.find(fp, string.format("%s,%%d+,", probe)) + local i, e = string.find(fp, string.format("%s,%%x+,", probe)) if i == nil then return nil end return unescape:match(getquote:match(fp, e+1)) end