Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: [PATCH] Logging (filename) extensions

[PATCH] Logging (filename) extensions

From: Kris Katterjohn <katterjohn_at_gmail.com>
Date: Mon, 17 Sep 2007 20:20:40 -0500

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
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]