Skip to content

Instantly share code, notes, and snippets.

@davorg
Created September 25, 2011 18:03
Show Gist options
  • Save davorg/1240907 to your computer and use it in GitHub Desktop.
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.
#!/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;
@nickgrim
Copy link

I was thinking of it more as "choosing sensible defaults". :-)

@davorg
Copy link
Author

davorg commented Sep 26, 2011

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