diff --git a/CHANGELOG b/CHANGELOG index 4e2da45e5..272517271 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,8 @@ o [NSE][GH#3447] IP options parsing by the packet library no longer crashes on incomplete options. IP header data after EOOL are no longer parsed as options. [nnposter] +o [NSE][GH#3456] Script http-config-backup was always failing. [h00die] + o [NSE][GH#3440] The rsync library was not correctly parsing server responses for protocol version 32. [h00die] diff --git a/scripts/http-config-backup.nse b/scripts/http-config-backup.nse index ea9d36d23..034937eb6 100644 --- a/scripts/http-config-backup.nse +++ b/scripts/http-config-backup.nse @@ -4,6 +4,7 @@ local io = require "io" local shortport = require "shortport" local stdnse = require "stdnse" local string = require "string" +local stringaux = require "stringaux" local table = require "table" local url = require "url" @@ -214,10 +215,10 @@ action = function (host, port) if response.status == 200 and http.page_exists(response, result_404, known_404, url_path) then -- check it if is valid before inserting if cfg.check(response.body) then - local filename = stdnse.escape_filename((host.targetname or host.ip) .. url_path) -- save the content if save then + local filename = stringaux.filename_escape((host.targetname or host.ip) .. url_path) local status, err = write_file(save .. filename, response.body); if status then stdnse.debug1("%s saved", filename);