Created
May 25, 2013 04:21
-
-
Save candu/5647896 to your computer and use it in GitHub Desktop.
Brute-forcing Racer Chrome experiment codes. (Unfortunately, the chance of getting a valid code is pretty small.)
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
import json | |
import string | |
import urllib | |
import sys | |
import random | |
chars = string.uppercase | |
while True: | |
s = ''.join(random.choice(chars) for i in range(5)) | |
try: | |
url = 'http://chrome.com/racer/control/join?gameId={0}'.format(s) | |
f = urllib.urlopen(url) | |
data = json.loads(f.read()) | |
print s | |
if data: | |
sys.exit(0) | |
except IOError: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment