diff --git a/CHANGELOG b/CHANGELOG index 57045a4ea..70b8100ad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ # Nmap Changelog ($Id$); -*-text-*- +o The --exclude and --excludefile options can be used together now. [David] + o [NSE] Added the script http-apache-negotiation that detects if the Apache module mod_negotiate is enabled. [Hani Benhabiles] diff --git a/nmap.cc b/nmap.cc index 0c0a693b2..8a488e327 100644 --- a/nmap.cc +++ b/nmap.cc @@ -1482,8 +1482,6 @@ void apply_delayed_options() { o.setSourceSockAddr(&tmpsock, sizeof(tmpsock)); } - if (delayed_options.exclude_spec && delayed_options.exclude_file) - fatal("--excludefile and --exclude options are mutually exclusive."); if(delayed_options.exclude_file) { o.excludefd = fopen(delayed_options.exclude_file, "r"); if (!o.excludefd) @@ -1698,7 +1696,6 @@ int nmap_main(int argc, char *argv[]) { fclose(o.excludefd); } if (o.exclude_spec != NULL) { - /* Simultaneous --excludefile and --exclude are not supported. */ load_exclude_string(&exclude_group , o.exclude_spec); } diff --git a/targets.cc b/targets.cc index 0c30a76cf..9d8409d74 100644 --- a/targets.cc +++ b/targets.cc @@ -92,6 +92,7 @@ /* $Id$ */ +#include "nbase/nbase_addrset.h" #include "targets.h" #include "timing.h" #include "NmapOps.h" @@ -211,16 +212,13 @@ int load_exclude_string(addrset *excludelist, const char *s) { /* A debug routine to dump some information to stdout. Invoked if debugging is - set to 3 or higher. I had to make significant changes from wam's code. - Although wam displayed much more detail, alot of this is now hidden inside of - the Target Group Object. Rather than writing a bunch of methods to return - private attributes, which would only be used for debugging, I went for the - method below. */ + set to 3 or higher. */ int dumpExclude(addrset *exclude_group) { - /* When we updated the exclude code to use addrset from nbase (originally - from ncat) there was no simple available debugging function. Thus we are - zeroing this and if it is needed look in nbase_addrset.c for the lower level - debug function -Colin */ + const struct addrset_elem *elem; + + for (elem = exclude_group->head; elem != NULL; elem = elem->next) + addrset_elem_print(stdout, elem); + return 1; }