Skip to content

Commit

Permalink
Further fixes past finchy's lovely perl code for the blocklist issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
shirkdog committed Sep 1, 2020
1 parent 5ec6da2 commit b42118f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc/README.CATEGORIES
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ app-detect
attack-responses
backdoor
bad-traffic
blacklist
blocklist
botnet-cnc
browser-chrome
browser-firefox
Expand Down
4 changes: 2 additions & 2 deletions etc/pulledpork.conf
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ distro=FreeBSD-12
# If you are using IP Reputation and getting some public lists, you will probably
# want to tell pulledpork where your blocklist file lives, PP automagically will
# de-dupe any duplicate IPs from different sources.
black_list=/usr/local/etc/snort/rules/iplists/default.blocklist
block_list=/usr/local/etc/snort/rules/iplists/default.blocklist

# IP Reputation does NOT require a full snort HUP, it introduces a concept whereby
# the IP list can be reloaded while snort is running through the use of a control
# socket. Please be sure that you built snort with the following optins:
# -enable-shared-rep and --enable-control-socket. Be sure to read about how to
# configure these! The following option tells pulledpork where to place the version
# file for use with control socket ip list reloads!
# This should be the same path where your black_list lives!
# This should be the same path where your block_list lives!
IPRVersion=/usr/local/etc/snort/rules/iplists

# The following option tells snort where the snort_control tool is located.
Expand Down
16 changes: 8 additions & 8 deletions pulledpork.pl
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ sub rulefetch {
if (!$Quiet
&& $rule_file !~ /IPBLOCKLIST/
&& $oinkcode =~ /RULEFILE/);
print "IP Blacklist download of $base_url....\n"
print "IP Blocklist download of $base_url....\n"
if (!$Quiet
&& $rule_file =~ /IPBLOCKLIST/
&& $oinkcode !~ /RULEFILE/);
Expand Down Expand Up @@ -1313,23 +1313,23 @@ sub blocklist_write {
}

if ($blver != $ver) {
print "Writing Blacklist File $path....\n" if !$Quiet;
print "Writing Blocklist File $path....\n" if !$Quiet;
open(FH, '>', $path)
|| croak("Unable to open $path for writing! - $!\n");
foreach (sort keys %$href) {
print FH "$_\n";
}
close(FH);

print "Writing Blacklist Version $ver to $blv....\n" if !$Quiet;
print "Writing Blocklist Version $ver to $blv....\n" if !$Quiet;
open(FH, '>', $blv)
|| croak("Unable to open $blv for writing! - $!\n");
print FH $ver;
close(FH);
return (1);
}
else {
print "Blacklist version is unchanged, not updating!\n" if !$Quiet;
print "Blocklist version is unchanged, not updating!\n" if !$Quiet;
return (0);
}

Expand Down Expand Up @@ -1550,9 +1550,9 @@ sub changelog {
}
else { print WRITE "\nNo Rule Changes\n"; }
if ($bmatch) {
print WRITE "\nIP Blacklist Stats\n\tTotal IPs:-----$ips\n" if $ips;
print WRITE "\nIP Blocklist Stats\n\tTotal IPs:-----$ips\n" if $ips;
}
else { print WRITE "\nNo IP Blacklist Changes\n"; }
else { print WRITE "\nNo IP Blocklist Changes\n"; }
print WRITE "\n-=End Changes Logged for " . gmtime(time) . " GMT=-\n";
close(WRITE);

Expand All @@ -1569,9 +1569,9 @@ sub changelog {
}
else { print "\nNo Rule Changes\n"; }
if ($bmatch) {
print "\nIP Blacklist Stats...\n\tTotal IPs:-----$ips\n" if $ips;
print "\nIP Blocklist Stats...\n\tTotal IPs:-----$ips\n" if $ips;
}
else { print "\nNo IP Blacklist Changes\n"; }
else { print "\nNo IP Blocklist Changes\n"; }
print "\nDone\n";
print "Please review $sid_changelog for additional details\n"
if $sid_changelog;
Expand Down

0 comments on commit b42118f

Please sign in to comment.