Nmap Development mailing list archives

Re: Logging filename extensions committed


From: jah <jah () zadkiel plus com>
Date: Fri, 14 Dec 2007 03:47:14 +0000

On 14/12/2007 03:01, Kris Katterjohn wrote:
jah wrote:
  
First off, an unhandled exception:
Windows filenames cannot contain a colon (because, historically, Windows 
was excreted from one) so %T (%H:%M:%S) is no use to windows users and 
supplying it crashes nmap on my system.

    

Well crap! :)

I suppose removing the current %R and %T and convert what is currently 
%r and %t (the same but without the colons) to that instead won't cause 
a problem.  In fact, I much like this idea.

Now would be the time since it's just been put in.  What do you think?
  
What's %R?  Your mail of september didn't mention that one and there 
seems to be about twelve different implementations of strftime().  I'm 
sorry, it's gone 3am and I've had rather a lot of stella.

    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"

Could you keep %T if it's useful, but handle the error for windows users 
(maybe default to %t or tell them to defect or to defecate:)?

  
Secondly an idea:
I wonder what you think of making it simple to produce YYYYmmddTHHMMSS 
similar to ISO 8601 time [2] (similar, but without the hyphens or 
colons).  This format is great for filename sort ordering in windows.  
With your scheme, that would be %Y%m%dT%t, which is fine, but it would 
be nice to have a short form for the (non American style) date as well 
as a short form for the time.  Even better would be %<single_char> 
depending on the demand for such a thing.  It might also be useful to 
include the timezone offset if that weren't taking it too far (a plus 
sign is legal in windows file naming)...

Whaddyareckon?
    

I don't want to diverge too much from strftime(), and most of the 
letters are taken there :)

Let's see what others think.
  
How about %F?
Yes, let's see what people think.  It would be interesting to know how 
much of the world actually use %D which to some of us is utterly alien.  
The times I've had to wrestle with applications that complain about 
invalid dates or worse, just convert them, because it won't accept dates 
that aren't %D-like...  Which is why I like ISO style.  There's just no 
mistaking it, whoever you are and wherever you're from.


jah

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: