From 41724fc58f2ade49e77878d601ec52682859ec14 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 10 Jul 2002 17:58:05 +0000 Subject: Have a combined list --- Echolot/Config.pm | 4 +- Echolot/Stats.pm | 113 +++++++++++++++++++++++++++++++++++++------- NEWS | 1 + pingd.conf | 1 + templates/clist.html | 66 ++++++++++++++++++++++++++ templates/mlist.html | 6 +++ templates/mlist2.html | 6 +++ templates/rlist-clear.html | 6 +++ templates/rlist-dsa.html | 6 +++ templates/rlist-rsa.html | 6 +++ templates/rlist.html | 6 +++ templates/rlist2-clear.html | 6 +++ templates/rlist2-dsa.html | 6 +++ templates/rlist2-rsa.html | 6 +++ templates/rlist2.html | 6 +++ 15 files changed, 226 insertions(+), 19 deletions(-) create mode 100644 templates/clist.html 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 -# $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 -# $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'}); + }; }; diff --git a/NEWS b/NEWS index 6bacbef..f6a006a 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/pingd.conf b/pingd.conf index 31fc381..b164426 100644 --- a/pingd.conf +++ b/pingd.conf @@ -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 @@ + + + Thesaurus [<TMPL_VAR NAME="SITE_NAME">] + + +

Remailer Reliability Stats []

+ +

Remailers (combined list)

+ +

+This is an automatically generated list of remailer reliability +statistics. + +

+Available Stats: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Cypherpunk (Type I)Cypherpunk (Type I)Mixmaster (Type II)Combined
v1(rsa)(dsa)(cleartext)v1V2
v2(rsa)(dsa)(cleartext)v2
+ +

+Up + +

+

+
+
+ +
+Created by Echolot.
+Last update: . + + + + + 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 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: Cypherpunk (Type I) Mixmaster (Type II) + + Combined + v1 @@ -30,6 +33,9 @@ Available Stats: (cleartext) v1 + + V2 + v2 -- cgit v1.2.3