mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 05:39:01 +00:00
Quits iterating over probes when a valid login for that application has been found. If we don't quit we get the same valid credentials in different paths.
This commit is contained in:
@@ -253,11 +253,13 @@ action = function(host, port)
|
||||
|
||||
-- Iterate through responses to find a candidate for login routine
|
||||
local j = 1
|
||||
|
||||
for i, fingerprint in ipairs(fingerprints) do
|
||||
local credentials_found = false
|
||||
stdnse.print_debug(1, "%s: Processing %s", SCRIPT_NAME, fingerprint.name)
|
||||
for _, probe in ipairs(fingerprint.paths) do
|
||||
|
||||
if (results[j]) then
|
||||
if (results[j] and not(credentials_found)) then
|
||||
local path = basepath .. probe['path']
|
||||
|
||||
if( http.page_exists(results[j], result_404, known_404, path, true) ) then
|
||||
@@ -272,6 +274,7 @@ action = function(host, port)
|
||||
fingerprint.name, login_combo["username"], login_combo["password"], path)
|
||||
-- Add to http credentials table
|
||||
register_http_credentials(host, port, login_combo["username"], login_combo["password"])
|
||||
credentials_found = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user