# HG changeset patch # User Matti Hamalainen # Date 1250556436 -10800 # Node ID bac5931b831255f70d77672f4284d4d142b59d63 # Parent 8df5d52436a18e7a7a407ad8b352fdb91b7ada96 Cleanups. diff -r 8df5d52436a1 -r bac5931b8312 example.css --- a/example.css Tue Aug 18 03:38:31 2009 +0300 +++ b/example.css Tue Aug 18 03:47:16 2009 +0300 @@ -51,10 +51,15 @@ } table td { + padding: 2px; font-size: 8pt; } -table.global .blocked, table.ignored .blocked { +table.global .filtered, table.ignored .filtered { background: #400; color: red; } + +table.filtered tr:hover td { + background: black; +} diff -r 8df5d52436a1 -r bac5931b8312 maltfilter --- a/maltfilter Tue Aug 18 03:38:31 2009 +0300 +++ b/maltfilter Tue Aug 18 03:47:16 2009 +0300 @@ -313,7 +313,7 @@ ); foreach my $mip (sort { $func->($table, $a, $b) } keys %{$keys}) { - my $blocked = defined($filterlist{$mip}) ? "blocked" : "unblocked"; + my $blocked = defined($filterlist{$mip}) ? "filtered" : "unfiltered"; printElem($m, $f, " "); printTD($m, $f, sprintf(bb($m)."%-10d".eb($m), $table->{$mip}{"hits"})); printElem(!$m, $f, " | "); @@ -388,7 +388,7 @@ my @ncolor = (0, 0); my $printEntry = sub { - my $blocked = "class=\"".(defined($filterlist{$_[0]}) ? "blocked" : "unblocked")."\""; + my $blocked = "class=\"".(defined($filterlist{$_[0]}) ? "filtered" : "unfiltered")."\""; if (test_ips($previp[$_[1]], $_[0]) < 3) { $ncolor[$_[1]]++; } @@ -489,15 +489,17 @@ ($reportmode ? "complete logfile scan" : "a period of last $period").".\n"); printP($m, $f, "The hit classes marked as 'IPTABLES' are a pseudo-class meaning an\n". - "blocked IP that was in Netfilter before Maltfilter was started.\n"); + "filtered IP that was in Netfilter before Maltfilter was started.\n"); - printH($m, $f, 2, "Currently filtered entries"); - $period = get_period($settings{"FILTER_MAX_AGE"}); - printP($m, $f, "List of IPs that are currently filtered (or would be, if this is\n". - "a report-only mode). Data from period of $period.\n"); - print_table1($m, $f, \%statlist, \%filterlist, \&cmp_hits, "blocked"); + if ($settings{"FILTER"} > 0) { + printH($m, $f, 2, "Currently filtered entries"); + $period = get_period($settings{"FILTER_MAX_AGE"}); + printP($m, $f, "List of IPs that are currently filtered (or would be, if this is\n". + "a report-only mode). Data from period of $period.\n"); + print_table1($m, $f, \%statlist, \%filterlist, \&cmp_hits, "filtered"); + } - printH($m, $f, 2, "Summary of non-ignored entries"); + printH($m, $f, 2, "Summary of entries"); printP($m, $f, "List of 'hits' of suspicious activity noticed by Maltfilter, but not\n". "necessarily acted upon. Sorted by descending IP address.\n"); print_table2($m, $f, \%statlist, \%statlist, \&cmp_ips, "global");