Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import string
- import random
- from time import sleep
- import pyautogui as pgui
- coupon_box_pos_1 = (132, 469)
- coupon_box_pos_2 = (126,492)
- captcha_box_pos = (35, 192)
- claim_faucet_pos = (107, 243)
- coupon_hint = "WIN-6I6W-D7BV-NSKB-4"
- with open('attempts.txt') as f:
- old_tries = f.read().splitlines()
- def id_generator(size=3, chars=string.ascii_uppercase + string.digits):
- return ''.join(random.choice(chars) for _ in range(size))
- def guess():
- while True:
- try:
- gen = id_generator()
- if '0' in gen:
- continue
- elif '5' in gen:
- continue
- elif '6' in gen:
- continue
- elif '7' in gen:
- continue
- elif '8' in gen:
- continue
- elif '9' in gen:
- continue
- elif 'A' in gen:
- continue
- elif 'B' in gen:
- continue
- elif 'C' in gen:
- continue
- elif 'D' in gen:
- continue
- elif 'E' in gen:
- continue
- elif 'F' in gen:
- continue
- elif 'G' in gen:
- continue
- elif 'Q' in gen:
- continue
- elif 'R' in gen:
- continue
- elif 'S' in gen:
- continue
- elif 'T' in gen:
- continue
- elif 'U' in gen:
- continue
- elif 'V' in gen:
- continue
- elif 'X' in gen:
- continue
- elif 'Y' in gen:
- continue
- else:
- return coupon_hint + gen
- break
- except BaseException:
- pass
- new_tries = []
- x = 0
- while True:
- try:
- n = guess()
- if n not in old_tries and n not in new_tries:
- new_tries.append(str(n))
- else:
- continue
- if x == 0:
- pgui.moveTo(coupon_box_pos_1)
- sleep(1)
- x = x + 1
- else:
- pgui.moveTo(coupon_box_pos_2)
- sleep(1)
- pgui.click()
- pgui.click()
- pgui.hotkey('command', 'a', 'delete')
- pgui.typewrite(n)
- pgui.moveTo(captcha_box_pos)
- pgui.click()
- #sleep(3)
- input("Waiting to hit enter...")
- pgui.moveTo(claim_faucet_pos)
- pgui.click()
- pgui.click()
- #sleep(2)
- except KeyboardInterrupt:
- with open('attempts.txt', 'a+') as f:
- for tries in new_tries:
- f.write(tries)
- f.write("\n")
- break
Advertisement
Add Comment
Please, Sign In to add comment