#!/usr/bin/perl -w # This script takes advantage of the fact that many sites now have pages # displaying links of how people reached their site (the referer field captured # from visitors browsers.) Rootsecure.net also does this. # Note: You also need the file [sitelist.txt] in the same directory # containing the list of websites on separate lines. # To exploit this fact, compile a list of websites doing this, and put # it in the sitelist txt file. Then set the $ref_field variable to be the site # you wish to promote, and run the Perl script, either on the command line or # via web server with Perl installed. # [sitelist.txt] # http://www.domain_name1.com # http://www.domain_name2.com/ # http://www.domain_name3.com #######Set Variables################# $data_file = "sitelist.txt"; # $ref_field = "www.spoofed.com"; # ##################################### print "Content-Type: text/html\n\n"; ##################################### ###Read date from file open(DAT, $data_file) || die("Error opening data file \"$data_file\""); @raw_data=; close(DAT); foreach $line (@raw_data) { chop($line); my $url = "$line"; use LWP::UserAgent; use HTTP::Request::Common qw(GET POST); my $agent = LWP::UserAgent->new; my $req = GET $url, Referer => "http:\/\/$ref_field\/"; # Hash out the line below if you dont wish to see all the web pages. print $agent->request($req)->as_string; }