Nmap Development mailing list archives

Re: [PATCH] Allow comments in exclusion file


From: Tom Sellers <nmap () fadedcode net>
Date: Sat, 26 Sep 2009 14:48:53 -0500

I finally had the time to sit down and address David's recommendations about my patch [1]
to add comments to the exclusion file.

The attached patch does the following:

- Permits the use the pound sign "#" to denote comments in both the input and exclusion files.

- Updates refguide.xml to reflect the ability to use comments.

- Based on David's suggestion [2], reworks the code to read the exclusion file so that it functions
  like the code reading the input file.  The exclusion code formerly read a line at a time, it
  now reads and processes a character at a time.

The way that comments work with this patch is that when nmap finds a # on a line it ignores
everything else after that # until it reaches the end of the line.  Since, in the current code,
nmap will simply quit if it finds a # in either the input or exclusion files this code does not
change any current handling of the # character so change should be backwards compatible with
existing input and exclusion files.

I have tested this code with a variety of input and exclusion arrangements and did not find any
errors.  I don't have anywhere near the code experience or nmap-internals familiarity that you
folks do so a critical eye on the code would be appreciated.

Thanks,

Tom

1.  http://seclists.org/nmap-dev/2009/q3/0427.html
2.  http://seclists.org/nmap-dev/2009/q3/0734.html

Attachment: patch_support_comments.txt
Description:


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

Current thread: