Nmap Development mailing list archives

Re: [NSE] DB2 library and scripts


From: Patrick Donnelly <batrick () batbytes com>
Date: Mon, 10 May 2010 21:12:02 -0400

On Mon, May 10, 2010 at 6:19 PM, Patrick Donnelly <batrick () batbytes com> wrote:
-- at the file chunk level of db2-brute
local function new_usrpwd_iterator (usernames, passwords)
 local function next_username_password ()
  coroutine.yield(true) -- ignore first call, it sets up usernames/passwords
  for username in usernames do
    for password in passwords do
      coroutine.yield(username, password)
    end
  end
  while true do coroutine.yield(nil, nil) end
 end
 return coroutine.wrap(next_username_password);
end

Sorry, there was a small error in the above code from an earlier
thought. Remove this line:

  coroutine.yield(true) -- ignore first call, it sets up usernames/passwords

and it should work.

-- 
- Patrick Donnelly
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: