1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Let http-title fetch different url via script-args

This commit is contained in:
dmiller
2016-02-21 14:28:09 +00:00
parent 1d3b9f613f
commit abb827a759

View File

@@ -12,6 +12,7 @@ http library.
]]
---
--@args http-title.url The url to fetch. Default: /
--@output
-- Nmap scan report for scanme.nmap.org (74.207.244.221)
-- PORT STATE SERVICE
@@ -36,7 +37,7 @@ portrule = shortport.http
action = function(host, port)
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
if resp.location then