From 3c3d3bc55a12436d759a89de0881071169b0bfc9 Mon Sep 17 00:00:00 2001 From: jah Date: Mon, 6 Apr 2015 16:26:48 +0000 Subject: [PATCH] Fix thread.info in Script:new_thread and new_worker in nse_main - the pattern to capture the script thread ID did not match on Windows. See http://seclists.org/nmap-dev/2015/q1/205 . --- nse_main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nse_main.lua b/nse_main.lua index 4ecaed8f5..1957f7f86 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -467,7 +467,7 @@ do co = co, env = env, identifier = tostring(co), - info = format("%s M:%s", self.id, match(tostring(co), "0x(.*)")); + info = format("%s M:%s", self.id, match(tostring(co), "^thread: 0?[xX]?(.*)")); parent = nil, -- placeholder script = self, type = script_type, @@ -485,7 +485,7 @@ do args = pack(...), close_handlers = {}, co = co, - info = format("%s W:%s", self.id, match(tostring(co), "0x(.*)")); + info = format("%s W:%s", self.id, match(tostring(co), "^thread: 0?[xX]?(.*)")); parent = self, worker = true, };