diff --git a/docs/nmap.usage.txt b/docs/nmap.usage.txt index d10bb1e04..6bcd59b72 100644 --- a/docs/nmap.usage.txt +++ b/docs/nmap.usage.txt @@ -1,4 +1,4 @@ -Nmap 4.20ALPHA5 ( http://www.insecure.org/nmap/ ) +Nmap 4.20ALPHA5 ( http://insecure.org/nmap/ ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. @@ -36,7 +36,7 @@ SERVICE/VERSION DETECTION: --version-all: Try every single probe (intensity 9) --version-trace: Show detailed version scan activity (for debugging) OS DETECTION: - -O: Enable OS detection (try 2nd generation, then 1st if that fails) + -O: Enable OS detection (try 2nd generation w/fallback to 1st) -O2: Only use the new OS detection system (no fallback) -O1: Only use the old (1st generation) OS detection system --osscan-limit: Limit OS detection to promising targets @@ -59,6 +59,7 @@ FIREWALL/IDS EVASION AND SPOOFING: -e : Use specified interface -g/--source-port : Use given port number --data-length : Append random data to sent packets + --ip-options : Send packets with specified ip options --ttl : Set IP time-to-live field --spoof-mac : Spoof your MAC address --badsum: Send packets with a bogus TCP/UDP checksum diff --git a/main.cc b/main.cc index beacd036f..6f82e0b88 100644 --- a/main.cc +++ b/main.cc @@ -280,7 +280,8 @@ int main(int argc, char *argv[]) { nmap_main(myargc, myargv); } else if (*myargv[0] == '!') { cptr = strchr(command, '!'); - system(cptr + 1); + int rc = system(cptr + 1); + if (rc < 1) printf("system() execution of command failed\n"); } else if (*myargv[0] == 'd') { o.debugging++; } else if (strcasecmp(myargv[0], "f") == 0) { diff --git a/osscan2.cc b/osscan2.cc index eb5b80f8f..4f30a72c5 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -579,8 +579,8 @@ HostOsScanStats::HostOsScanStats(Target * t) { target = t; FP = NULL; - bzero(&si, sizeof(si)); - bzero(&ipid, sizeof(ipid)); + memset(&si, 0, sizeof(si)); + memset(&ipid, 0, sizeof(ipid)); openTCPPort = -1; closedTCPPort = -1; @@ -1708,7 +1708,7 @@ void HostOsScan::makeTSeqFP(HostOsScanStats *hss) { /* Finally we take a binary logarithm, multiply by 8, and round to get the final result */ - seq_rate = log(seq_rate) / log(2); + seq_rate = log(seq_rate) / log(2.0); seq_rate = (unsigned int) (seq_rate * 8 + 0.5); /* Normally we don't divide by gcd in computing the rate stddev @@ -1742,7 +1742,7 @@ void HostOsScan::makeTSeqFP(HostOsScanStats *hss) { /* Finally we take a binary logarithm, multiply by 8, and round to get the final result */ - seq_stddev = log(seq_stddev) / log(2); + seq_stddev = log(seq_stddev) / log(2.0); hss->si.index = (int) (seq_stddev * 8 + 0.5); } diff --git a/output.cc b/output.cc index fef9fdcb8..97730626d 100644 --- a/output.cc +++ b/output.cc @@ -737,7 +737,11 @@ void log_vwrite(int logt, const char *fmt, va_list ap) { case LOG_MACHINE: case LOG_SKID: case LOG_XML: +#ifdef WIN32 + *apcopy = *ap; +#else va_copy(apcopy, ap); /* Needed in case we need to so a second vnsprintf */ +#endif l = logt; fileidx = 0; while ((l&1)==0) { fileidx++; l>>=1; }