[clug] Sitar@home; Indirectly targeting veri greedy people
Kim Holburn
kim.holburn at anu.edu.au
Thu Sep 25 14:35:16 EST 2003
ooops one more bug.
---------------------------------------randdot ----------------------
#!/usr/bin/perl -w
# (C) Kim Holburn 2003
# released under GNU Public License http://www.gnu.org/copyleft/gpl.html
# script to generate pseudo-random strings and download robots.txt files from
# random websites.
use strict;
sub fail_usage {
my (@mess) = @_;
for (@mess) { print STDERR "$0 Error : $_ \n"; }
print STDERR "Usage : $0 [-h] [-n <chars>] \n";
print STDERR " -h|--help = show this help screen\n";
print STDERR " default number of chars is 20\n";
print STDERR " \n";
exit 1;
}
my @chars=(
"a","b","c","d","e","f","g","h","i","j","k","l","m","n",
"o","p","q","r","s","t","u","v","w","x","y","z","-",
"0","1","2","3","4","5","6","7","8","9",
);
my $number=20;
while ($ARGV=$ARGV[0]) {
if ($ARGV eq "-n") {
shift @ARGV;
if ($#ARGV < 0) { &fail_usage ("no number after -n option"); }
my $n=shift @ARGV;
if ($number =~ /^[0-9]{1,}$/ && $n > 0) { $number = $n; }
} elsif ($ARGV eq "-h" || $ARGV eq "--help") { &fail_usage (); }
elsif ($ARGV =~ /^-/) { &fail_usage ("unknown option \"$ARGV\""); }
else { last; }
}
my $randstring;
while (1) {
for (1..$number) { $randstring .= $chars[int(rand($#chars))]; }
print "wget -O - http://www.$randstring.com/robots.txt\n";
system "wget -O - http://www.$randstring.com/robots.txt";
}
---------------------------------------randdot ----------------------
Kim
--
--
Kim Holburn
Network Consultant - Telecommunications Engineering
Research School of Information Sciences and Engineering
Australian National University - Ph: +61 2 61258620 M: +61 0417820641
Email: kim.holburn at anu.edu.au - PGP Public Key on request
Life is complex - It has real and imaginary parts.
Andrea Leistra (rec.arts.sf.written.Robert-jordan)
More information about the linux
mailing list