mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 16:39:03 +00:00
* bugfixes to several http scripts related to new redirect code in http
library * added option to httpspider that allows passing the redirect_ok closure to the http library [Patrik]
This commit is contained in:
@@ -82,7 +82,7 @@ end
|
||||
|
||||
action = function(host, port)
|
||||
|
||||
local crawler = httpspider.Crawler:new(host, port, '/', { scriptname = SCRIPT_NAME } )
|
||||
local crawler = httpspider.Crawler:new(host, port, '/', { scriptname = SCRIPT_NAME, redirect_ok = false } )
|
||||
crawler:set_timeout(10000)
|
||||
|
||||
local results = {}
|
||||
|
||||
@@ -541,7 +541,7 @@ action = function(host, port)
|
||||
|
||||
if targetname ~= nil then
|
||||
|
||||
http_response = http.head(host, port, path, {header={Host=targetname}, bypass_cache=true})
|
||||
http_response = http.head(host, port, path, {header={Host=targetname}, bypass_cache=true, redirect_ok = false})
|
||||
|
||||
if not http_response.status then
|
||||
if not http_response["ERROR"] then
|
||||
|
||||
Reference in New Issue
Block a user