mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
o [NSE] Fixed issue in path encoding in the http-backup-finder script. [Patrik]
This commit is contained in:
parent
5183478e8c
commit
3e8440f5f6
2 changed files with 9 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
# 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
|
||||
of files discovered by crawling a website. [Patrik]
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue