1994-01-28 - Random remailing script had. Help.

Header Data

From: nobody@soda.berkeley.edu
To: cypherpunks@toad.com
Message Hash: 24f18242728c8c6418245bb57c8154e731df7d476b73190b6bd32b2dbeb77d7e
Message ID: <199401282007.MAA13906@soda.berkeley.edu>
Reply To: N/A
UTC Datetime: 1994-01-28 20:07:59 UTC
Raw Date: Fri, 28 Jan 94 12:07:59 PST

Raw message

From: nobody@soda.berkeley.edu
Date: Fri, 28 Jan 94 12:07:59 PST
To: cypherpunks@toad.com
Subject: Random remailing script had. Help.
Message-ID: <199401282007.MAA13906@soda.berkeley.edu>
MIME-Version: 1.0
Content-Type: text/plain


Thanks to Alan Barrett who sent me a script to get me started with. I have
two questions still.

1) Why not just $second = rand ($#remailers+1), instead of the two line
   $second routine? (And why did I have to add the +1...).

2) How do I output the variables as csh environmental variables that stick
   around after the perl script has executed? I usually use 'setenv' but perl
   didn't like that.

Here is Alan's script, edited a bit by me:

#!/usr/bin/perl

# given a set of remailers, choose two of them at random.
# repeat this operation five times.
# output the resulting list of 10 remailers.


#
# here's the list of remailers to be considered.
# make it as long or as short as you like. (but no shorter than 2 entries!)
#
@remailers = ("One", "Two", "Three", "Four" , "Five", "Six");

#
# seed the random number generator.
# this is not a strong PRNG!
#
srand(time);

foreach $cycle (1..5) {

    # choose random remailers
    $first = rand($#remailers+1);
    $second = rand($#remailers);
    $second++ if $second >= $first;

    # output the choices
    print $remailers[$first],"->",$remailers[$second],"\n";
}

And a few outputs:

Four->One
One->Six
One->Six
Five->Three
Four->Two

One->Four
One->Five
Six->Four
Five->Two
One->Six

Five->Two
Two->Five
Five->Three
Five->Four
Five->Five

I may have screwed it up, as Alan originally had no +1 in the $first line,
and had -1 in the next line, but it never outputed "Six" then.

Background: One-Six will be addresses of Cypherpunk remailers and I am sending
packages of five e-mails (~40K each) to many people a day. I figured why not
appease you guys by helping with the traffic, but do it randomly and chain
off two remailers per e-mail. I want csh variables though, as output. How do
I get these, or how to I fetch the perl variables for a Unix command line
(I am currently using 'setenv name value' then putting $name into a Unix
command)?

-Xenon
P.S. If you wish to e-mail answers (slow!) use na38138@anon.penet.fi.





Thread