Nmap Development mailing list archives

Re: [Patch] Badly named output files


From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 24 Jun 2014 10:00:54 -0500

Jay,

Nicely done. I have definitely run afoul of Nmap's extreme permissibility
when it comes to output filenames before. I've tested this patch and it
works well. I especially like that it has instructions on how to override
the check. I also tested on Windows, and it has no problem with the
backslash ("/") instead of the more usual forward slash ("\") as a
directory separator, so I don't think it needs a #ifdef there. Please
commit!

Dan


On Tue, Jun 24, 2014 at 8:18 AM, Jay Bosamiya <jaybosamiya () gmail com> wrote:

Hi All!

d33tah on IRC said, "i'm getting the impression that maybe nmap should
warn me if i do something as stupid as -oX -sV logfile.txt"

I personally feel that it should not be a warning but an error (with
nmap quitting).

Attached is a patch that does this (and for other output types as well).
It shows the error messages similar to "Output filename begins with '-'.
Try '-oX ./-sV' if you really want it to be named as such. QUITTING."

I also have added in some error checking for "-oA -" which should not be
allowed IMHO.

Feedback is welcome.

Cheers,
Jay

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: