mirror of
https://github.com/nmap/nmap.git
synced 2026-08-29 04:53:24 +00:00
Ensure that username is only used as password once
This commit is contained in:
parent
6dc9c4a55e
commit
76df6b2d44
1 changed files with 6 additions and 1 deletions
|
|
@ -51,11 +51,16 @@ portrule = shortport.port_or_service({50000,60000}, {"drda","ibm-db2"}, "tcp", {
|
|||
local function new_usrpwd_iterator (usernames, passwords)
|
||||
local function next_username_password ()
|
||||
local useraspass = stdnse.get_script_args('drda-brute.useraspass') or false
|
||||
|
||||
for username in usernames do
|
||||
local namenotused = true
|
||||
for password in passwords do
|
||||
if ( username == password ) then
|
||||
namenotused = false
|
||||
end
|
||||
coroutine.yield(username, password)
|
||||
end
|
||||
if useraspass then
|
||||
if (useraspass and namenotused) then
|
||||
coroutine.yield(username, username)
|
||||
end
|
||||
passwords("reset")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue