Changed location of IP options + root privs check in NmapOps.cc. It's now just checked along with the other things that require root privileges, and now uses privreq instead just saying 'you must be root'.

This commit is contained in:
kris 2007-01-29 03:22:15 +00:00
parent e326bc0266
commit 3695115c65

View file

@ -398,6 +398,9 @@ void NmapOps::ValidateOptions() {
if (osscan) {
fatal("TCP/IP fingerprinting (for OS scan) requires %s. Sorry, dude.\n", privreq);
}
if (o.ipoptionslen)
fatal("Sorry, using ip options requires %s.", privreq);
}
@ -459,9 +462,6 @@ void NmapOps::ValidateOptions() {
if (min_parallelism > max_parallelism)
max_parallelism = min_parallelism;
if(o.ipoptionslen && ! o.isr00t)
fatal("To use ip options you must be root.");
if(o.ipoptions && o.osscan)
error("WARNING: Ip options are NOT used while OS scanning!");