Nmap Development mailing list archives
Re: [NSE] Revision of telnet-brute
From: nnposter () users sourceforge net
Date: Sun, 21 Apr 2013 19:54:30 +0000
David Fifield wrote:
Let's hard-code it to be "\r\n". If you can find a server that doesn't work on, then we'll make it configurable. The reason I ask you to do this is that I don't want the extra complexity for a feature that, to a close approximation, nobody will use. I'm looking at the future maintenance costs. If there were to be a script argument, it would be something like eol=lfnul or eol=crlf.
OK. It is now hard-coded. The string is still defined as a constant at the beginning of the script so it should be easy to revisit this functionality if necessary (without having to hunt through the code).
- Exposed the connection time-out value as a configurable parameter (telnet-brute.timeout). It defaults to 5000ms.Please use stdnse.parse_timespec for this.
Done
Can you explain the print_debug function? Why not use stdnse.print_debug directly?The local function is just a wrapper around stdnse.print_debug to make sure that the messages are consistently prefixed with the script name, without having to repeat the same code over and over.Okay, but I don't understand the two branches inside the function. Am I wrong, or is only one of the branches ever followed?
I was preserving the behavior of stdnse.print_debug, including the level being an optional parameter. I took this feature out so the level now must be specified. I have cleaned up the code a little more so that is why the diff is a touch bigger. Cheers, nnposter
Attachment:
telnet-brute.nse
Description:
Attachment:
telnet-brute.nse.diff
Description:
_______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE] Revision of telnet-brute nnposter (Apr 18)
- Re: [NSE] Revision of telnet-brute Aleksandar Nikolic (Apr 18)
- Re: [NSE] Revision of telnet-brute nnposter (Apr 18)
- Re: [NSE] Revision of telnet-brute nnposter (Apr 18)
- Re: [NSE] Revision of telnet-brute Jesper Kückelhahn (Apr 18)
- Re: [NSE] Revision of telnet-brute nnposter (Apr 18)
- Re: [NSE] Revision of telnet-brute David Fifield (Apr 20)
- Re: [NSE] Revision of telnet-brute nnposter (Apr 20)
- Re: [NSE] Revision of telnet-brute David Fifield (Apr 20)
- Re: [NSE] Revision of telnet-brute nnposter (Apr 21)
- Re: [NSE] Revision of telnet-brute David Fifield (Apr 25)
- Re: [NSE] Revision of telnet-brute nnposter (Apr 20)