Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: small ndiff suggestion
From: David Fifield <david () bamsoftware com>
Date: Tue, 12 May 2009 19:00:09 -0600

On Mon, May 04, 2009 at 06:39:20PM +0300, Henri Salo wrote:
ndiff without argument says:

./ndiff: need exactly two input filenames.
Try './ndiff -h' for help.

Could we make it to print -h automatically?

Hmm, here I modeled Ndiff after GNU diff:

$ diff
diff: missing operand after `diff'
diff: Try `diff --help' for more information.

On the other hand, Nmap prints out usage information when run without
arguments. I think I like it better when the error message is on its own
in the output and not followed by non-error information; when there's a
lot of information on the screen it's easy to miss the real error. It
would look like

$ ndiff
./ndiff: need exactly two input filenames.
Usage: ./ndiff [option] FILE1 FILE2
Compare two Nmap XML files and display a list of their differences.
Differences include host state changes, port state changes, and changes to
service and OS detection.

  -h, --help     display this help
  -v, --verbose  also show hosts and ports that haven't changed.
  --text         display output in text format (default)
  --xml          display output in XML format

I'm inclined to leave the output as it is, but I'm willing to hear other
points of view.

David Fifield

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]