diff options
-rw-r--r-- | Echolot/Config.pm | 4 | ||||
-rw-r--r-- | Echolot/Stats.pm | 113 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | pingd.conf | 1 | ||||
-rw-r--r-- | templates/clist.html | 66 | ||||
-rw-r--r-- | templates/mlist.html | 6 | ||||
-rw-r--r-- | templates/mlist2.html | 6 | ||||
-rw-r--r-- | templates/rlist-clear.html | 6 | ||||
-rw-r--r-- | templates/rlist-dsa.html | 6 | ||||
-rw-r--r-- | templates/rlist-rsa.html | 6 | ||||
-rw-r--r-- | templates/rlist.html | 6 | ||||
-rw-r--r-- | templates/rlist2-clear.html | 6 | ||||
-rw-r--r-- | templates/rlist2-dsa.html | 6 | ||||
-rw-r--r-- | templates/rlist2-rsa.html | 6 | ||||
-rw-r--r-- | templates/rlist2.html | 6 |
15 files changed, 226 insertions, 19 deletions
diff --git a/Echolot/Config.pm b/Echolot/Config.pm index 8761631..4d2f07a 100644 --- a/Echolot/Config.pm +++ b/Echolot/Config.pm @@ -1,7 +1,7 @@ package Echolot::Config; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Config.pm,v 1.20 2002/07/10 17:16:45 weasel Exp $ +# $Id: Config.pm,v 1.21 2002/07/10 17:58:05 weasel Exp $ # =pod @@ -70,6 +70,7 @@ sub init($) { show_new => 1, seperate_rlists => 0, + combined_list => 0, thesaurus => 1, processmail => 60, # process incomng mail every minute @@ -123,6 +124,7 @@ sub init($) { 'rlist2-rsa' => 'templates/rlist2-rsa.html', 'rlist2-dsa' => 'templates/rlist2-dsa.html', 'rlist2-clear' => 'templates/rlist2-clear.html', + 'clist' => 'templates/clist.html', }, homedir => undef, diff --git a/Echolot/Stats.pm b/Echolot/Stats.pm index 438c07e..2a4f45b 100644 --- a/Echolot/Stats.pm +++ b/Echolot/Stats.pm @@ -1,7 +1,7 @@ package Echolot::Stats; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Stats.pm,v 1.13 2002/07/10 17:16:45 weasel Exp $ +# $Id: Stats.pm,v 1.14 2002/07/10 17:58:05 weasel Exp $ # =pod @@ -271,11 +271,13 @@ sub write_file($$;$) { my $template = HTML::Template->new( filename => $html_template, + strict => 0, global_vars => 1 ); $template->param ( list => $output ); $template->param ( CURRENT_TIMESTAMP => scalar gmtime() ); $template->param ( SITE_NAME => Echolot::Config::get()->{'sitename'} ); $template->param ( seperate_rlist => Echolot::Config::get()->{'seperate_rlists'} ); + $template->param ( combined_list => Echolot::Config::get()->{'combined_list'} ); $filename = $filebasename.'.html'; open(F, '>'.$filename) or @@ -378,6 +380,53 @@ sub build_list2($$;$) { return 1; }; +sub build_clist($$;$) { + my ($remhash, $filebasename, $html_template) = @_; + + my $output = ''; + + $output .= sprintf "Stats-Version: 2.0.1\n"; + $output .= sprintf "Generated: %s\n", makeDate(); + $output .= sprintf "Mixmaster Latent-Hist Latent Uptime-Hist Uptime Options Type\n"; + $output .= sprintf "------------------------------------------------------------------------------------\n"; + + my $all; + for my $type (keys %$remhash) { + for my $remailer (@{$remhash->{$type}}) { + $all->{ $remailer->{'nick'} }->{$type} = $remailer + }; + }; + + for my $nick (sort {$a cmp $b} keys %$all) { + for my $type (sort {$a cmp $b} keys %{$all->{$nick}}) { + $output .= sprintf "%-12s %-12s %6s %-12s %5.1f%% %s %s\n", + $nick, + build_list2_latencystr($all->{$nick}->{$type}->{'stats'}->{'latency_day'}), + makeMinHr($all->{$nick}->{$type}->{'stats'}->{'avr_latency'}, 0), + build_list2_reliabilitystr($all->{$nick}->{$type}->{'stats'}->{'reliability_day'}), + $all->{$nick}->{$type}->{'stats'}->{'avr_reliability'} * 100, + build_list2_capsstr($all->{$nick}->{$type}->{'caps'}), + $type; + }; + }; + + #$output .= sprintf "Groups of remailers sharing a machine or operator:\n\n"; + #$output .= sprintf "Broken type-I remailer chains:\n\n"; + #$output .= sprintf "Broken type-II remailer chains:\n\n"; + + $output .= sprintf "\n\n\nRemailer-Capabilities:\n\n"; + for my $nick (sort {$a cmp $b} keys %$all) { + for my $type (keys %{$all->{$nick}}) { + $output .= $all->{$nick}->{$type}->{'caps'}."\n", last if defined $all->{$nick}->{$type}->{'caps'}; + }; + } + + write_file($filebasename, $html_template, $output) or + cluck("writefile failed"), + return 0; + return 1; +}; + sub build_rems($) { my ($types) = @_; @@ -413,42 +462,70 @@ sub build_rems($) { sub build_lists() { - my $rems = build_rems(['mix']); + my $clist; + my $pubclist; + my $rems; + my $pubrems; + $rems = build_rems(['mix']); + @$pubrems = grep { $_->{'showit'} } @$rems; build_mlist1( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'mlist'); build_list2( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'mlist2'); - @$rems = grep { $_->{'showit'} } @$rems; - build_mlist1( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'mlist', Echolot::Config::get()->{'templates'}->{'mlist'}); - build_list2( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'mlist2', Echolot::Config::get()->{'templates'}->{'mlist2'}); + build_mlist1( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'mlist', Echolot::Config::get()->{'templates'}->{'mlist'}); + build_list2( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'mlist2', Echolot::Config::get()->{'templates'}->{'mlist2'}); + if (Echolot::Config::get()->{'combined_list'}) { + $clist->{'mix'} = $rems; + $pubclist->{'mix'} = $pubrems; + }; $rems = build_rems(['cpunk-rsa', 'cpunk-dsa', 'cpunk-clear']); + @$pubrems = grep { $_->{'showit'} } @$rems; build_rlist1( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist'); build_list2( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist2'); - @$rems = grep { $_->{'showit'} } @$rems; - build_rlist1( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist', Echolot::Config::get()->{'templates'}->{'rlist'}); - build_list2( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2', Echolot::Config::get()->{'templates'}->{'rlist2'}); + build_rlist1( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist', Echolot::Config::get()->{'templates'}->{'rlist'}); + build_list2( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2', Echolot::Config::get()->{'templates'}->{'rlist2'}); + if (Echolot::Config::get()->{'combined_list'} && ! Echolot::Config::get()->{'seperate_rlists'}) { + $clist->{'cpunk'} = $rems; + $pubclist->{'cpunk'} = $pubrems; + }; if (Echolot::Config::get()->{'seperate_rlists'}) { $rems = build_rems(['cpunk-rsa']); + @$pubrems = grep { $_->{'showit'} } @$rems; build_rlist1( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist-rsa', Echolot::Config::get()->{'templates'}->{'rlist-rsa'}); build_list2( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist2-rsa', Echolot::Config::get()->{'templates'}->{'rlist2-rsa'}); - @$rems = grep { $_->{'showit'} } @$rems; - build_rlist1( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist-rsa', Echolot::Config::get()->{'templates'}->{'rlist-rsa'}); - build_list2( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2-rsa', Echolot::Config::get()->{'templates'}->{'rlist2-rsa'}); + build_rlist1( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist-rsa', Echolot::Config::get()->{'templates'}->{'rlist-rsa'}); + build_list2( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2-rsa', Echolot::Config::get()->{'templates'}->{'rlist2-rsa'}); + if (Echolot::Config::get()->{'combined_list'}) { + $clist->{'cpunk-rsa'} = $rems; + $pubclist->{'cpunk-rsa'} = $pubrems; + }; $rems = build_rems(['cpunk-dsa']); + @$pubrems = grep { $_->{'showit'} } @$rems; build_rlist1( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist-dsa', Echolot::Config::get()->{'templates'}->{'rlist-dsa'}); build_list2( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist2-dsa', Echolot::Config::get()->{'templates'}->{'rlist2-dsa'}); - @$rems = grep { $_->{'showit'} } @$rems; - build_rlist1( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist-dsa', Echolot::Config::get()->{'templates'}->{'rlist-dsa'}); - build_list2( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2-dsa', Echolot::Config::get()->{'templates'}->{'rlist2-dsa'}); + build_rlist1( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist-dsa', Echolot::Config::get()->{'templates'}->{'rlist-dsa'}); + build_list2( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2-dsa', Echolot::Config::get()->{'templates'}->{'rlist2-dsa'}); + if (Echolot::Config::get()->{'combined_list'}) { + $clist->{'cpunk-dsa'} = $rems; + $pubclist->{'cpunk-dsa'} = $pubrems; + }; $rems = build_rems(['cpunk-clear']); + @$pubrems = grep { $_->{'showit'} } @$rems; build_rlist1( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist-clear', Echolot::Config::get()->{'templates'}->{'rlist-clear'}); build_list2( $rems, Echolot::Config::get()->{'private_resultdir'}.'/'.'rlist2-clear', Echolot::Config::get()->{'templates'}->{'rlist2-clear'}); - @$rems = grep { $_->{'showit'} } @$rems; - build_rlist1( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist-clear', Echolot::Config::get()->{'templates'}->{'rlist-clear'}); - build_list2( $rems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2-clear', Echolot::Config::get()->{'templates'}->{'rlist2-clear'}); - } + build_rlist1( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist-clear', Echolot::Config::get()->{'templates'}->{'rlist-clear'}); + build_list2( $pubrems, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2-clear', Echolot::Config::get()->{'templates'}->{'rlist2-clear'}); + if (Echolot::Config::get()->{'combined_list'}) { + $clist->{'cpunk-clear'} = $rems; + $pubclist->{'cpunk-clear'} = $pubrems; + }; + }; + if (Echolot::Config::get()->{'combined_list'}) { + build_clist( $clist, Echolot::Config::get()->{'private_resultdir'}.'/'.'clist', Echolot::Config::get()->{'templates'}->{'clist'}); + build_clist( $pubclist, Echolot::Config::get()->{'resultdir'}.'/'.'clist', Echolot::Config::get()->{'templates'}->{'clist'}); + }; }; @@ -5,6 +5,7 @@ Changes in to keep the data. * Seperate rlists for rsa, dsa and plaintext pings are supported now. Enable seperate_rlists in pingd.conf. + * Have a combined list. Enable with combined_list in pingd.conf. Changes in version 2.0 beta4 - 2002-07-10 * Minor documentation fixes @@ -13,4 +13,5 @@ $CONFIG = { }, 'seperate_rlists' => 0, + 'combined_list' => 0, }; diff --git a/templates/clist.html b/templates/clist.html new file mode 100644 index 0000000..399ed62 --- /dev/null +++ b/templates/clist.html @@ -0,0 +1,66 @@ +<html> +<head> + <title>Thesaurus [<TMPL_VAR NAME="SITE_NAME">]</title> +</head> +<body> +<h1>Remailer Reliability Stats [<TMPL_VAR NAME="SITE_NAME">]</h1> + +<h2>Remailers (combined list)</h2> + +<p> +This is an automatically generated list of remailer reliability +statistics. + +<p> +Available Stats: +<table border=1> +<tr> +<TMPL_IF NAME="seperate_rlist"> + <th colspan=4>Cypherpunk (Type I)</th> +<TMPL_ELSE> + <th>Cypherpunk (Type I)</th> +</TMPL_IF> + <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> +</tr> +<tr> + <td><a href="rlist.html">v1</a></td> +<TMPL_IF NAME="seperate_rlist"> + <td><a href="rlist-rsa.html">(rsa)</a></td> + <td><a href="rlist-dsa.html">(dsa)</a></td> + <td><a href="rlist-clear.html">(cleartext)</a></td> +</TMPL_IF> + <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><strong>V2</strong></td> +</TMPL_IF> +</tr> +<tr> + <td><a href="rlist2.html">v2</a></td> +<TMPL_IF NAME="seperate_rlist"> + <td><a href="rlist2-rsa.html">(rsa)</a></td> + <td><a href="rlist2-dsa.html">(dsa)</a></td> + <td><a href="rlist2-clear.html">(cleartext)</a></td> +</TMPL_IF> + <td><a href="mlist2.html">v2</a></td> +</tr> +</table> + +<p> +<a HREF="./">Up</a> + +<p> +<pre> +<TMPL_VAR NAME="list"> +</pre> + +<hr> +Created by <a href="http://savannah.gnu.org/projects/echolot/">Echolot</a>.<br> +Last update: <TMPL_VAR NAME="CURRENT_TIMESTAMP">. +</body> + +<!-- vim:set ts=2: --> +<!-- vim:set shiftwidth=2: --> +</html> diff --git a/templates/mlist.html b/templates/mlist.html index 81e7ee3..94e2c8e 100644 --- a/templates/mlist.html +++ b/templates/mlist.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><strong>v1</strong></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/mlist2.html b/templates/mlist2.html index c0345c9..e00096e 100644 --- a/templates/mlist2.html +++ b/templates/mlist2.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist-clear.html b/templates/rlist-clear.html index f0a98a1..9b26226 100644 --- a/templates/rlist-clear.html +++ b/templates/rlist-clear.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><strong>(cleartext)</strong></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist-dsa.html b/templates/rlist-dsa.html index e2f3a7c..f3cb506 100644 --- a/templates/rlist-dsa.html +++ b/templates/rlist-dsa.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist-rsa.html b/templates/rlist-rsa.html index 6bceedb..d223233 100644 --- a/templates/rlist-rsa.html +++ b/templates/rlist-rsa.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist.html b/templates/rlist.html index 7987736..a9f2ee6 100644 --- a/templates/rlist.html +++ b/templates/rlist.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><strong>v1</strong></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist2-clear.html b/templates/rlist2-clear.html index 11dd3ff..cd6d895 100644 --- a/templates/rlist2-clear.html +++ b/templates/rlist2-clear.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist2-dsa.html b/templates/rlist2-dsa.html index 7b60c44..ad30626 100644 --- a/templates/rlist2-dsa.html +++ b/templates/rlist2-dsa.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist2-rsa.html b/templates/rlist2-rsa.html index cdb4650..5f8ffcd 100644 --- a/templates/rlist2-rsa.html +++ b/templates/rlist2-rsa.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><a href="rlist2.html">v2</a></td> diff --git a/templates/rlist2.html b/templates/rlist2.html index df1689f..69ed099 100644 --- a/templates/rlist2.html +++ b/templates/rlist2.html @@ -21,6 +21,9 @@ Available Stats: <th>Cypherpunk (Type I)</th> </TMPL_IF> <th>Mixmaster (Type II)</th> +<TMPL_IF NAME="combined_list"> + <th>Combined</th> +</TMPL_IF> </tr> <tr> <td><a href="rlist.html">v1</a></td> @@ -30,6 +33,9 @@ Available Stats: <td><a href="rlist-clear.html">(cleartext)</a></td> </TMPL_IF> <td><a href="mlist.html">v1</a></td> +<TMPL_IF NAME="combined_list"> + <td rowspan=2><a href="clist.html">V2</a></td> +</TMPL_IF> </tr> <tr> <td><strong>v2</strong></td> |