Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import requests
- valid = []
- rl = 10
- i = 1500
- data = {"gamerTag":"DefaultGamerTag",
- "gamerTagIsDefault":False,
- "gamerTagIsExplicitlySet":True,
- "gamesLitePlayerStatsEnabled":True,
- "playerId":"<Player ID>",
- "profileDiscoverableViaGoogleAccount":True,
- "profileVisibilityWasChosenByPlayer":True,
- "profileVisible":True,
- "stockGamerAvatarUrl":"<Stock avatar URL>"
- }
- headers = {"X-Device-ID":"<Device ID>",
- "X-Goog-Experiments":"<Not sure, but I don't feel comfortable giving out mine.>",
- "X-Goog-Spatula":"<No idea what this is, use your own>",
- "Authorization":"OAuth <Your oauth token>"
- }
- url = "https://www.googleapis.com/games/v1whitelisted/players/me/profilesettings?language=en_US"
- base_a = "IsTheChar"
- base_b = "Valid2U"
- while i < 3000:
- data["gamerTag"] = base_a + chr(i) + base_b
- print("Testing " + data["gamerTag"])
- time.sleep(0.1)
- try:
- r = requests.put(url, json=data,headers=headers)
- j = r.json()
- if j["status"] != "GAMER_TAG_INVALID_CHARS":
- print(data["gamerTag"] + " is valid.")
- print("Data received was " + r.text)
- valid.append(chr(i))
- except KeyError:
- print("Rate limit, waiting " + str(rl) + "s")
- print(r.text)
- rl = rl+10
- if rl > 60:
- rl = 60
- i = i-1
- time.sleep(rl)
- i += 1
- validst = "".join(valid)
- with open("valid_new.txt","w") as f:
- f.write(validst)
- print("Saved data")
Advertisement
Add Comment
Please, Sign In to add comment