Last active
January 25, 2026 13:54
-
-
Save Garciat/9fd0efc25b0f5a68c370 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 requests as http | |
| import random, re, time, datetime | |
| __baseurl__ = 'http://arquerodelreybk.com' | |
| __targets__ = ['Left', 'LeftUp', 'Center', 'Right', 'RightUp'] | |
| __prizes__ = ['Refresco King', 'Sundae', 'Whopper Jr.', 'Papas Super King', 'Rodeo'] | |
| def make_url(path): | |
| return __baseurl__ + path | |
| def find_prizes(text): | |
| match = re.findall(r'lib\/premios\/(\d+)\.(?:jpg|png)', text) | |
| return [__prizes__[int(x)-1] for x in match] | |
| def start_session(): | |
| url = make_url('/') | |
| res = http.get(url) | |
| return res.cookies | |
| def login(sess, email, password): | |
| url = make_url('/exec/ingresoExec/') | |
| params = { | |
| 'usr': email, | |
| 'psw': password | |
| } | |
| res = http.post(url, data = params, cookies = sess) | |
| if not res.url.endswith('/jugar/'): | |
| return 'Login failed', None | |
| prizes = find_prizes(res.text) | |
| match = re.search(r'until:\s+\+(\d+)', res.text) | |
| if match != None: | |
| until = int(match.group(1)) | |
| return 'Wait %s' % datetime.timedelta(seconds = until), prizes | |
| return None, prizes | |
| def play(sess, target): | |
| def run(path): | |
| url = make_url(path) | |
| res = http.get(url, cookies = sess) | |
| return res | |
| run('/exec/zoom/') | |
| run('/exec/game%sExec/' % target) | |
| e2 = run('/exec/game%sExec2/' % target) | |
| run('/exec/resultado/') | |
| if 'guante' in e2.text: | |
| return None | |
| return find_prizes(e2.text)[0] | |
| def full_play(username, password): | |
| global __starts | |
| # hack-y | |
| __starts = time.time() | |
| def log(msg): | |
| print('[%s] %s' % (username, msg)) | |
| def logerr(msg): | |
| log('[ERR] %s' % msg) | |
| sess = start_session() | |
| err, prizes = login(sess, username, password) | |
| if prizes != None: | |
| log('Logged in; has: %s' % str(tuple(prizes))) | |
| if err != None: | |
| return logerr(err) | |
| target = random.choice(__targets__) | |
| log('Target = %s' % target) | |
| prize = play(sess, target) | |
| if prize is None: | |
| return log('No prize.') | |
| log('Won: %s' % prize) | |
| if __name__ == '__main__': | |
| with open('users.txt', 'r') as f: | |
| t = f.read() | |
| for line in t.split('\n'): | |
| if len(line) == 0: continue | |
| if line.startswith('#'): continue | |
| u, p = line.split(' ') | |
| full_play(u, p) |
This file contains hidden or 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
| [email protected] password123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment