diff --git a/nping/nping.cc b/nping/nping.cc index 7cdd4c204..f9cb34cf2 100644 --- a/nping/nping.cc +++ b/nping/nping.cc @@ -167,7 +167,7 @@ int main(int argc, char *argv[] ){ * we should alert the user that their port command is going to be ignored * I choose to print out a Fatal error since the scan doesn't make sense. */ - if(o.isRoot() && o.issetTargetPorts() && (o.getMode() != TCP || o.getMode() != UDP)) + if(o.issetTargetPorts() && (o.getMode() != TCP || o.getMode() != UDP || o.getMode !=UDP_PRIV)) outFatal(QT_3, "You cannot use -p (explicit port selection) in your current scan mode.\n(Perhaps you meant to use --tcp or --udp"); @@ -230,6 +230,7 @@ int do_safe_checks(){ } /* End of do_safe_checks() */ + /** Use this function whenever you have some code that you want to test, but * you don't want to bother creating a new dummy main.c file, etc. This * function is called by do_safe_checks() at the beginning of nping execution.