From 1c3a0434ca0d3025dda1c92e57aa7d1af7beb723 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 11 Feb 2016 18:51:15 +0100 Subject: [PATCH] wirefuzz: exit with error code on more issues --- qa/wirefuzz.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/wirefuzz.pl b/qa/wirefuzz.pl index fb1d76d89c..34f0b7d56c 100755 --- a/qa/wirefuzz.pl +++ b/qa/wirefuzz.pl @@ -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 ) {