1
0
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:
ron
2009-08-23 00:43:46 +00:00
parent cf33de55f3
commit fbc8e180ca
3 changed files with 86 additions and 39 deletions

View File

@@ -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"