Nmap Development mailing list archives
[RFC][patch] Make timeout script-args consistent
From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 05 Mar 2013 11:30:41 -0600
List,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.
Dan
Attachment:
timeout-fix.diff
Description:
_______________________________________________ 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)