1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

o [NSE] Fixed issue in path encoding in the http-backup-finder script. [Patrik]

This commit is contained in:
patrik
2011-12-11 09:17:21 +00:00
parent 5183478e8c
commit 3e8440f5f6
2 changed files with 9 additions and 2 deletions

View File

@@ -105,9 +105,14 @@ action = function(host, port)
port = (parsed.scheme == 'https') and 443
port = port or ((parsed.scheme == 'http') and 80)
end
-- the url.escape doesn't work here as it encodes / to %2F
-- which results in 400 bad request, so we simple do a space
-- replacement instead.
local escaped_link = link:gsub(" ", "%%20")
-- attempt a HEAD-request against each of the backup files
local response = http.head(host, port, link)
local response = http.head(host, port, escaped_link)
if ( response.status == 200 ) then
if ( not(parsed.port) ) then
table.insert(backups,