Script to spoof friends pages and toplists, works good with double entry lists, perfect for productivity based lists,
loves session time cookies



Why?
Bigger is not always better.


I do not like people rate other people based
on traffic that they sent.
Webmasters, the top link on your friends list is not always
your best friend.
I know people can misuse this script
(trick is that you'll need good proxy list and I'm not telling you how to build one)
I publish it to encourage people to think about websites
that they build, to think about surfers bookmarking good sites,
to think that WEB SITE MAKES TRAFFIC in long term
and not REVERSE. 
Euro.



#!/bin/perl

# data files, see samples below
$cookfile = "/tmp/lwpcookies.txt"; # where cookies live
$proxyfile= "proxy.dat"; # your proxylist
$browsers = "browsers"; # broser list
$proxyprog = "/home/sites/home/euro/progs/proxycheck"; # proggy to double check proxy (optional)
$referer1 = "http://www.yourname.com/friends/index.html"; # where you send traffic from
$friendslinks = "friends"; # list of out urls

use Getopt::Long qw(GetOptions);
use URI::URL;
use LWP::MediaTypes qw(media_suffix);
use HTML::Entities ();
use HTTP::Cookies;
use HTML::LinkExtor;
use HTTP::Headers;
use HTTP::Message;
require LWP::UserAgent;

open (DATA, $proxyfile);
@proxies = <DATA>;
close (DATA);

push (@temp, splice (@proxies, rand (@proxies), 1))
while @proxies;
@proxies = @temp;
$found = 0;
foreach (@proxies) {
chop;
($ip, $port) = split (/:/, $_);
$i = system ("$proxyprog $ip $port");
$i += 0;
if ($i == 256) {
$found = 1;
last;
}
}

if ($found == 0) {
exit;
}

open (DATA, $browsers);
@browsers = <DATA>;
close (DATA);
chop(@browsers);
$agent = splice (@browsers, rand (@browsers), 1);

$proxy = "http://$ip:$port";
print "Using $proxy, \"$agent\" \n";

open (DATA, $friendslinks);
@urls = <DATA>;
close (DATA);
chop(@urls);

my $ua = new LWP::UserAgent;
$ua->agent($agent);
$ua->requests_redirectable (['GET']);
$ua->cookie_jar(HTTP::Cookies->new(file => $cookfile ,autosave => 1, ignore_discard => 1));
$ua->proxy (['http'], $proxy);

sub GetLinks {
($tag, %attr) = @_;
return if $tag ne 'a';
push(@links, values %attr);
}

$pp = HTML::LinkExtor->new(\&GetLinks);

foreach $url (@urls) {
@links = ();
$req = new HTTP::Request GET => $url;
$req->header ('Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, */*');
$req->header ('Accept-Language: en');
$req->header ('Accept-Encoding: gzip, deflate');
$req->header ('Connection: Keep-Alive');
$req->referer(sprintf ("%s", $referer1);
$res = $ua->request($req, sub {$pp->parse($_[0])});

$base = $res->base;
$r = $res->request;
$referer = $r -> uri;
@links = map { $_ = url($_, $base)->abs; } @links;

foreach $url (@links) {
if ($url =~ 'cgi' || $$url =~ '\.pl' || $url =~ "\.php") {
$req = new HTTP::Request GET => $url;
$req->header ('Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, */*');
$req->header ('Accept-Language: en');
$req->header ('Accept-Encoding: gzip, deflate');
$req->header ('Connection: Keep-Alive');
$req->referer(sprintf ("%s", $referer));
$res = $ua->request($req);
}
}

}

----------------------------------------------


$proxyfile
---------------------------------
141.35.250.52:80
162.114.211.139:80
194.168.148.28:8080
---------------------------------


$browsers, I machine generated it bassed on real life browser stats - see how it is
used in script and you'll figure out how to create it.
--------------------------------
Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)
Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)
Mozilla/4.5 [en] (WinNT; I)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Mozilla/4.5 [en] (WinNT; I)
Mozilla/4.5 [en] (WinNT; I)
Mozilla/4.5 [en] (WinNT; I)
Mozilla/4.5 [en] (WinNT; I)
Mozilla/4.5 [en] (WinNT; I)
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt)
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; OneVoiceTech)
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; OneVoiceTech)
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
-------------------------------

$proxyprog check proxy on ip/port proggie, to double check proxy before using. Write it yourself.


$friendslinks, mainly list of outs fro your toplist, or just bunch of links.
script will do all refirects, if needed.
-------------------------------
http://www.yoursite.com/cgi-bin/friends/out.cgi?ranks
http://www.yoursite.com/cgi-bin/friends/out.cgi?booti
http://www.yoursite.com/cgi-bin/friends/out.cgi?famous
http://www.yoursite.com/cgi-bin/friends/out.cgi?natural
http://www.yoursite.com/cgi-bin/friends/out.cgi?picswing
http://www.yoursite.com/cgi-bin/friends/out.cgi?bbwanne
http://www.yoursite.com/cgi-bin/friends/out.cgi?lovely
http://www.yoursite.com/cgi-bin/friends/out.cgi?jendd123
http://www.yoursite.com/cgi-bin/friends/out.cgi?biker
http://www.yoursite.com/cgi-bin/friends/out.cgi?tagroup
http://www.yoursite.com/cgi-bin/friends/out.cgi?carol
http://www.yoursite.com/cgi-bin/friends/out.cgi?gbang
http://www.yoursite.com/cgi-bin/friends/out.cgi?erotica
http://www.yoursite.com/cgi-bin/friends/out.cgi?Zeke01
http://www.yoursite.com/cgi-bin/friends/out.cgi?bjqueens
http://www.yoursite.com/cgi-bin/friends/out.cgi?pickared
http://www.yoursite.com/cgi-bin/friends/out.cgi?shancam
http://www.yoursite.com/cgi-bin/friends/out.cgi?vixen
http://www.yoursite.com/cgi-bin/friends/out.cgi?topdars
http://www.yoursite.com/cgi-bin/friends/out.cgi?topdars
http://www.yoursite.com/cgi-bin/friends/out.cgi?camri
http://www.yoursite.com/cgi-bin/friends/out.cgi?bigdee
http://www.yoursite.com/cgi-bin/friends/out.cgi?MLizz
http://www.yoursite.com/cgi-bin/friends/out.cgi?over30
http://www.yoursite.com/cgi-bin/friends/out.cgi?ammag
http://www.yoursite.com/cgi-bin/friends/out.cgi?crack
http://www.yoursite.com/cgi-bin/friends/out.cgi?brandy
http://www.yoursite.com/cgi-bin/friends/out.cgi?taraexp
http://www.yoursite.com/cgi-bin/friends/out.cgi?nekkid
http://www.yoursite.com/cgi-bin/friends/out.cgi?sarab
http://www.yoursite.com/cgi-bin/friends/out.cgi?Robin666
http://www.yoursite.com/cgi-bin/friends/out.cgi?queeny
http://www.yoursite.com/cgi-bin/friends/out.cgi?facial
http://www.yoursite.com/cgi-bin/friends/out.cgi?alanna
http://www.yoursite.com/cgi-bin/friends/out.cgi?melissa
http://www.yoursite.com/cgi-bin/friends/out.cgi?djnik
http://www.yoursite.com/cgi-bin/friends/out.cgi?shotgun
------------------------------