Nmap Development mailing list archives

Re: brute.lua, unpwdb.lua, custom iterators and flexibility


From: Patrik Karlsson <patrik () cqure net>
Date: Sat, 7 Jul 2012 21:42:35 +0200

On Sat, Jul 7, 2012 at 5:42 PM, Aleksandar Nikolic
<nikolic.alek () gmail com>wrote:

Hi all,

while I'm doing some changes to the way brute lib works, something
caught my eye.

For example, what I see happening is that from time to time the script
won't get a valid response from the server. That would cause the
script to retry, which would increase the retry counter. Now,
sometimes, after the retry , the script does get a valid reply and
should continue the execution, but the retry counter stays the same.
So, what I would like to do is add a way for a script to reset the
retry counter
when it gets the valid reply. That way the script would continue
running even if we sometimes do get invalid replies, and would stop if
we get blocked by the server.

Any objections to this reasoning?


Aleksandar


I just looked into this and as far as I can tell:
1. The script calls the start method
2. The start method starts X number of threads which all call the login
method
3. The login method calls the doAuthenticate method which has the retry
count

In the doAuthenticate method the retries are decremented for each time the
script returns error with the retry flag set.
If the retries are depleted the engine aborts execution, however, if not
control is returned back to the login method.
Next time the login method calls doAuthenticate the retry count is reset.

I'm not sure I follow the change your looking to do? Could you elaborate a
little?

Thanks,
//Patrik
-- 
Patrik Karlsson
http://www.cqure.net
http://twitter.com/nevdull77
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: