Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suporte a multiplas contas #169

Closed
wants to merge 12 commits into from
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ test.py

# cache
/src/__pycache__
/captcha/__pycache__
/captcha/models/__pycache__
/captcha/utils/__pycache__

# vscode plugins
/.history
Binary file removed captcha/__pycache__/hubconf.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/__pycache__/run.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/__pycache__/solveCaptcha.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/models/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/models/__pycache__/common.cpython-39.pyc
Binary file not shown.
Binary file not shown.
Binary file removed captcha/models/__pycache__/yolo.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/utils/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/utils/__pycache__/autoanchor.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/utils/__pycache__/datasets.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/utils/__pycache__/general.cpython-39.pyc
Binary file not shown.
Binary file not shown.
Binary file removed captcha/utils/__pycache__/metrics.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/utils/__pycache__/plots.cpython-39.pyc
Binary file not shown.
Binary file removed captcha/utils/__pycache__/torch_utils.cpython-39.pyc
Binary file not shown.
Binary file added captchas-saved/.DS_Store
Binary file not shown.
Binary file added captchas-saved/1638977395.2656956.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captchas-saved/1638983346.7069614.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added captchas-saved/1638984631.2955275.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 37 additions & 31 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import numpy as np
import mss
import pyautogui
import pygetwindow
import time
import sys

Expand Down Expand Up @@ -470,51 +471,56 @@ def main():
time.sleep(5)
t = c['time_intervals']

last = {
"login" : 0,
"heroes" : 0,
"new_map" : 0,
"check_for_captcha" : 0,
"refresh_heroes" : 0
}
windows = []

for w in pygetwindow.getWindowsWithTitle('bombcrypto'):
windows.append({
"window": w,
"login" : 0,
"heroes" : 0,
"new_map" : 0,
"check_for_captcha" : 0,
"refresh_heroes" : 0
})

while True:
now = time.time()

if now - last["check_for_captcha"] > addRandomness(t['check_for_captcha'] * 60):
last["check_for_captcha"] = now
solveCaptcha()

if now - last["heroes"] > addRandomness(t['send_heroes_for_work'] * 60):
last["heroes"] = now
refreshHeroes()
for last in windows:
last["window"].activate()
time.sleep(2)

if now - last["login"] > addRandomness(t['check_for_login'] * 60):
sys.stdout.flush()
last["login"] = now
login()
if now - last["check_for_captcha"] > addRandomness(t['check_for_captcha'] * 60):
last["check_for_captcha"] = now
solveCaptcha()

if now - last["new_map"] > t['check_for_new_map_button']:
last["new_map"] = now
if now - last["heroes"] > addRandomness(t['send_heroes_for_work'] * 60):
last["heroes"] = now
refreshHeroes()

if clickBtn(images['new-map']):
loggerMapClicked()
if now - last["login"] > addRandomness(t['check_for_login'] * 60):
sys.stdout.flush()
last["login"] = now
login()

if now - last["new_map"] > t['check_for_new_map_button']:
last["new_map"] = now

if now - last["refresh_heroes"] > addRandomness( t['refresh_heroes_positions'] * 60):
solveCaptcha()
last["refresh_heroes"] = now
refreshHeroesPositions()
if clickBtn(images['new-map']):
loggerMapClicked()

#clickBtn(teasureHunt)
logger(None, progress_indicator=True)

sys.stdout.flush()

time.sleep(1)
if now - last["refresh_heroes"] > addRandomness( t['refresh_heroes_positions'] * 60):
solveCaptcha()
last["refresh_heroes"] = now
refreshHeroesPositions()

#clickBtn(teasureHunt)
logger(None, progress_indicator=True)

sys.stdout.flush()

time.sleep(1)
main()
# sendHeroesHome()

Expand Down