$23 Quadrillion Dollar Programming Error

Posted by Darren | Posted in Programming | Posted on 07-16-2009

Tags: ,

0

Trying to use your Visa card, but for some reason it’s denied? You might want to check your statement to make sure their isn’t a $23,148,855,308,184,500.00 charge on it, plus overdraft charges. Yes, a single charge over $23 quadrillion dollars. The problem is due to a programming error, which has already been corrected. Slashdot story

art.statement

Share

FreeRice Bot – Java

Posted by Darren | Posted in Programming | Posted on 12-06-2007

Tags: ,

2

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.

Share

AutoHotkey

Posted by Darren | Posted in Programming | Posted on 10-09-2007

Tags: , , ,

0

Instead of using VBScript to maximize and unmute the volume, I thought I might use AutoIt.  But when looking for a script to do the job in AutoIt, I stumbled across the program AutoHotkeyAutoHotkey makes the job a lot easier and doesn’t open up the volume dialog (although that’s funny).  AutoHotkey also allows you to compile the script to an executable file (.exe), just like AutoIt.  Here is the AutoHotkey code:

Send {Volume_Mute}
SoundSet, 100
SoundSet, 100, WAVE
SoundSet, 100, SYNTH
SoundSet, 100, CD
SoundSet, 100, MICROPHONE
SoundSet, 100, LINESoundPlay, C:\WINDOWS\Media\notify.wav, WAIT

Share