From 256bffba9c2ebf3c65155e20c9cea8f8c9c8eb37 Mon Sep 17 00:00:00 2001 From: sean Date: Sat, 4 Aug 2012 00:52:36 +0000 Subject: [PATCH] Removed the requirement from is root in the error message about having a useless -p option --- nping/nping.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.