mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19:02 +00:00
o [NSE] Fixed issue in path encoding in the http-backup-finder script. [Patrik]
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
# Nmap Changelog ($Id$); -*-text-*-
|
# Nmap Changelog ($Id$); -*-text-*-
|
||||||
|
|
||||||
|
o [NSE] Fixed issue in path encoding in the http-backup-finder script. [Patrik]
|
||||||
|
|
||||||
o [NSE] Added the script http-backup-finder that searches for backup copies
|
o [NSE] Added the script http-backup-finder that searches for backup copies
|
||||||
of files discovered by crawling a website. [Patrik]
|
of files discovered by crawling a website. [Patrik]
|
||||||
|
|
||||||
|
|||||||
@@ -106,8 +106,13 @@ action = function(host, port)
|
|||||||
port = port or ((parsed.scheme == 'http') and 80)
|
port = port or ((parsed.scheme == 'http') and 80)
|
||||||
end
|
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
|
-- 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 ( response.status == 200 ) then
|
||||||
if ( not(parsed.port) ) then
|
if ( not(parsed.port) ) then
|
||||||
table.insert(backups,
|
table.insert(backups,
|
||||||
|
|||||||
Reference in New Issue
Block a user