Skip to content

Instantly share code, notes, and snippets.

@tamalw
Created June 3, 2013 15:38
Show Gist options
  • Save tamalw/5699051 to your computer and use it in GitHub Desktop.
Save tamalw/5699051 to your computer and use it in GitHub Desktop.
Round Robin DNS resolution to bypass IP rate limiting PoC
require 'resolv'
hostname = 'hiscore.runescape.com'
names = [ "The Orange", "SkyTeck", "Font", "iGlacor", "Tohru x", "Weir", "Parenthesis", "OneLegendKid", "Lekerashi", "Aus Zealand", "Lordofd70", "No Orion", "BadSmurF", "Dunder_miffl", "Stephen VII", "Jonnys D", "God H8s Bots", "Wey burn", "nabulsi", "Blur", "Man killa", "Titsicle", "Bedevere", "lilybele", "l Jigg l", "zabeey", "xRatonhnhake", "st drew", "Kre8tive", "He Belongs", "Sannse", "almostcomp", "IrishEIK", "Haydunn", "kouth sorea", "dark_king_I4", "Unheard pray", "Co Justin", "Chalder", "mihal80", "inburst21", "Slaye", "Mish", "Doctor Doak", "ttaM", "nova science", "Rrman of w48", "saylor", "minergoo", "jason 72", "Advokat", "Lofna", "Dissori", "R2h Guard", "Izobelle", "Eleanor Lamb", "Mischievio", "Dead Masterr", "Man killa", "iBryce", "Boo Bee", "Mattmann28", "xowen", "fdsatakanuva", "Steeve", "J T R9", "mercifull", "Randomjagged", "Samyuel", "Cassus", "Dyzt", "Melbshuffle", "Neo687", "Metabolizer", "S9 Gnit2", "Joe Longo", "3u0", "Xw0", "Saul", "Panzinat0r", "Armour X2", "Rhcp junkie", "Difekt", "mythzkidz", "Oisann", "a pvm noob", "devalue", "Drocius", "Shady", "Skull fire", "Speffzt", "MudCrap", "paladine", "Capdown", "Bat book", "Lord Adam", "mattzillla", "Legolas G", "Wced", "xV E S T Ax", "Boomer-One", "Hunter155", "Mr Sun Shine", "RedRascal", "Isolated", "Babeh Dwarf", "My Lumps", "DudesterXSOX", "Slothofury", "random4 lyf", "reschedule", "Krystn", "Creaturecarl", "zJakes", "OhMyGodaTree", "Zenaty", "Dudio678", "Veejay366", "Zm4", "AP Soccer", "anaxandra_v", "insanekill81", "Reviews", "Hawb", "Zi d", "W hitey", "Miss Becki", "monstermas22", "jason 72", "Heavy House", "burgenland", "barattikus", "Hwistle", "JamesBlunt", "Toriu Teni", "Joeu Teni", "kiddioo", "Lipuro", "H id", "Kevinsaurus", "lNathar", "File Hawk", "Starwolf", "damien jp", "GK_Microwave", "Elven_badass", "JLOD", "Nanner Nub", "aeversme", "My Antidote", "Gummy Buns", "Bobs Crusade", "Sly Davey", "cRainbowDash", "BrokenBurito", "Wrath Of Tyr", "Enixx_Rs", "night4life1", "Lightstone", "moerdred", "Nairb3423", "Slayerkid13", "Lady Eilie", "WhiteInferno", "Aaron Pls", "Bwett", "Tejax", "Skin Cells", "Burichan", "Juju Potion", "Avant", "Explain", "Repulsing", "thwing", "AuroraVids", "x dobs x", "A Bidoof", "of_secrets", "zooperman", "alantemonk", "Nativeguy", "GS Mason", "echezeaux", "Variseref", "Ninth_Legion", "nachoss", "My Trickster", "Lunchbag", "sun ce224", "spujika", "Magni Ha", "Slyp", "wangsness", "PantsuOnHead", "Censor Me", "Tayray8", "Nighteyes604", "OpusX", "Aoduen", "aru l0l"]
puts "=== Round Robin DNS Test ==="
puts "\nGrabbing IPs for #{hostname}:"
ips = Resolv.getaddresses hostname
ips.each do |ip|
puts ip
end
ip_index = 0
puts "\nStarting with IP #{ip_index}: #{ips[ip_index]}..."
puts '# Time Result RSN'
names.each_with_index do |name, i|
start_ts = Time.now
result = `curl http://hiscore.runescape.com/index_lite.ws -g -s -d player=#{name.downcase.gsub(' ', '_')} --resolve hiscore.runescape.com:80:#{ips[ip_index]}`
end_ts = Time.now
puts "#{i} #{(end_ts-start_ts).to_i}s #{result.length} #{name}"
if result.length == 0
if ip_index < ips.length - 1
ip_index += 1
else
ip_index = 0
end
puts "Empty result! Switching to IP #{ip_index}: #{ips[ip_index]}"
redo
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment