Hey everyone!
I've been using the logging options (-oA, -oX, etc.) a lot lately, and I
tend to like dates and times in the filename.
I thought it'd be cool to implement an extension to the logging options
by allowing some strftime()-like conversions for the passed filenames.
I think it would come in handy for people who do automated scans, and
also like dates/times in the filename.
The following are the same as for strftime():
%H - Hour (0-23)
%M - Minute (0-59)
%S - Second (0-60)
%m - Month (1-12)
%d - Day (1-31)
%y - Year (e.g. 07)
%Y - Year (e.g. 2007)
%% - "%"
%T - Same as "%H:%M:%S"
These are different than strftime():
%D - In strftime it's like "%m/%d/%y", here it's like "%m%d%y"
%t - In strftime it's like a <TAB>, here it's like "%H%M%S"
And if it's not a conversion character, then it'll just be that
character (e.g. %w is just w).
Examples:
-oN 'myscan-%T-%D.nmap'
gives:
myscan-19:33:13-091707.nmap
-----
-oN 'myscan-%t-%m%d.nmap'
gives:
myscan-193320-0917.nmap
-----
-oX 'myscan-%H:%M-%m%d%Y.xml'
gives:
myscan-19:34-09172007.xml
-----
-oG 'myscan-100%%.gnmap'
gives:
myscan-100%.gnmap
Please give it a try and let me know what you think!
Thanks,
Kris Katterjohn
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Received on Sep 17 2007