mirror of
https://github.com/nmap/nmap.git
synced 2025-12-12 02:39:03 +00:00
Let http-title fetch different url via script-args
This commit is contained in:
@@ -12,6 +12,7 @@ http library.
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
---
|
---
|
||||||
|
--@args http-title.url The url to fetch. Default: /
|
||||||
--@output
|
--@output
|
||||||
-- Nmap scan report for scanme.nmap.org (74.207.244.221)
|
-- Nmap scan report for scanme.nmap.org (74.207.244.221)
|
||||||
-- PORT STATE SERVICE
|
-- PORT STATE SERVICE
|
||||||
@@ -36,7 +37,7 @@ portrule = shortport.http
|
|||||||
action = function(host, port)
|
action = function(host, port)
|
||||||
local resp, redirect_url, title
|
local resp, redirect_url, title
|
||||||
|
|
||||||
resp = http.get( host, port, '/' )
|
resp = http.get( host, port, stdnse.get_script_args(SCRIPT_NAME..".url") or "/" )
|
||||||
|
|
||||||
-- check for a redirect
|
-- check for a redirect
|
||||||
if resp.location then
|
if resp.location then
|
||||||
|
|||||||
Reference in New Issue
Block a user