mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 21:51:28 +00:00
Converted http-userdir-enum.nse to use my http-enum.nse logic (from http.lua). Also moved the 'displayall' script-arg back into the script, not http.lua, because http-userdir-enum.nse actually wants to find non-200 pages (403 Access Denied, for instance).
This commit is contained in:
@@ -31,6 +31,9 @@ for 404 Not Found and the status code returned by the random files).
|
||||
-- |_ /x_logo.gif Xerox Phaser Printer
|
||||
--
|
||||
--
|
||||
--@args displayall Set to '1' or 'true' to display all status codes that may indicate a valid page, not just
|
||||
-- "200 OK" and "401 Authentication Required" pages. Although this is more likely to find certain
|
||||
-- hidden folders, it also generates far more false positives.
|
||||
--@args limit Limit the number of folders to check. This option is useful if using a list from, for example,
|
||||
-- the DirBuster projects which can have 80,000+ entries.
|
||||
|
||||
@@ -169,7 +172,7 @@ action = function(host, port)
|
||||
end
|
||||
|
||||
for i, data in pairs(results) do
|
||||
if(http.page_exists(data, result_404, known_404, URLs[i].checkdir)) then
|
||||
if(http.page_exists(data, result_404, known_404, URLs[i].checkdir, nmap.registry.args.displayall)) then
|
||||
if(URLs[i].checkdesc) then
|
||||
stdnse.print_debug(1, "http-enum.nse: Found a valid page! (%s: %s)", URLs[i].checkdir, URLs[i].checkdesc)
|
||||
response = response .. URLs[i].checkdir .. " " .. URLs[i].checkdesc .. "\n"
|
||||
|
||||
Reference in New Issue
Block a user