-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.py
105 lines (88 loc) · 2.8 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import pyperclip
import time
import keyboard
import pyautogui
import random
import string
from butterfingers import butterfinger
with open("wordlist.txt", "r") as f:
content = f.readlines()
used = []
letters = ""
found = "6969"
def activate():
global letters, used, found
while 1:
x,y = pyautogui.position()
pyautogui.moveTo(808, 570) # Change this depending on where the bomb text is on your screen.
pyautogui.leftClick()
pyautogui.leftClick()
before = pyperclip.paste()
keyboard.send("ctrl+c")
time.sleep(0.1)
result = pyperclip.paste()
time.sleep(0.01)
pyperclip.copy(before)
pyautogui.moveTo(x,y)
pyautogui.leftClick()
search = result.upper().strip()
found = ["6969"]
top = 0
shortest = 696969
for i in content:
if search in i and i not in used:
test=letters+i
not_good = False
for x in string.ascii_uppercase:
if x not in test:
not_good = True
break
if not not_good:
found = [i]
break
amount = 0
for x in i:
if x not in letters:
amount+=1
if amount > top:
found = [i]
top = amount
shortest = len(i)
elif amount == top and len(i) < shortest:
found = [i]
top = amount
shortest = len(i)
elif amount+4 >= top and len(i)+4 < shortest:
found = [i]
top = amount+4
shortest = len(i)
elif amount == top and len(i) == shortest:
found.append(i)
if found == ["6969"]:
print("Did not find any available matches.")
used = []
continue
found = random.choice(found)
used.append(found)
butterfinger(found)
keyboard.press_and_release('enter')
time.sleep(0.2)
try:
if pyautogui.pixelMatchesColor(566, 1004, (49, 43, 38), tolerance=5): # Change this depending on where the input text box is on your screen
break
except:pass
letters+=found
for i in string.ascii_uppercase:
if i not in letters:
return
letters = ""
used = []
print("READY!")
while 1:
try:
if pyautogui.pixelMatchesColor(788, 1002, (25, 21, 19), tolerance=5): # Change this depending on where the input text box is on your screen
time.sleep(random.randint(1,100)/70)
activate()
except:
continue
time.sleep(0.15)