mirror of
https://github.com/nmap/nmap.git
synced 2025-12-31 03:49:01 +00:00
Make it a fatal error if you try to combine traceroute with idle or
connect scan, IPv6, or non-root. Previously it only printed a warning and disabled traceroute, which was easy to miss until the scan finished.
This commit is contained in:
19
nmap.cc
19
nmap.cc
@@ -1416,20 +1416,13 @@ int nmap_main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
#if HAVE_IPV6
|
||||
if(o.af() == AF_INET6 && o.traceroute) {
|
||||
error("Warning: Traceroute does not support IPv6, disabling...");
|
||||
o.traceroute = 0;
|
||||
} else
|
||||
if(o.af() == AF_INET6 && o.traceroute)
|
||||
fatal("Traceroute does not support IPv6");
|
||||
#endif
|
||||
if(o.traceroute && (o.idlescan || o.connectscan)) {
|
||||
error("Warning: Traceroute does not support idle or connect scan, disabling...");
|
||||
o.traceroute = 0;
|
||||
}
|
||||
|
||||
if(o.traceroute && !o.isr00t) {
|
||||
error("Warning: Traceroute has to be run as root, disabling...");
|
||||
o.traceroute = 0;
|
||||
}
|
||||
if (o.traceroute && !o.isr00t)
|
||||
fatal("Traceroute has to be run as root");
|
||||
if (o.traceroute && (o.idlescan || o.connectscan))
|
||||
fatal("Traceroute does not support idle or connect scan");
|
||||
|
||||
|
||||
if ((o.noportscan) && (portlist || o.fastscan))
|
||||
|
||||
Reference in New Issue
Block a user