/
faucets.py
224 lines (190 loc) · 8.28 KB
/
faucets.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import tools
import datetime
from commands import Commands
import time
import os
import OCR
import inspect
def bitcoinker():
'''
Recipe name: bitcoinker
'''
_iamnotarobot_ = "assets/iamnotarobot"
_iamnotarobot_done_ = "assets/iamnotarobot-done"
config = tools.JSON.get("config.json")
links = config["links"]
cmd = Commands()
cmd.is_animation_on = True
cmd.animation_time = 0.01
selected_link = "bitcoinker"
cmd.link(links[selected_link])
cmd.wait_for("HTML is done?", f'assets/{selected_link}/htmlisdone.png', scrolldown_enabled=False)
if cmd.solve_recaptcha():
print("solve_recaptcha fail")
tools.Logging.fail(f"logs/time/{selected_link}.txt", "solve_recaptcha fail")
cmd.link("localhost")
exit()
if cmd.wait_for("Waiting process done", _iamnotarobot_done_, scrolldown_enabled=False):
cmd.link("localhost")
tools.Logging.fail(f"logs/time/{selected_link}.txt", "Process done yakalanamadı.")
exit()
if not cmd.wait_for("Claim edilcek.", f'assets/bitcoinker/claim_bitcoin', scrolldown_enabled=True, sensitive=True):
cmd.find_and_click(f'assets/bitcoinker/claim_bitcoin', sensitive=True)
time.sleep(2)
cmd.payment_solver(selected_link, sensitive=True)
tools.Logging.success(f"logs/time/{selected_link}.txt")
else:
tools.Logging.fail(f"logs/time/{selected_link}.txt", "Claim edilemedi!")
cmd.link("localhost")
def bitfun():
'''
Recipe name: bitcoinker
'''
_iamnotarobot_ = "assets/iamnotarobot"
_iamnotarobot_done_ = "assets/iamnotarobot-done"
config = tools.JSON.get("config.json")
links = config["links"]
cmd = Commands()
cmd.is_animation_on = True
cmd.animation_time = 0.01
selected_link = "bitfun"
cmd.link(links[selected_link])
cmd.wait_for("HTML is done?", f'assets/{selected_link}/htmlisdone', scrolldown_enabled=False)
cmd.wait_for("Searching claim button?", f'assets/{selected_link}/claim', scrolldown_enabled=True, sensitive=True)
cmd.find_and_click(f'assets/{selected_link}/claim', sensitive=True)
if cmd.solve_recaptcha(firstly_go_to_top=False):
print("solve_recaptcha fail")
tools.Logging.fail(f"logs/time/{selected_link}.txt", "solve_recaptcha fail")
cmd.link("localhost")
exit()
time.sleep(2)
cmd.find_and_click(f'assets/{selected_link}/claim', sensitive=True)
time.sleep(2)
if not cmd.wait_for("Searching claim button?", f'assets/{selected_link}/close', scrolldown_enabled=False, sensitive=True):
cmd.find_and_click(f'assets/{selected_link}/close', sensitive=True)
tools.Logging.success(f"logs/time/{selected_link}.txt")
else:
tools.Logging.fail(f"logs/time/{selected_link}.txt", "Claim edilemedi!")
cmd.link("localhost")
def bonusbitcoin():
'''
Recipe name: bonusbitcoin
'''
_iamnotarobot_ = "assets/iamnotarobot"
_iamnotarobot_done_ = "assets/iamnotarobot-done"
config = tools.JSON.get("config.json")
links = config["links"]
cmd = Commands()
cmd.is_animation_on = True
cmd.animation_time = 0.01
selected_link = "bonusbitcoin"
cmd.link(links[selected_link])
cmd.wait_for("HTML is done?", f'assets/{selected_link}/htmlisdone.png', scrolldown_enabled=False)
cmd.wait_for("I'am not a robot bulunacak.",_iamnotarobot_, scrolldown_enabled=True, sensitive=False)
if cmd.solve_recaptcha(scrolldown_enabled=False, firstly_go_to_top=False):
print("solve_recaptcha fail")
tools.Logging.fail(f"logs/time/{selected_link}.txt", "solve_recaptcha fail")
cmd.link("localhost")
exit()
cmd.wait_for("Waiting process done", _iamnotarobot_done_, scrolldown_enabled=False)
if not cmd.wait_for("Claim edilcek.", f'assets\{selected_link}\claim_now.png', scrolldown_enabled=True, sensitive=True):
time.sleep(2)
cmd.find_and_click(f'assets\{selected_link}\claim_now.png', sensitive=True)
#cmd.payment_solver(selected_link, sensitive=True)
tools.Logging.success(f"logs/time/{selected_link}.txt")
else:
tools.Logging.fail(f"logs/time/{selected_link}.txt", "Claim edilemedi!")
cmd.link("localhost")
def freebitco():
'''
Recipe name: freebitco
'''
_iamnotarobot_ = "assets/iamnotarobot"
_iamnotarobot_done_ = "assets/iamnotarobot-done"
config = tools.JSON.get("config.json")
links = config["links"]
cmd = Commands()
cmd.is_animation_on = True
cmd.animation_time = 0.01
selected_link = "freebitco"
cmd.link(links[selected_link])
cmd.wait_for("HTML is done?", f'assets/{selected_link}/htmlisdone.png', scrolldown_enabled=False)
cmd.mouse.position = config["location"]["temp"]
cmd.click_l()
if cmd.solve_recaptcha():
print("solve_recaptcha fail")
tools.Logging.fail(f"logs/time/{selected_link}.txt", "solve_recaptcha fail")
cmd.link("localhost")
exit()
cmd.wait_for("Waiting process done", _iamnotarobot_done_, scrolldown_enabled=False)
if not cmd.wait_for("Roll edilcek.", f'assets/{selected_link}/roll.png', scrolldown_enabled=True, sensitive=True):
cmd.find_and_click(f'assets/{selected_link}/roll.png', sensitive=True)
time.sleep(2)
cmd.mouse.position = config["location"]["temp"]
cmd.click_l()
#cmd.payment_solver(selected_link, sensitive=True)
tools.Logging.success(f"logs/time/{selected_link}.txt")
else:
tools.Logging.fail(f"logs/time/{selected_link}.txt", "Claim edilemedi!")
cmd.link("localhost")
def moon(selected_link):
f'''
Recipe name: {selected_link}
'''
this_func = eval(inspect.stack()[0][3])
def check():
if "blank" in OCR.resolve_url():
print("! RESET")
return this_func(selected_link)
else:
if OCR.check_current_url():
time.sleep(1)
cmd = Commands()
cmd.go_to_top()
BASE_ASSET_DIR = f'assets/__faucets__/{selected_link}'
_iamnotarobot_ = "assets/iamnotarobot"
_iamnotarobot_done_ = "assets/iamnotarobot-done"
config = tools.JSON.get("config.json")
links = config["links"]
cmd = Commands()
cmd.is_animation_on = True
cmd.animation_time = 0.01
cmd.link(links[selected_link])
cmd.wait_for("HTML is done?", os.path.join(BASE_ASSET_DIR, "htmlisdone"), scrolldown_enabled=False)
cmd.mouse.position = config["location"]["temp"]
cmd.click_l(close_after_click=False)
time.sleep(5)
check()
time.sleep(2)
# Double Close Check
if not cmd.wait_for("Reklam Kapatılacak.", os.path.join(BASE_ASSET_DIR, 'close'), scrolldown_enabled=False, sensitive=True):
cmd.find_and_click(os.path.join(BASE_ASSET_DIR, 'close'), sensitive=True, close_after_click=False)
time.sleep(2)
check()
time.sleep(2)
if not cmd.wait_for("Reklam Kapatılacak.", os.path.join(BASE_ASSET_DIR, 'close'), scrolldown_enabled=False, sensitive=True, timeout=10):
cmd.find_and_click(os.path.join(BASE_ASSET_DIR, 'close'), sensitive=True, close_after_click=False)
time.sleep(2)
check()
time.sleep(2)
###.............
if not cmd.wait_for("Claim edilcek.", os.path.join(BASE_ASSET_DIR, 'claim'), scrolldown_enabled=True, sensitive=True):
cmd.find_and_click(os.path.join(BASE_ASSET_DIR, 'claim'), sensitive=True, close_after_click=False)
time.sleep(2)
check()
if cmd.solve_recaptcha(scrolldown_enabled=False, firstly_go_to_top=False):
print("solve_recaptcha fail")
tools.Logging.fail(f"logs/time/{selected_link}.txt", "solve_recaptcha fail")
cmd.link("localhost")
exit()
cmd.wait_for("Waiting process done", _iamnotarobot_done_, scrolldown_enabled=False)
if not cmd.wait_for("Claim edilcek.", os.path.join(BASE_ASSET_DIR, 'claim'), scrolldown_enabled=True, sensitive=True):
cmd.find_and_click(os.path.join(BASE_ASSET_DIR, 'claim'), sensitive=True, close_after_click=False)
time.sleep(2)
check()
tools.Logging.success(f"logs/time/{selected_link}.txt")
else:
tools.Logging.fail(f"logs/time/{selected_link}.txt", "Claim edilemedi!")
time.sleep(5)
cmd.link("localhost")
time.sleep(5)