Nmap Development mailing list archives
[PATCHed] A few little changes involving long_options in nmap.cc
From: Kris Katterjohn <katterjohn () gmail com>
Date: Thu, 11 Jan 2007 10:30:19 -0600
The attached patch (/nmap SVN revision 4342) uses strcmp() to check for --script and --open, and optcmp() for --ip-options (now --ip_options works). I kinda messed up the log for this revision (oops!), which is one of the reasons I'm sending this to the list. Thanks, Kris Katterjohn
Index: nmap.cc =================================================================== --- nmap.cc (revision 4341) +++ nmap.cc (revision 4342) @@ -616,7 +616,7 @@ switch(arg) { case 0: #ifndef NOLUA - if (optcmp(long_options[option_index].name, "script") == 0) { + if (strcmp(long_options[option_index].name, "script") == 0) { o.script = 1; o.chooseScripts(optarg); } else if (optcmp(long_options[option_index].name, "script-trace") == 0) { @@ -665,7 +665,7 @@ o.setMinHostGroupSz(atoi(optarg)); if (atoi(optarg) > 100) error("Warning: You specified a highly aggressive --min-hostgroup."); - } else if (optcmp(long_options[option_index].name, "open") == 0) { + } else if (strcmp(long_options[option_index].name, "open") == 0) { o.setOpenOnly(true); } else if (strcmp(long_options[option_index].name, "scanflags") == 0) { o.scanflags = parse_scanflags(optarg); @@ -814,7 +814,7 @@ o.fragscan = atoi(optarg); if (o.fragscan <= 0 || o.fragscan % 8 != 0) fatal("Data payload MTU must be >0 and multiple of 8"); - } else if (strcmp(long_options[option_index].name, "ip-options") == 0){ + } else if (optcmp(long_options[option_index].name, "ip-options") == 0){ o.ipoptions = (u8*) safe_malloc(4*10+1); o.ipoptionslen = parse_ip_options(optarg, o.ipoptions, 4*10+1, &o.ipopt_firsthop, &o.ipopt_lasthop); if(o.ipoptionslen > 4*10)
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCHed] A few little changes involving long_options in nmap.cc Kris Katterjohn (Jan 11)