projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git]
/
src
/
os_regex
/
examples
/
validate.pl
diff --git
a/src/os_regex/examples/validate.pl
b/src/os_regex/examples/validate.pl
index
3a925c6
..
4bd6791
100755
(executable)
--- a/
src/os_regex/examples/validate.pl
+++ b/
src/os_regex/examples/validate.pl
@@
-3,8
+3,7
@@
use strict;
use warnings;
use strict;
use warnings;
-if(@ARGV < 2)
-{
+if (@ARGV < 2) {
die "$0 file error_msg\n";
}
die "$0 file error_msg\n";
}
@@
-12,26
+11,20
@@
my ($prog, $file,$msg) = (@ARGV);
open(FILE,$file) || die "Error opening file: $file\n";
open(FILE,$file) || die "Error opening file: $file\n";
-if(! -f $prog)
-{
- die "File $prog not present\n";
+if (! -f $prog) {
+ die "File $prog not present\n";
}
}
-while(<FILE>)
-{
+while(<FILE>) {
my $line = $_;
print "running: $prog $line\n";
my $result = `$prog $line`;
my $line = $_;
print "running: $prog $line\n";
my $result = `$prog $line`;
- if($result =~ /$msg/)
- {
+ if ($result =~ /$msg/) {
print $result;
print "\t ** $line **\n";
<STDIN>;
print $result;
print "\t ** $line **\n";
<STDIN>;
- }
- else
- {
+ } else {
print $result;
}
}
print $result;
}
}
-# EOF