# HG changeset patch # User Matti Hamalainen # Date 1252264042 -10800 # Node ID df68cf1eaf3936d8c485bd1f93beae35ad07c739 # Parent 8835840a51abda4631766b9166edcfd520b8e736# Parent 1cbefe9c26c18b08c0cbe39423435736dd17cefb Merged? diff -r 1cbefe9c26c1 -r df68cf1eaf39 .hgtags --- a/.hgtags Tue Sep 01 18:48:47 2009 +0300 +++ b/.hgtags Sun Sep 06 22:07:22 2009 +0300 @@ -19,3 +19,4 @@ 55670dabda5a4dddf4d7c02ca025f72037dd754d maltfilter-0.19.2 b1f9df8bb0843e00d26c0fe79454f0ad2b83c4e7 maltfilter-0.19.3 53a076bc75db2bda72f20cec629876e8c3da0cbf maltfilter-0.19.4 +075b2b626d174fcf479250e6ac824e18ec00a61d maltfilter-0.20.0 diff -r 1cbefe9c26c1 -r df68cf1eaf39 README --- a/README Tue Sep 01 18:48:47 2009 +0300 +++ b/README Sun Sep 06 22:07:22 2009 +0300 @@ -1,4 +1,4 @@ -Malicious Attack Livid Termination Filter daemon (maltfilter) v0.19.4 +Malicious Attack Livid Termination Filter daemon (maltfilter) v0.20.0 ===================================================================== Programmed by Matti 'ccr' Hämäläinen (C) Copyright 2009 Tecnic Software productions (TNSP) diff -r 1cbefe9c26c1 -r df68cf1eaf39 maltfilter --- a/maltfilter Tue Sep 01 18:48:47 2009 +0300 +++ b/maltfilter Sun Sep 06 22:07:22 2009 +0300 @@ -13,7 +13,7 @@ use LWP::UserAgent; use IO::Seekable; -my $progversion = "0.19.4"; +my $progversion = "0.20.0"; my $progbanner = "Malicious Attack Livid Termination Filter daemon (maltfilter) v$progversion\n". "Programmed by Matti 'ccr' Hamalainen \n". @@ -340,7 +340,7 @@ if ($class ne "IPTABLES") { if ($reportmode) { my @tmp = reverse(@{$table->{$mip}{"reason"}{$class}{"msg"}}); - if ($#tmp > 5) { $#tmp = 5; } + if (scalar @tmp > 5) { $#tmp = 5; } foreach (@tmp) { $_ = htmlentities($_); } $msgs = join(" ".bb($m)."|".eb($m)." ", @tmp); } else { @@ -539,6 +539,7 @@ { return unless ($settings{"DRONEBL"} > 0); + # If suspended, bail out until it's time to retry if ($dronebl_suspend > 0) { $dronebl_suspend--; return; @@ -636,8 +637,12 @@ my ($mip, $mdate, $mtype) = @_; return unless ($settings{"DRONEBL"} > 0); + + # Check against noaction IPs return if check_hosts_array(\@noaction_ips, $mip); + # If we have the host/IP in "recent memory", and it has been submitted + # or queued already, do not requeue. if (defined($statlist{$mip}) && defined($statlist{$mip}{"dronebl"})) { return if ($statlist{$mip}{"dronebl"} > 0); } @@ -1229,9 +1234,9 @@ # Check if we have anything to do if ($reportmode) { - mdie("Nothing to do, no SCANFILE(s) or SCANFILE_ONCE(s) defined in configuration.\n") unless ($#scanfiles > 0 || $#scanfiles_once > 0); + mdie("Nothing to do, no SCANFILE(s) or SCANFILE_ONCE(s) defined in configuration.\n") unless (scalar @scanfiles > 0 || scalar @scanfiles_once > 0); } else { - mdie("Nothing to do, no SCANFILE(s) defined in configuration.\n") unless ($#scanfiles > 0); + mdie("Nothing to do, no SCANFILE(s) defined in configuration.\n") unless (scalar @scanfiles > 0); } # General settings