Fake Adsense

Published 2006-03-03, 23:52

Wirklich interessant was man so alles auf der Festplatte hat. Die Datei ist von Januar 2004 und nannte sich „fake-adsense.txt“. Ich bezweifle dass es jemals funktioniert hat…

#!/usr/bin/perl
#
# grab ad sensation – gas.pl
# version 1.01
#
# This software is PUBLIC DOMAIN. You may copy it, use it, burn it, insert
# it nasally, take it and sell it as your own, feed it to goats, or whatever.
# No restrictions whatsoever. Also, this software comes with NO WARRANTY,
# as it is UNLICENSED and IN THE PUBLIC DOMAIN. If you hurt yourself or your
# data with it, that’s more or less like you picked up a BIG ROCK off of the
# street and HIT YOURSELF IN THE HEAD WITH IT repeatedly like a COMPLETE
# and TOTAL RETARD.
#
# …Anyway, have fun.
#
# Oh, and don’t actually use this. That would be silly.

use strict;
use LWP::UserAgent;

#http://pagead2.googlesyndication.com/pagead/ads?client=ca-sourceforge_120x600&random=1060329231603&hl=en&adsafe=high&format=120×600&output=html&url=http%3A//sourceforge.net/

my $google_page_url = ‚http%3A//sourceforge.net/‘;
my $google_page = ‚http://sourceforge.net/‘;
my $google_ad_client = ’sourceforge_120x600′;
my $google_ad_width = 120;
my $google_ad_height = 600;
my $google_ad_language = „en“;

my $seconds_delay = 40;
my $seconds_delay_variance = 10;

#
#
#

my $google_ad_base = ‚http://pagead.googlesyndication.com‘;

# this maybe should actually parse this javascript at some point in the future
my $google_js_url = ‚http://pagead.googlesyndication.com/ca/show_ads.js‘;

my $google_ad_url = ‚http://pagead2.googlesyndication.com/pagead/ads?client=ca-‚ . $google_ad_client . ‚&format=‘ . $google_ad_width . „x“ . $google_ad_height . ‚&random=‘ . time() . ‚&hl=‘ . $google_ad_language . ‚&url=‘ . $google_page_url . ‚&adsafe=high&output=html‘;

#print $google_ad_url . „\n“;
my @agentlist = (‚Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4; MultiZilla v1.4.0.4A) Gecko/20030624‘,
‚Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030504 Mozilla Firebird/0.5+ StumbleUpon/1.63‘,
‚Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2) Gecko/20021126‘,
‚Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312‘,
‚Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2) Gecko/20021126‘,
‚Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020910‘,
‚Mozilla/5.0 (X11; U; Linux 2.4.3-20mdk i586; en-US; rv:0.9.1) Gecko/20010611‘,
‚Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)‘,
‚Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)‘,
‚Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)‘,
‚Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC)‘,
‚Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)‘,
‚Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)‘,
‚Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)‘,
‚Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; .NET CLR 1.0.2914)‘,
‚Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)‘,
‚Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)‘,
‚Mozilla/4.0 (compatible; MSIE 5.13; Mac_PowerPC)‘,
‚Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; BCD2000)‘,
‚Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; e504460WanadooNL)‘,
‚Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240×320)‘,
‚Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02‘,
‚Mozilla/5.0 (Windows; U; WinNT4.0; en-CA; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1‘,
‚Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1‘,
‚Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2‘,
‚Mozilla/5.0 (X11; U; FreeBSD 5.0 i686)‘,
‚Mozilla/4.77 [en] (Win95; U)‘,
‚Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.02 Bork-edition [en]‘,
‚Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 4.0) Opera 7.0 [en]‘,
‚Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.0 [en]‘,
);

sub reagent {
return $agentlist[rand(@agentlist)];
}

my $ua = LWP::UserAgent->new;
push @{ $ua->requests_redirectable }, ‚POST‘;
$ua->timeout(10);

my $thisagent;
my $response;
my $theseads;

while (1) {
my $adcount = 0;
$thisagent = reagent();
$ua->agent($thisagent);

#$response = $ua->get($google_js_url, Referer => $google_page);
# if ($response->is_success) {
# } else {
# print $response->error_as_HTML;
# }

$response = $ua->get($google_ad_url, Referer => $google_page);
if ($response->is_success) {
} else {
print $response->error_as_HTML;
}

$theseads = $response->content;
while ($theseads =~ /href=“(\S*?)“/g) {
my $response = $ua->get($1, Referer => $google_page);
if ($response->is_success) {
#print „Got ad from $1\n“;
$adcount++;
print „#“;
} else {
print „failed to get ad from $1\n“;
print $response->error_as_HTML;
}
}
print “ $adcount\n“;
sleep ($seconds_delay – $seconds_delay_variance + rand(2*$seconds_delay_variance));
}

Topic(s): Kram No comments - :(

Diskussion zum Artikel

» Selbst kommentieren

  1. Zum Artikel Fake Adsense sind noch keine Kommentare vorhanden. Deine Meinung wäre jedoch willkommen!

Selbst kommentieren

Trackback-URI, Kommentarfeed. XML-Feed





14 queries. 0,099 seconds.