open(FILE, "/etc/snort/snort.conf") or die 'Unable to read snort config file.';
@snortconfig = <FILE>;
close(FILE);
- open(FILE, ">/etc/snort/snort.conf") or die 'Unable to write snort config file.';
+ open(FILE, "/etc/snort/snort.conf") or die 'Unable to write snort config file.';
my @rules = `cd /etc/snort/rules/ && ls *.rules`; # With this loop the rule might be display with correct rulepath set
foreach (@rules) {
close($fh);
}
- my @temp=split(/= /,$md5buf->content);
-
- return $temp[1];
+ return $md5buf->content;
}
sub downloadrulesfile {
my $return = &geturl($url);