mirror of
https://github.com/nmap/nmap.git
synced 2025-12-21 06:59:01 +00:00
Removes parse_url from http.lua and makes url.parse more functional. Closes #952.
This commit is contained in:
@@ -29,6 +29,7 @@ local target = require "target"
|
||||
local shortport = require "shortport"
|
||||
local httpspider = require "httpspider"
|
||||
local stdnse = require "stdnse"
|
||||
local url = require "url"
|
||||
|
||||
getLastLoc = function(host, port, useragent)
|
||||
|
||||
@@ -71,7 +72,7 @@ action = function(host, port)
|
||||
-- If the mobile browser request is redirected to a different page, that must be the mobile version's page.
|
||||
if loc ~= mobloc then
|
||||
local msg = "Found mobile version: " .. mobloc
|
||||
local mobhost = http.parse_url(mobloc)
|
||||
local mobhost = url.parse(mobloc)
|
||||
if not crawler:iswithinhost(mobhost.host) then
|
||||
msg = msg .. " (Redirected to a different host)"
|
||||
if newtargets then
|
||||
|
||||
Reference in New Issue
Block a user