]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
wirefuzz: exit with error code on more issues
authorVictor Julien <victor@inliniac.net>
Thu, 11 Feb 2016 17:51:15 +0000 (18:51 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 13 Feb 2016 08:45:49 +0000 (09:45 +0100)
qa/wirefuzz.pl

index fb1d76d89c580a0e48bcd3ab1d65b476a5e555e7..34f0b7d56c9fcf37183315dccab3386ee60ee7f8 100755 (executable)
@@ -99,7 +99,7 @@ sub parseopts {
         @tmpfiles = <$config{r}>;
         if(@tmpfiles eq 0){
             print "parseopts: Pcap filemask was invalid we couldn't find any matching files\n";
-            exit;
+            exit(1);
         } else {
             #escapes for filenames
             foreach my $file (@tmpfiles) {
@@ -144,7 +144,7 @@ sub parseopts {
         }
         else {
             print "parseopts: suricata bin file is not a text or a bin exiting.\n";
-            exit;
+            exit(1);
         }
     }
     else {
@@ -228,7 +228,7 @@ sub parseopts {
         }
         else {
             print "parseopts: error ratio specified but outside of range. Valid range is 0.00-1.0\n";
-            exit;
+            exit(1);
         }
     }
     else {
@@ -383,7 +383,7 @@ while ( $successcnt < $loopnum ) {
                 #this could still cause us to loop forever if all pcaps are bad but it's better than nothing.
                 if ( @files < 2 ) {
                     print "editcap: had an error and this was our only pcap:" . $editcaperr . "\n";
-                    exit;
+                    exit(1);
                 }
                 else {
                     print "editcap: had an error going to the next pcap:" . $editcaperr . "\n";
@@ -392,7 +392,7 @@ while ( $successcnt < $loopnum ) {
             }
             elsif ( $editcap_sys_signal eq 2 ) {
                 print "editcap: system() got a ctl+c we are bailing as well\n";
-                exit;
+                exit(1);
 
             }
             else {
@@ -519,7 +519,7 @@ while ( $successcnt < $loopnum ) {
                 }else{
                     &generate_report($report, $fullcmd, $out, $err, $exit, "none");
                 }
-                exit;
+                exit(1);
             }
         }
         elsif ( $suricata_sys_signal eq 2 ) {