Last active
September 24, 2020 22:44
-
-
Save abrn/f9adb35440fb6a7b53f00ae267d05353 to your computer and use it in GitHub Desktop.
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 time | |
import requests | |
import sys | |
import random | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
if '--proxyfile' in sys.argv: | |
p = open('proxies.txt') | |
proxyList = p.readlines() | |
else: | |
proxyReq = requests.get('https://api.proxyscrape.com/?request=getproxies&proxytype=socks4&timeout=3000&country=all&ssl=all&anonymity=all') | |
if proxyReq.status_code == 200: | |
proxyList = proxyReq.text.splitlines() | |
else: | |
print('Failed to retreive proxies via URL.. please load from file') | |
sys.exit(0) | |
def make_req(): | |
if len(proxyList) == 0: | |
return 'No proxies remaining' | |
proxy = get_proxy(proxyList) | |
req = None | |
while req == None: | |
try: | |
req = requests.post('https://www.realmofthemadgod.com/account/register?g={}'.format(email), data={ | |
'newGUID': email, | |
'newPassword': password, | |
'gameClientVersion': '1.0.3.0', | |
'ignore': '123456', | |
'entrytag': '', | |
'name': '', | |
'isAgeVerified': '1', | |
'signedUpKabamEmail': '0' | |
}, proxies=proxy) | |
return req.text | |
except Exception as e: | |
print('\nProxy failed, switching') | |
print(e) | |
if len(proxyList) == 0: | |
return 'No proxies remaining' | |
else: | |
proxy = get_proxy(proxyList) | |
def get_proxy(proxyList): | |
proxyCount = len(proxyList) | |
proxyIndex = random.randint(0, proxyCount-1) | |
newProxy = proxyList[proxyIndex].split(':') | |
proxyHost = newProxy[0] | |
proxyPort = newProxy[1] | |
proxy = { | |
'http': 'socks4://{}:{}'.format(proxyHost, proxyPort), | |
'https': 'socks4://{}:{}'.format(proxyHost, proxyPort) | |
} | |
return proxy | |
email = 'test3423252453@gmail.com' | |
password = 'loldongs' | |
used_indexes = [] | |
count = 0 | |
result = None | |
while result is None: | |
req = make_req() | |
count = count+1 | |
if req == 'No proxies remaining': | |
print('\n'+req) | |
sys.exit(0) | |
if req == '<Error>Error.nameAlreadyInUse</Error>': | |
print('Failed to create, attempt: {}'.format(count)) | |
elif req[0:6] == '<Error>': | |
print('Failed to create with error: {} - attempt: {}'.format(req, count)) | |
elif req == None: | |
print('Failed to create, connection failed - attempt: {}'.format(count)) | |
elif req[0:8] == '<Success>': | |
print('SUCCESS at time {} with attempt {}\n\nEmail: {}\nPassword: {}'.format(time.time(), count, email, password)) | |
result = True | |
break | |
else: | |
print('Failed to create with error: {} - attempt: {}'.format(req, count)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment