Nmap Development mailing list archives
Re: [RFC][patch] Make timeout script-args consistent
From: David Fifield <david () bamsoftware com>
Date: Tue, 5 Mar 2013 10:40:48 -0800
On Tue, Mar 05, 2013 at 11:30:41AM -0600, Daniel Miller wrote:
I noticed that several timeout-related script-args were documented as accepting a timespec as defined in the man page (http://nmap.org/book/man-performance.html), but in reality only accepted a plain number. Also, for some scripts this number was seconds, and for others, milliseconds. The attached patch attempts to standardize on the timespec method, as well as fix some documentation issues (missing nsedoc, incorrect argument names, etc.) The major objection I'd expect here is for scripts that calculate timeouts in seconds (os.time() - start < timeout) which may misbehave if a timeout less than 1 second is specified (e.g. --script-args myscript.timeout=100ms), but since the script did not alter any defaults, this should not affect most users. Are there any other objections to applying this patch? If there is no response by Thursday morning, or if there is significant positive response, I will commit it.
I'm on board with this patch. You need to do the parts that change behavior (milliseconds to seconds, like in broadcast-ping) as a separate commit. All the parse_timespec changes should be refactoring that doesn't change behavior for people already calling the scripts with integer arguments. Anything that changes behavior, please put in a separate commit. David Fifield _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [RFC][patch] Make timeout script-args consistent Daniel Miller (Mar 05)
- Re: [RFC][patch] Make timeout script-args consistent David Fifield (Mar 05)
- Re: [RFC][patch] Make timeout script-args consistent Tom Sellers (Mar 05)
- Re: [RFC][patch] Make timeout script-args consistent Daniel Miller (Mar 05)
- Re: [RFC][patch] Make timeout script-args consistent David Fifield (Mar 05)
- Re: [RFC][patch] Make timeout script-args consistent Tom Sellers (Mar 05)
- Re: [RFC][patch] Make timeout script-args consistent David Fifield (Mar 05)