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 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; |
You could probably just hardcode it to vote "No" and run it via cron.
That would, of course, be undemocratic :-/
But I notice that the percentages on the "Should we use BCE/CE instead of BC/AD?" poll have gone from 9%/91% to 24%/76% in the last hour or so. I wonder what they'll say in the morning whistles innocently
I was thinking of it more as "choosing sensible defaults". :-)
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
Not that I'd encourage anyone to do anything as dishonest as faking votes on an online poll.