Nmap Development mailing list archives
[PATCH] Check for exclude list from command line before opening exclude file
From: Kris Katterjohn <kjak () ispwest com>
Date: Thu, 14 Sep 2006 21:17:39 -0500
The attached patch checks to see if an exclude list has been given on the command line before opening an exclude file. This way the check is done on both sides instead of just checking for the exclude file when getting the list from the command line. It's a diff against 4.20ALPHA7. Thanks, Kris Katterjohn
--- x/nmap.cc 2006-09-11 22:33:34.000000000 -0500 +++ y/nmap.cc 2006-09-14 21:02:50.000000000 -0500 @@ -626,6 +626,8 @@ int nmap_main(int argc, char *argv[]) { if (l <= 0) fatal("Bogus --initial-rtt-timeout argument specified. Must be positive"); pre_init_rtt_timeout = l; } else if (strcmp(long_options[option_index].name, "excludefile") == 0) { + if (exclude_spec) + fatal("--excludefile and --exclude options are mutually exclusive."); excludefd = fopen(optarg, "r"); if (!excludefd) { fatal("Failed to open exclude file %s for reading", optarg);
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] Check for exclude list from command line before opening exclude file Kris Katterjohn (Sep 14)