From 8661c8a519a0b11332eb953a2d6f9509473f2cf6 Mon Sep 17 00:00:00 2001 From: fyodor Date: Thu, 27 Mar 2014 05:49:14 +0000 Subject: [PATCH] Improved ntp-info script to handle underscores in returned data. [nnposter] --- CHANGELOG | 3 +++ scripts/ntp-info.nse | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 61b668c0b..93882c1ce 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o [NSE] Improved ntp-info script to handle underscores in returned + data. [nnposter] + o [NSE] Add quake1-info script for retrieving server and player information from Quake 1 game servers. Reports potential DoS amplification factor. [Ulrik Haugen] diff --git a/scripts/ntp-info.nse b/scripts/ntp-info.nse index 595c05612..8ae1d13f9 100644 --- a/scripts/ntp-info.nse +++ b/scripts/ntp-info.nse @@ -116,7 +116,7 @@ action = function(host, port) -- This parsing is not quite right with respect to quoted strings. -- Backslash escapes should be interpreted inside strings and commas should -- be allowed inside them. - for k, q, v in string.gmatch(data, "%s*(%w+)=(\"?)([^,\"\r\n]*)%2,?") do + for k, q, v in string.gmatch(data, "%s*([%w_]+)=(\"?)([^,\"\r\n]*)%2,?") do output[k] = v end end