13-Line Shell Script Votes for Mr. Splashy Pants 100s of Times

Sorry, Greenpeace, but apparently you may not have gotten the memo.

Apparently the weblog.greenpeace.org site is written in Rails?!? (Via curl: “Server: Mongrel 1.1″) Surely the method described below does not _actually_ submit 100s of counted votes!?!

Using my super 3r33t h@x0r skills, I spent 2 minutes writing a shell script that votes for our beloved Mr. Splashy Pants X number of times, using curl and a simple for loop!

Now, no doubt Greenpeace can easily stop this madness with a few lines of code on their server, but in the spirit of good fun and edumacation, here is the script:

#!/bin/bash
COUNTER=0
while [  $COUNTER -lt 100 ]; do
    echo Vote num. $COUNTER
    echo “”
    curl -v -d “item_id=65&commit=SUBMIT+MY+VOTE” -e “http://www.greenpeace.org/international/campaigns/oceans/whaling/great-whale-trail/gwt-vote?MM_URL=linkfromsplashblog” -A “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)” http://vote.greenpeace.org/11/12
    echo “”; echo “”
    echo Sleeping…
    sleep 5
    let COUNTER=COUNTER+1
    echo “”
done

Instructions for OS X (or Linux)

Copy and paste the script into a new file called “splashy.sh”. Then run the following:

chmod 755 splashy.sh
./splashy.sh

To adjust the number of times it will run, modify this line:

while [  $COUNTER -lt 100 ]; do

Change “100″ to “50″ or the desired number of votes. There’s also a “sleep 5″ line that you can adjust accordingly.

You might also want to change the User Agent specified to curl (I picked an IE7 default); it’s the “-A” param. Here’s a List of Common User Agents.

Redditors, I know you will be on your best behavior with this script, riiiiight?!?!

Disclaimer: I take no responsibility whatsoever for what you crazy people out there do with this.

5 Responses to “13-Line Shell Script Votes for Mr. Splashy Pants 100s of Times”


  1. 1 Colas Nahaboo Nov 28th, 2007 at 3:13 am

    You know, you can even have people around the world “click” for you at random intervals and with their own (different) IPs…

    Just create an IMG tag with a SRC= to the url-to-click, and put this HTML link into a visited web site (yours, or one allowing user-contributed html)

  2. 2 Shanti Braford Nov 28th, 2007 at 4:00 am

    Hey Colas,

    Yes, these would create http GET requests to the specified image URLs.

    But can you trick a web browser into doing an HTTP POST for you? =)

    Now that would be cool (and evil)!

  3. 3 Colas Nahaboo Nov 28th, 2007 at 4:32 am

    Oops, sorry didnt pay attention enough, of course modern browsers(*) should not be able to be tricked to do a POST (so my hack wont work). I was thinking of a real case that happened some years ago where a local startup set up an “affiliate” scheme where having people “click” on sponsored links (via a GET…) earned real money. They quickly backed off :-)

    (*) I sincerely hope the things like http://timjoh.com/javascript-post-variables-to-forms/
    do not work anymore in modern browsers… or at least are checked to work only inside the same domain

  1. 1 One Line Mr. Splashy Pants Script (Ruby) | On Web Apps Pingback on Nov 28th, 2007 at 4:40 am
  2. 2 Eco-Geekery » Post Topic » What nearly killed Mister Splashy Pants… Pingback on Dec 3rd, 2007 at 7:13 am