Skip to content

Instantly share code, notes, and snippets.

@Pretz Pretz/433.rb
Created Feb 26, 2009

Embed
What would you like to do?
#!/usr/bin/env ruby -wKU
require 'net/http'
require 'uri'
### SEE http://www.kloonigames.com/blog/games/4mins33secs
STDOUT.sync = true; token = rand(28000); time = 0
uri_root = "http://www.kloonigames.com/nordicjam2009/"
start = URI.parse(uri_root + "new_game.php?v=#{token}");
whois = URI.parse(uri_root + "whois.txt");
start = Net::HTTP.get(start)
if ! start =~ /1/ then puts ""; exit 1; end
while (true)
if time >= 273 then puts ""; exit 0 end
who = Net::HTTP.get(whois); me = who.split("|")
if me[1].strip.to_i != token then puts ""; exit 1 end
print "."; sleep 2; time += 2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.