From da0c861299ae1ce6268e9591838f7a1144b327d7 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 11 Jan 2018 17:24:44 +0000 Subject: [PATCH] Fix previous patch: ':' is not allowed in file names on Windows. Fixes #1102 --- scripts/http-fetch.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/http-fetch.nse b/scripts/http-fetch.nse index 7ac99cadb..59df87e2f 100644 --- a/scripts/http-fetch.nse +++ b/scripts/http-fetch.nse @@ -183,7 +183,7 @@ local function fetch(host, port, url, destination, path, output) local response = http.get(host, port, build_path(path, url), nil) if response and response.status and response.status == 200 then local file = path:sub(path:find("/[^/]*$") + 1) - local save_as = (host.targetname or host.ip) .. ":" .. tostring(port.number) .. "-" .. file + local save_as = (host.targetname or host.ip) .. SEPARATOR .. tostring(port.number) .. "-" .. file local status, err_message = save_file(response.body, save_as, destination) if status then output['Successfully Downloaded'] = output['Successfully Downloaded'] or {}