From 6ebd214a5ff027266f1582bf749aa639cf59b8f0 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 3 Sep 2002 17:14:27 +0000 Subject: Make ping/request time more random. Encrypt pings (symmetrically), so that dup detection of some remailers (austria) fails and pings get processed. --- Echolot/Conf.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Echolot/Conf.pm') diff --git a/Echolot/Conf.pm b/Echolot/Conf.pm index b426b47..63e2c88 100644 --- a/Echolot/Conf.pm +++ b/Echolot/Conf.pm @@ -1,7 +1,7 @@ package Echolot::Conf; # (c) 2002 Peter Palfrader -# $Id: Conf.pm,v 1.27 2002/08/23 07:17:23 weasel Exp $ +# $Id: Conf.pm,v 1.28 2002/09/03 17:14:26 weasel Exp $ # =pod @@ -45,8 +45,9 @@ sub send_requests($;$) { my $call_intervall = Echolot::Config::get()->{'getkeyconf_interval'}; my $send_every_n_calls = Echolot::Config::get()->{'getkeyconf_every_nth_time'}; - my $timemod = ($scheduled_for / $call_intervall); + my $timemod = int ($scheduled_for / $call_intervall); my $this_call_id = $timemod % $send_every_n_calls; + my $session_id = int ($scheduled_for / ($call_intervall * $send_every_n_calls)); Echolot::Globals::get()->{'storage'}->delay_commit(); @@ -65,7 +66,7 @@ sub send_requests($;$) { next unless ( $which eq $address || $which eq 'all' || - (($which eq '') && ($this_call_id == (Echolot::Tools::makeShortNumHash($address.$type) % $send_every_n_calls)))); + (($which eq '') && ($this_call_id == (Echolot::Tools::makeShortNumHash($address.$type.$session_id) % $send_every_n_calls)))); print "Sending $type requests to ".$address."\n" if Echolot::Config::get()->{'verbose'}; -- cgit v1.2.3