mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Lua 5.2 upgrade [1] for NSE.
[1] http://seclists.org/nmap-dev/2012/q2/34
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
local http = require "http"
|
||||
local httpspider = require "httpspider"
|
||||
local shortport = require "shortport"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
local url = require "url"
|
||||
|
||||
description = [[
|
||||
Spiders a website and attempts to identify open redirects. Open
|
||||
redirects are handlers which commonly take a URL as a parameter and
|
||||
@@ -32,14 +40,11 @@ author = "Martin Holst Swende"
|
||||
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
||||
categories = {"discovery", "intrusive"}
|
||||
|
||||
require 'httpspider'
|
||||
require 'shortport'
|
||||
require 'url'
|
||||
|
||||
portrule = shortport.http
|
||||
|
||||
local function dbg(str,...)
|
||||
stdnse.print_debug(2,"http-open-redirect:"..str, unpack(arg))
|
||||
stdnse.print_debug(2,"http-open-redirect:"..str, table.unpack(arg))
|
||||
end
|
||||
local function dbgt(tbl)
|
||||
for k,v in pairs(tbl) do
|
||||
@@ -129,4 +134,4 @@ action = function(host, port)
|
||||
if ( #results> 0 ) then
|
||||
return stdnse.format_output(true, results)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user