Skip to content

Commit

Permalink
snort-org, not sure why that was there, this fixes issue #199 so Joel…
Browse files Browse the repository at this point in the history
… will be happy. Community rules md5 hashes will now be checked.
  • Loading branch information
shirkdog committed Nov 8, 2016
1 parent 18e996c commit 9d4e9e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pulledpork.pl
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ sub md5file {
getstore( "https://www.snort.org/reg-rules/$rule_file.md5/$oinkcode",
$temp_path . $rule_file . ".md5" );
}
elsif ( $base_url =~ /(secureworks|emergingthreats\.net|emergingthreatspro\.com|snort-org.*community)/i ) {
elsif ( $base_url =~ /(secureworks|emergingthreats\.net|emergingthreatspro\.com|snort\.org.+community)/i ) {
$getrules_md5 = getstore(
"$base_url/$rule_file" . ".md5",
$temp_path . $rule_file . ".md5"
Expand Down Expand Up @@ -1987,7 +1987,7 @@ BEGIN
$base_url .= "$oinkcode/$Snort/";
}
}
elsif ( $base_url =~ /snort-org.+community/ ){
elsif ( $base_url =~ /snort\.org.+community/ ){
$prefix = "Snort-Community-"
}
elsif ( $base_url =~ /secureworks/ ) {
Expand All @@ -1997,7 +1997,7 @@ BEGIN

$prefix = "Custom-" unless $prefix;

$Hash = 2 unless $base_url =~ /(secureworks|emergingthreats|[^labs]\.snort\.org)|snort-org/;
$Hash = 2 unless $base_url =~ /(secureworks|emergingthreats|[^labs]\.snort\.org)|snort\.org.+community/;
if ($rule_file =~/IPBLACKLIST/) {
$Hash = 2;
$rule_file.=$blk++;
Expand Down Expand Up @@ -2085,7 +2085,7 @@ BEGIN
croak "file $temp_path/$rule_file does not exist!\n"
unless (-f "$temp_path/$rule_file");
$prefix = "ET-" if $base_url =~ /(emergingthreats.net|emergingthreatspro.com)/;
$prefix = "Snort-Community-" if $base_url =~ /snort-org.+community/;
$prefix = "Snort-Community-" if $base_url =~ /snort\.org.+community/;
rule_extract(
$rule_file, $temp_path, $Distro,
$arch, $Snort, $Sorules,
Expand Down

0 comments on commit 9d4e9e5

Please sign in to comment.