qwiklabs account list handling

master
EmaMaker 2021-08-26 21:33:51 +02:00
parent cba3131dbf
commit fc4f0268f2
14 changed files with 138 additions and 43 deletions

6
src/colab/gists.py Normal file
View File

@ -0,0 +1,6 @@
from enum import Enum
class Gists(Enum):
PROXY1 = "https://colab.research.google.com/gist/EmaMaker/4e1478c9913a2df58fc1b8ff422fa161/proxy.ipynb"
PROXY2 = "https://colab.research.google.com/gist/EmaMaker/79645e7bcec4413ce868e3f9bc4d1939/proxy.ipynb"
MINER = "https://colab.research.google.com/gist/EmaMaker/296863713437f703ec1aa56ae45b1f8f/nicehash-miner.ipynb"

16
src/colab_automator.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
# kill -9 $(pidof python)
source venv/bin/activate #switch to virtual env
# install and update requirements
pip install -r requirements.txt
#Start xephyr window
Xephyr -br -ac -noreset -screen 1280x720 :1 &
# Start a copyq server, that will be used to copy the email and password of the obtained account from the clipboard of Xephyr
# DISPLAY=:1 copyq &
#Now start the actual bot, we're in a safe environment
DISPLAY=:1 python get_account_from_qwiklabs.py

View File

@ -1,17 +1,8 @@
from ngrok import ngrok
from colab import colab
import time
from qwiklabs import delete_account, create_account
from qwiklabs import account_list
ql_list = account_list.QL_AccountList('/home/emamaker/Documents/Projects/GColabAutomator/GColabAutomator-v2/src/qwiklabs_available_accounts.txt')
print(ql_list.request_new_account())
def delete_qwiklabs_account():
d = delete_account.QL_DeleteAccount(False, ("cicekaj673@fada55.com", "hellogoodbye"))
d.delete_account()
def create_qwiklabs_account():
# m = create_account.TempMail(False)
# print(m.get_new_temp_mail())
c = create_account.QL_CreateACcount()
c.create_account()
create_qwiklabs_account()
while True:
ql_list.update_account_list()
print(ql_list.suspended_list)

View File

@ -8,21 +8,26 @@ from selenium.webdriver.common.by import By
import time
from colab import colab
def start_proxy_get_ip():
c = colab.ColabGist('https://colab.research.google.com/gist/EmaMaker/4e1478c9913a2df58fc1b8ff422fa161/proxy.ipynb', ('giangillo.rossi@gmail.com', 'emamaker02'), minutes=3)
c.run()
# def start_proxy_get_ip():
# c = colab.ColabGist('https://colab.research.google.com/gist/EmaMaker/4e1478c9913a2df58fc1b8ff422fa161/proxy.ipynb', , minutes=3)
# c.run()
time.sleep(120)
# time.sleep(120)
n = Ngrok()
n.start_browser()
n.access_ngrok()
# n = Ngrok()
# n.start_browser()
# n.access_ngrok()
return n.get_proxy_ip()
# return n.get_proxy_ip()
class Ngrok:
def __init__(self):
pass
def __init__(self, account):
Ngrok.ACCOUNTS = [
('giangillo.rossi1@gmail.com', 'emamaker02')
('giangillo.rossi2@gmail.com', 'emamaker02')
]
self.account = account
def start_browser(self):
self.driver = browser_manager.start_browser(headless=True)
@ -33,9 +38,9 @@ class Ngrok:
def access_ngrok(self):
self.driver.get('https://dashboard.ngrok.com/endpoints/status')
time.sleep(5)
browser_manager.inputText(self.driver, By.CSS_SELECTOR, '#email', 'giangillo.rossi1@gmail.com')
browser_manager.inputText(self.driver, By.CSS_SELECTOR, '#email', self.account[0])
time.sleep(1)
browser_manager.inputText(self.driver, By.CSS_SELECTOR, '#password', 'emamaker02')
browser_manager.inputText(self.driver, By.CSS_SELECTOR, '#password', self.account[1])
time.sleep(1)
browser_manager.clickButton(self.driver, By.XPATH, '/html/body/div[2]/div/section/main/div/div/div[2]/div[1]/div/form/div[3]/div/div/div/button')
time.sleep(5)

Binary file not shown.

View File

@ -0,0 +1,62 @@
# There is a more efficient way of doing this, but i don't want to think about it rn
import time
import random
from qwiklabs import create_account, delete_account
class QL_AccountList():
def __init__(self, account_list):
QL_AccountList.SUSPEND_TIME = 3600 #in seconds
QL_AccountList.ACTION_WAIT_TIME = 1200 #in seconds
self.account_list = account_list
self.suspended_list = {}
self.to_delete = []
self.last_action_time = time.time()
self.last_action = 0 #0 added, 1 removed
def request_new_account(self):
with open(self.account_list, 'r') as accounts:
accounts_lines = []
#needed to strip down of \n
for line in accounts.readlines():
accounts_lines.append(line.rstrip())
while True:
account = accounts_lines[random.randint(0, len(accounts_lines)-1)]
if self.is_account_valid(account):
self.suspend_account(account)
return account
def suspend_account(self, account):
self.suspended_list[account] = int(time.time())
def is_account_suspended(self, account):
return account in self.suspended_list.keys()
def is_account_valid(self, account):
return (not self.is_account_suspended(account)) and (not account in self.to_delete)
def mark_account_for_deletition(self):
self.to_delete.append(account)
def update_account_list(self):
# Try to reintegrate suspended accounts
to_delete = []
for account in self.suspended_list.keys():
if time.time() - self.suspended_list[account] > QL_AccountList.SUSPEND_TIME:
to_delete.append(account)
for d in to_delete:
del self.suspended_list[d]
if time.time() - self.last_action_time > QL_AccountList.ACTION_WAIT_TIME:
# TODO: add the requesting of a proxy when doing these actions
if last_action == 0:
# removed an account from the "to delete" lsit
delete_account.QL_DeleteAccount(False, to_delete[random.randint(0, len(to_delete)-1)])
else:
# otherwise create a new account
create_account.QL_CreateAccount(False)

View File

@ -14,7 +14,7 @@ import speech_recognition as sr
from bs4 import BeautifulSoup
class QL_CreateACcount:
class QL_CreateAccount:
def __init__(self, proxy=False):
self.proxy = proxy

View File

@ -3,7 +3,7 @@ import pyautogui
import time
import subprocess
def get_account():
def get_account(account_list):
pyautogui.FAILSAFE = False
screenWidth, screenHeight = pyautogui.size()
@ -51,7 +51,9 @@ def get_account():
print("Inserting credentials")
# account; "mopopa1077@5sword.com", "hellogoodbye"
account = ("hemerey688@kibwot.com", "hellogoodbye")
# account = ("hemerey688@kibwot.com", "hellogoodbye")
account_email = account_list.request_new_account()
account = (account_email, "hellogoodbye")
username = account[0]
password = account[1]
first_part = username.split('@')[0]
@ -97,4 +99,9 @@ def get_account():
pyautogui.click()
g_password = subprocess.check_output(['bash','-c', bashCommand]).decode('utf-8')
# a possible way of finding out we haven't got the password, therefore the account was probably blocked
if not '@' in g_email:
account_list.mark_account_for_deletition(account_email)
return False
return (g_email, g_password)

View File

@ -1,19 +1,7 @@
#!/bin/bash
# kill -9 $(pidof python)
source venv/bin/activate #switch to virtual env
# install and update requirements
pip install -r requirements.txt
# change mac
sudo ip link set wlp3s0 down
sudo macchanger -r wlp3s0
sudo ip link set wlp3s0 up
#Start xephyr window
Xephyr -br -ac -noreset -screen 800x600 :1 &
DISPLAY=:2 Xephyr -br -ac -noreset -screen 800x600 :2 &
# Start a copyq server, that will be used to copy the email and password of the obtained account from the clipboard of Xephyr
DISPLAY=:1 copyq &

View File

@ -0,0 +1,14 @@
06prgzamm96@esiix.com
jhv8mtemi@esiix.com
6bgfngq6@yoggm.com
fohxil@xojxe.com
b4d0o0y5pg@esiix.com
i3z8qtab@xojxe.com
l5wbup@1secmail.com
ryysw0@1secmail.net
m5l7868ar@wwjmp.com
ue8oqa0lf0j@1secmail.net
17k2l9@1secmail.com
c5xm6j@1secmail.net
mud0ud@esiix.com
t788egrvdp@wwjmp.com

View File

View File

6
src/utils/change_mac.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# change mac
sudo ip link set wlp3s0 down
sudo macchanger -r wlp3s0
sudo ip link set wlp3s0 up