Nmap Development mailing list archives

Re: warning message when overwriting output files


From: Robin Wood <robin@digi.ninja>
Date: Wed, 12 Nov 2014 20:08:18 +0000

I think appending something if the file already exists would be best but it
may mess up people who expect the overwrite in scripted jobs.

Renaming could work as well.

I should know this but is there any way to have a resource file for nmap?
That would be a good way to handle this, the default is overwrite but a
config setting would say rename or change output name as appropriate. A lot
of work for this feature but I can think of a lot of other use cases for
the feature.

Robin
On 12 Nov 2014 19:42, "Daniel Miller" <bonsaiviking () gmail com> wrote:

On Mon, Nov 10, 2014 at 11:37 AM, Robin Wood <robin@digi.ninja> wrote:
It would be good to have a warning when a scan which does outputs
(-o?) is going to overwrite existing files. I've just managed to lose
a load of work when I switched from TCP to UDP and forgot to change
the filename.


Robin,

That sounds like a good idea. How would you expect it to act? We don't
have any other interactive features, so asking for confirmation would
be a departure from our usual way of doing things. We could also just
append to the filename if it exists, or copy the old one to X.orig, or
something.

For future reference, I usually avoid this problem by including %T in
my output filename to include the timestamp, so unless I do two scans
within a second of each other, there's no clobbering.

Dan

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

Current thread: