UPDATE: Check out this AutoIt bot script for FreeRice
DISCLAIMER: The programs found here and in links are NOT to be used to cheat the freerice website.
This bot no longer works. It was designed to show weaknesses of the freerice website and to teach programming by example.
I’ve recently stumbled upon the “freerice” website. This website hasn’t been around long (launched October 7, 2007). They say “for each word you get right, we donate 20 grains of rice through the United Nations to help end world hunger”.
Here are some questions from their FAQ:
Who pays for the donated rice?
The rice is paid for by the advertisers whose names you see on the bottom of your vocabulary screen. This is regular advertising for these companies, but it is also something more. Through their advertising at FreeRice, these companies support both learning (free vocabulary for everyone) and reducing hunger (free rice for the hungry). We commend these companies for their participation at FreeRice.
If FreeRice has the rice to give, why not give it all away right now?
FreeRice is not sitting on a pile of rice?you are earning it 20 grains at a time. Here is how it works. When you play the game, advertisements appear on the bottom of your screen. The money generated by these advertisements is then used to buy the rice. So by playing, you generate the money that pays for the rice donated to hungry people.
Does FreeRice make any money from this?
No, it does not. FreeRice runs the site at no profit.
I’ve noticed there are some bots for freerice:
Hacking Freerice.com: A Program to Feed the World [multithreaded Ruby]
FreeRice Bot [multiple bots: Java, C#, PHP/MySQL]
From what I’ve seen, these bots all use dictionary attacks. I’ve never written a program that interacts with a webpage before. I thought this would be a good learning experience to try to write something similar. On my quest for knowledge I ran across this website on how to send a POST request in Java.
Here are the weaknesses I found:
- For a set “INFO”, “INFO2″ and “INFO3″, The answer can be brute forced. No dictionary needed!
- The error when clicking too fast: “Sorry, we are unable to process rice donations so fast.” can be avoided.
Here is my program: freeRice.class (updated 3/19/2008)
Here is the source: freeRice.java (updated 3/19/2008)
How to use: java freeRice <time>
Note: The time is in milliseconds.