Update main.py
by pass mail
This commit is contained in:
462
main.py
462
main.py
@@ -154,24 +154,6 @@ class EmailGroupManager:
|
|||||||
def release_connection(self, conn):
|
def release_connection(self, conn):
|
||||||
if conn:
|
if conn:
|
||||||
self.pool.putconn(conn)
|
self.pool.putconn(conn)
|
||||||
|
|
||||||
def get_open_groups_111(self, server_name: str):
|
|
||||||
while True:
|
|
||||||
|
|
||||||
conn = self.get_connection()
|
|
||||||
try:
|
|
||||||
with conn.cursor() as cur:
|
|
||||||
cur.execute("""
|
|
||||||
SELECT * FROM ea_shadow_tactics
|
|
||||||
WHERE server_name = %s
|
|
||||||
AND (is_finished IS NULL OR is_finished IS DISTINCT FROM TRUE)
|
|
||||||
AND (login_status = TRUE OR login_status IS NULL)
|
|
||||||
AND group_id IS NOT NULL
|
|
||||||
AND taken_at IS NULL
|
|
||||||
""", (server_name,))
|
|
||||||
return cur.fetchall()
|
|
||||||
finally:
|
|
||||||
self.release_connection(conn)
|
|
||||||
|
|
||||||
def get_open_groups_1(self, server_name: str):
|
def get_open_groups_1(self, server_name: str):
|
||||||
conn = self.get_connection()
|
conn = self.get_connection()
|
||||||
@@ -183,7 +165,6 @@ class EmailGroupManager:
|
|||||||
AND (is_finished IS NULL OR is_finished IS DISTINCT FROM TRUE)
|
AND (is_finished IS NULL OR is_finished IS DISTINCT FROM TRUE)
|
||||||
AND (login_status = TRUE OR login_status IS NULL)
|
AND (login_status = TRUE OR login_status IS NULL)
|
||||||
AND group_id IS NOT NULL
|
AND group_id IS NOT NULL
|
||||||
AND (backup_code IS NULL OR backup_code = '')
|
|
||||||
""", (server_name,))
|
""", (server_name,))
|
||||||
return cur.fetchall()
|
return cur.fetchall()
|
||||||
finally:
|
finally:
|
||||||
@@ -214,7 +195,6 @@ class EmailGroupManager:
|
|||||||
return cur.fetchone()[0]
|
return cur.fetchone()[0]
|
||||||
finally:
|
finally:
|
||||||
self.release_connection(conn)
|
self.release_connection(conn)
|
||||||
|
|
||||||
def set_taken_at(self, email_id: int):
|
def set_taken_at(self, email_id: int):
|
||||||
|
|
||||||
|
|
||||||
@@ -234,7 +214,6 @@ class EmailGroupManager:
|
|||||||
print(f"taken_at ست شد برای ایمیل با id={email_id}")
|
print(f"taken_at ست شد برای ایمیل با id={email_id}")
|
||||||
finally:
|
finally:
|
||||||
self.release_connection(conn)
|
self.release_connection(conn)
|
||||||
|
|
||||||
def assign_new_group_old(self, server_name: str, group_id: int) -> List[dict]:
|
def assign_new_group_old(self, server_name: str, group_id: int) -> List[dict]:
|
||||||
conn = self.get_connection()
|
conn = self.get_connection()
|
||||||
try:
|
try:
|
||||||
@@ -272,8 +251,7 @@ class EmailGroupManager:
|
|||||||
]
|
]
|
||||||
finally:
|
finally:
|
||||||
self.release_connection(conn)
|
self.release_connection(conn)
|
||||||
|
def assign_new_group(self, server_name: str, group_id: int) -> List[dict]:
|
||||||
def assign_new_group_old_1(self, server_name: str, group_id: int) -> List[dict]:
|
|
||||||
conn = self.get_connection()
|
conn = self.get_connection()
|
||||||
try:
|
try:
|
||||||
with conn.cursor() as cur:
|
with conn.cursor() as cur:
|
||||||
@@ -310,40 +288,6 @@ class EmailGroupManager:
|
|||||||
]
|
]
|
||||||
finally:
|
finally:
|
||||||
self.release_connection(conn)
|
self.release_connection(conn)
|
||||||
def assign_new_group(self, server_name, group_id):
|
|
||||||
while True:
|
|
||||||
try:
|
|
||||||
|
|
||||||
conn = self.get_connection()
|
|
||||||
with conn.cursor() as cur:
|
|
||||||
cur.execute(
|
|
||||||
"""
|
|
||||||
WITH next_emails AS (
|
|
||||||
SELECT id FROM ea_shadow_tactics
|
|
||||||
WHERE
|
|
||||||
taken_at IS NULL
|
|
||||||
AND server_name IS NULL
|
|
||||||
AND (is_finished IS NULL OR is_finished IS DISTINCT FROM TRUE)
|
|
||||||
AND login_status IS DISTINCT FROM FALSE
|
|
||||||
AND (backup_code IS NULL OR backup_code = '')
|
|
||||||
ORDER BY id
|
|
||||||
LIMIT 5
|
|
||||||
FOR UPDATE SKIP LOCKED
|
|
||||||
)
|
|
||||||
UPDATE ea_shadow_tactics
|
|
||||||
SET taken_at = NOW(),
|
|
||||||
server_name = %s,
|
|
||||||
group_id = %s
|
|
||||||
WHERE id IN (SELECT id FROM next_emails)
|
|
||||||
RETURNING id;
|
|
||||||
""",
|
|
||||||
(server_name, group_id),
|
|
||||||
)
|
|
||||||
updated_ids = [row[0] for row in cur.fetchall()]
|
|
||||||
conn.commit()
|
|
||||||
return updated_ids
|
|
||||||
finally:
|
|
||||||
self.release_connection(conn)
|
|
||||||
def get_group(self, server_name: str) -> List[dict]:
|
def get_group(self, server_name: str) -> List[dict]:
|
||||||
try:
|
try:
|
||||||
if self.has_open_group(server_name):
|
if self.has_open_group(server_name):
|
||||||
@@ -387,64 +331,54 @@ class EmailGroupManager:
|
|||||||
self.release_connection(conn)
|
self.release_connection(conn)
|
||||||
|
|
||||||
def append_to_history(self, email_id: int, message: str):
|
def append_to_history(self, email_id: int, message: str):
|
||||||
while True:
|
conn = self.get_connection()
|
||||||
|
try:
|
||||||
|
with conn.cursor() as cur:
|
||||||
try:
|
timestamp = datetime.utcnow().isoformat()
|
||||||
conn = self.get_connection()
|
cur.execute("""
|
||||||
with conn.cursor() as cur:
|
UPDATE ea_shadow_tactics
|
||||||
timestamp = datetime.utcnow().isoformat()
|
SET history = COALESCE(history, '{}'::jsonb) || %s::jsonb
|
||||||
cur.execute("""
|
WHERE id = %s
|
||||||
UPDATE ea_shadow_tactics
|
""", (json.dumps({timestamp: message}), email_id))
|
||||||
SET history = COALESCE(history, '{}'::jsonb) || %s::jsonb
|
conn.commit()
|
||||||
WHERE id = %s
|
print(f"history آپدیت شد برای ایمیل id={email_id}")
|
||||||
""", (json.dumps({timestamp: message}), email_id))
|
finally:
|
||||||
conn.commit()
|
self.release_connection(conn)
|
||||||
print(f"history آپدیت شد برای ایمیل id={email_id}")
|
|
||||||
break
|
|
||||||
finally:
|
|
||||||
self.release_connection(conn)
|
|
||||||
|
|
||||||
def mark_email_finished(self, email_id: int, success: bool, backup_code: Optional[str] = None):
|
def mark_email_finished(self, email_id: int, success: bool, backup_code: Optional[str] = None):
|
||||||
|
conn = self.get_connection()
|
||||||
while True:
|
try:
|
||||||
conn = self.get_connection()
|
|
||||||
try:
|
with conn.cursor() as cur:
|
||||||
|
cur.execute("""
|
||||||
with conn.cursor() as cur:
|
UPDATE ea_shadow_tactics
|
||||||
cur.execute("""
|
SET is_finished = TRUE,
|
||||||
UPDATE ea_shadow_tactics
|
finished_at = NOW(),
|
||||||
SET is_finished = TRUE,
|
login_status = %s,
|
||||||
finished_at = NOW(),
|
backup_code = %s
|
||||||
login_status = %s,
|
WHERE id = %s
|
||||||
backup_code = %s
|
""", (success, backup_code, email_id))
|
||||||
WHERE id = %s
|
conn.commit()
|
||||||
""", (success, backup_code, email_id))
|
print(f"ایمیل با id={email_id} با وضعیت login_status={success} فینیش شد.")
|
||||||
conn.commit()
|
finally:
|
||||||
print(f"ایمیل با id={email_id} با وضعیت login_status={success} فینیش شد.")
|
self.release_connection(conn)
|
||||||
break
|
|
||||||
finally:
|
|
||||||
self.release_connection(conn)
|
|
||||||
|
|
||||||
def mark_email_finished_nime(self, email_id: int, success: bool, backup_code: Optional[str] = None):
|
def mark_email_finished_nime(self, email_id: int, success: bool, backup_code: Optional[str] = None):
|
||||||
while True:
|
conn = self.get_connection()
|
||||||
conn = self.get_connection()
|
try:
|
||||||
try:
|
|
||||||
|
with conn.cursor() as cur:
|
||||||
with conn.cursor() as cur:
|
cur.execute("""
|
||||||
cur.execute("""
|
UPDATE ea_shadow_tactics
|
||||||
UPDATE ea_shadow_tactics
|
SET is_finished = TRUE,
|
||||||
SET is_finished = TRUE,
|
finished_at = NOW(),
|
||||||
finished_at = NOW(),
|
login_status = %s,
|
||||||
login_status = %s,
|
backup_code = %s
|
||||||
backup_code = %s
|
WHERE id = %s
|
||||||
WHERE id = %s
|
""", (False, 'ea_created__app_code_nead', email_id))
|
||||||
""", (False, 'ea_created__app_code_nead', email_id))
|
conn.commit()
|
||||||
conn.commit()
|
print(f"ایمیل با id={email_id} با وضعیت login_status={success} فینیش شد.")
|
||||||
print(f"ایمیل با id={email_id} با وضعیت login_status={success} فینیش شد.")
|
finally:
|
||||||
break
|
self.release_connection(conn)
|
||||||
finally:
|
|
||||||
self.release_connection(conn)
|
|
||||||
|
|
||||||
ip_v2ray='http://127.0.0.1:2017'
|
ip_v2ray='http://127.0.0.1:2017'
|
||||||
class pool():
|
class pool():
|
||||||
@@ -1352,29 +1286,7 @@ class ea_fucking():
|
|||||||
except:
|
except:
|
||||||
print(' eror >>> chalenge1_find_next')
|
print(' eror >>> chalenge1_find_next')
|
||||||
pass
|
pass
|
||||||
sleep(30)
|
sleep(55)
|
||||||
for i in range(4):
|
|
||||||
print(os.path.join(self.path_png_file,r'chalenge1_find_next.PNG'))
|
|
||||||
try:
|
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chalenge1_find_next.PNG'), confidence=0.8)
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
print(' ok >>> chalenge1_find_next')
|
|
||||||
#return 'ea_created__app_code_nead!!'
|
|
||||||
except:
|
|
||||||
print(' eror >>> chalenge1_find_next')
|
|
||||||
pass
|
|
||||||
sleep(30)
|
|
||||||
try:
|
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chalenge1_find_next.PNG'), confidence=0.8)
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
print(' chalenge1_find_next >>> EROR')
|
|
||||||
return 'send_code_page_stoped'
|
|
||||||
#return 'ea_created__app_code_nead!!'
|
|
||||||
except:
|
|
||||||
|
|
||||||
pass
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
||||||
@@ -1573,8 +1485,7 @@ class ea_fucking():
|
|||||||
return 'fail_14_tron_on'
|
return 'fail_14_tron_on'
|
||||||
def get_send_sec_3(self):
|
def get_send_sec_3(self):
|
||||||
sleep(10)
|
sleep(10)
|
||||||
if self.dicline()=='Internal Server Error':
|
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
||||||
return 'Internal Server Error'
|
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
try:
|
try:
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'14_tron_on.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'14_tron_on.PNG'), confidence=0.8)
|
||||||
@@ -1582,22 +1493,21 @@ class ea_fucking():
|
|||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
for i in range(15):
|
||||||
'''
|
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
||||||
|
print(os.path.join(self.path_png_file,r'15_send_sec_code_app_code.PNG'))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1_2.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
print('click it chek_True_1')
|
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
print('click it chek_True_1')
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
@@ -1605,13 +1515,10 @@ class ea_fucking():
|
|||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
print('click it chek_True_1')
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if location:
|
if location:
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_True_1.PNG'), confidence=0.8)
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
print('click it chek_True_1')
|
|
||||||
for i in range(6):
|
for i in range(6):
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
@@ -1631,62 +1538,15 @@ class ea_fucking():
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
continue
|
continue
|
||||||
import pdb;pdb.set_trace()'''
|
|
||||||
check_images = ['chek_True_1_2.PNG', 'chek_True_1.PNG']
|
|
||||||
|
|
||||||
# تلاش برای پیدا کردن یکی از تصاویر True
|
|
||||||
found = False
|
|
||||||
for image in check_images:
|
|
||||||
try:
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file, image), confidence=0.8)
|
|
||||||
if location:
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
print(f'Clicked on {image}')
|
|
||||||
found = True
|
|
||||||
break
|
|
||||||
except:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if found:
|
|
||||||
# زدن 6 تا tab و 1 enter
|
|
||||||
for _ in range(6):
|
|
||||||
pyautogui.press('tab')
|
|
||||||
sleep(0.5)
|
|
||||||
#pyautogui.press('enter')
|
|
||||||
sleep(10)
|
|
||||||
try:
|
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file, 'towfacktor.PNG'), confidence=0.8)
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
pyautogui.press('tab')
|
|
||||||
pyautogui.press('enter')
|
|
||||||
except Exception as e:
|
|
||||||
print('eror ==========towfacktor=============',e)
|
|
||||||
sleep(10)
|
|
||||||
pyautogui.press('enter')
|
|
||||||
# تلاش برای پیدا کردن send_code_new.PNG
|
|
||||||
sleep(10)
|
|
||||||
for _ in range(10):
|
|
||||||
try:
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file, 'send_code_new.PNG'), confidence=0.8)
|
|
||||||
if location:
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
return True
|
|
||||||
except:
|
|
||||||
continue
|
|
||||||
return 'fail_15_send_sec_code_app_code'
|
return 'fail_15_send_sec_code_app_code'
|
||||||
# https://myaccount.ea.com/cp-ui/aboutme/index
|
# https://myaccount.ea.com/cp-ui/aboutme/index
|
||||||
|
|
||||||
|
|
||||||
def handel_page_and_code(self,codex,value,val2):
|
def handel_page_and_code(self,codex,value,val2):
|
||||||
sleep(50)
|
sleep(30)
|
||||||
codex.end()
|
codex.end()
|
||||||
codex=Gmail(value,val2,browser_proxy=browser_proxy)
|
codex=Gmail(value,val2,browser_proxy=browser_proxy)
|
||||||
codes=''
|
codes=''
|
||||||
|
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
@@ -1721,10 +1581,8 @@ class ea_fucking():
|
|||||||
return 'fail_get_code'
|
return 'fail_get_code'
|
||||||
|
|
||||||
chek=''
|
chek=''
|
||||||
#import pdb;pdb.set_trace()
|
|
||||||
sleep(5)
|
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
smb=False
|
|
||||||
|
|
||||||
print(os.path.join(self.path_png_file,r'veryfy_idyntt.PNG'))
|
print(os.path.join(self.path_png_file,r'veryfy_idyntt.PNG'))
|
||||||
try:
|
try:
|
||||||
@@ -1740,23 +1598,19 @@ class ea_fucking():
|
|||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'box_for_codee.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'veryfy_idyntt.PNG'), confidence=0.8)
|
||||||
smb=True
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
if smb==True:
|
pyautogui.press('tab')
|
||||||
pass
|
|
||||||
else:
|
|
||||||
pyautogui.press('tab')
|
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
print('input code selcted',i)
|
|
||||||
for i_code in code:
|
for i_code in code:
|
||||||
pyautogui.write(i_code)
|
pyautogui.write(i_code)
|
||||||
print('handel_page_and_code mission 21 next !!!!',i_code)
|
print('handel_page_and_code mission 21 next !!!!')
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
pyautogui.press('enter')
|
pyautogui.press('enter')
|
||||||
sleep(5)
|
sleep(5)
|
||||||
@@ -1799,40 +1653,42 @@ class ea_fucking():
|
|||||||
continue
|
continue
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if location:
|
||||||
|
pyautogui.click(pyautogui.center(location))
|
||||||
|
sleep(5)
|
||||||
|
try:
|
||||||
|
|
||||||
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'16_submit.PNG'), confidence=0.8)
|
||||||
|
print('code eror 16_submit')
|
||||||
|
pyautogui.hotkey('ctrl', 'a')
|
||||||
|
pyautogui.press('backspace')
|
||||||
|
|
||||||
|
continue
|
||||||
try:
|
except:
|
||||||
|
pass
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'), confidence=0.8)
|
|
||||||
chek=True
|
try:
|
||||||
break
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_tow_factor_1.PNG'), confidence=0.8)
|
||||||
except:
|
chek=True
|
||||||
pass
|
break
|
||||||
try:
|
except:
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'chek_tow_factor_1.PNG'), confidence=0.8)
|
pass
|
||||||
chek=True
|
try:
|
||||||
break
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'one_trn.PNG'), confidence=0.8)
|
||||||
except:
|
chek=True
|
||||||
pass
|
break
|
||||||
try:
|
except:
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'one_trn.PNG'), confidence=0.8)
|
pass
|
||||||
chek=True
|
|
||||||
break
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if chek==True:
|
if chek==True:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
# import pdb;pdb.set_trace()
|
|
||||||
return 'faill_all_code'
|
return 'faill_all_code'
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
print(e)
|
|
||||||
import pdb;pdb.set_trace()
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
import pdb;pdb.set_trace()
|
|
||||||
if chek==True:
|
if chek==True:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@@ -1840,38 +1696,22 @@ class ea_fucking():
|
|||||||
sleep(10)
|
sleep(10)
|
||||||
chek22=''
|
chek22=''
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
#if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
||||||
print(os.path.join(self.path_png_file,r'one_trn.PNG'))
|
print(os.path.join(self.path_png_file,r'one_trn.PNG'))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'), confidence=0.8)
|
|
||||||
chek22=True
|
|
||||||
break
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'one_trn.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'one_trn.PNG'), confidence=0.8)
|
||||||
except:
|
except:
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'one_trn.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'one_trn.PNG'), confidence=0.8)
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
|
|
||||||
|
|
||||||
print('handel_page_and_code mission 3 next !!!!')
|
print('handel_page_and_code mission 3 next !!!!')
|
||||||
chek22=True
|
chek22=True
|
||||||
break
|
break
|
||||||
#https://e1_1_dcuk_clik.PNG
|
#https://e1_1_dcuk_clik.PNG
|
||||||
try:
|
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'), confidence=0.8)
|
|
||||||
chek22=True
|
|
||||||
break
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -1882,25 +1722,17 @@ class ea_fucking():
|
|||||||
return 'Two-factor authentication'
|
return 'Two-factor authentication'
|
||||||
chek3=''
|
chek3=''
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
# if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
||||||
print(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'))
|
print(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'), confidence=0.8)
|
||||||
except:
|
except:
|
||||||
try:
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'), confidence=0.8)
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_2app_authentctor.PNG'), confidence=0.8)
|
|
||||||
except:
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_3app_authentctor.PNG'), confidence=0.8)
|
|
||||||
|
|
||||||
|
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
pyautogui.press('tab')
|
|
||||||
pyautogui.press('enter')
|
|
||||||
pyautogui.press('enter')
|
|
||||||
|
|
||||||
print('handel_page_and_code mission 3 next !!!!')
|
print('handel_page_and_code mission 3 next !!!!')
|
||||||
chek3=True
|
chek3=True
|
||||||
break
|
break
|
||||||
@@ -1908,19 +1740,16 @@ class ea_fucking():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
continue
|
continue
|
||||||
sleep(10)
|
#sleep(10)
|
||||||
# import pdb;pdb.set_trace()
|
|
||||||
if chek3==True:
|
if chek3==True:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
return '17_app_authentctor'
|
return '17_app_authentctor'
|
||||||
chek4=''
|
chek4=''
|
||||||
#self.dicline()
|
self.dicline()
|
||||||
'''for i in range(30):
|
for i in range(30):
|
||||||
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
||||||
print(os.path.join(self.path_png_file,r'18_send_code.PNG.PNG.PNG'))
|
print(os.path.join(self.path_png_file,r'18_send_code.PNG.PNG.PNG'))
|
||||||
pyautogui.press('down')
|
|
||||||
pyautogui.press('down')
|
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
@@ -1973,12 +1802,10 @@ class ea_fucking():
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
return '18_send_code'
|
return '18_send_code'
|
||||||
sleep(10)'''
|
sleep(10)
|
||||||
chek5=''
|
chek5=''
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
# pyautogui.press('down')
|
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
||||||
# pyautogui.press('down')
|
|
||||||
# if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
|
||||||
print(os.path.join(self.path_png_file,r'19_continue.PNG.PNG.PNG.PNG'))
|
print(os.path.join(self.path_png_file,r'19_continue.PNG.PNG.PNG.PNG'))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
@@ -1995,23 +1822,7 @@ class ea_fucking():
|
|||||||
#https://e1_1_dcuk_clik.PNG
|
#https://e1_1_dcuk_clik.PNG
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
continue
|
||||||
try:
|
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_app_authentctor.PNG'), confidence=0.8)
|
|
||||||
except:
|
|
||||||
try:
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_2app_authentctor.PNG'), confidence=0.8)
|
|
||||||
except:
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'17_3app_authentctor.PNG'), confidence=0.8)
|
|
||||||
|
|
||||||
if location:
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
pyautogui.press('tab')
|
|
||||||
pyautogui.press('enter')
|
|
||||||
print('handel_page_and_code mission 3 next !!!!')
|
|
||||||
|
|
||||||
continue
|
|
||||||
if chek5==True:
|
if chek5==True:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@@ -2027,11 +1838,8 @@ class ea_fucking():
|
|||||||
else:
|
else:
|
||||||
return 'click_code'
|
return 'click_code'
|
||||||
chek6=''
|
chek6=''
|
||||||
sleep(8)
|
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
|
if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
||||||
|
|
||||||
#if self.dicline()=='Internal Server Error':return 'Internal Server Error'
|
|
||||||
print(os.path.join(self.path_png_file,r'komaki.PNG.PNG.PNG.PNG.PNG'))
|
print(os.path.join(self.path_png_file,r'komaki.PNG.PNG.PNG.PNG.PNG'))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
@@ -2039,13 +1847,9 @@ class ea_fucking():
|
|||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'komaki.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'komaki.PNG'), confidence=0.8)
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
sleep(1)
|
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
sleep(1)
|
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
sleep(1)
|
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
sleep(1)
|
|
||||||
pyautogui.write(totx)
|
pyautogui.write(totx)
|
||||||
print('handel_page_and_code mission 3 next !!!!')
|
print('handel_page_and_code mission 3 next !!!!')
|
||||||
chek6=True
|
chek6=True
|
||||||
@@ -2057,13 +1861,9 @@ class ea_fucking():
|
|||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'komaki.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'komaki.PNG'), confidence=0.8)
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
sleep(1)
|
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
sleep(1)
|
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
sleep(1)
|
|
||||||
pyautogui.press('tab')
|
pyautogui.press('tab')
|
||||||
sleep(1)
|
|
||||||
pyautogui.write(totx)
|
pyautogui.write(totx)
|
||||||
print('handel_page_and_code mission 3 next !!!!')
|
print('handel_page_and_code mission 3 next !!!!')
|
||||||
chek6=True
|
chek6=True
|
||||||
@@ -2096,10 +1896,7 @@ class ea_fucking():
|
|||||||
return 'input_bouten1'
|
return 'input_bouten1'
|
||||||
chek7=''
|
chek7=''
|
||||||
#spam = pyperclip.paste()
|
#spam = pyperclip.paste()
|
||||||
sleep(8)
|
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
pyautogui.press('down')
|
|
||||||
pyautogui.press('down')
|
|
||||||
print(os.path.join(self.path_png_file,r'20_turn_on_login.PNG.PNG.PNG.PNG'))
|
print(os.path.join(self.path_png_file,r'20_turn_on_login.PNG.PNG.PNG.PNG'))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
@@ -2124,11 +1921,6 @@ class ea_fucking():
|
|||||||
chek8=''
|
chek8=''
|
||||||
#spam = pyperclip.paste()
|
#spam = pyperclip.paste()
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
pyautogui.press('down')
|
|
||||||
pyautogui.press('down')
|
|
||||||
pyautogui.press('down')
|
|
||||||
pyautogui.press('down')
|
|
||||||
time.sleep(10)
|
|
||||||
print(os.path.join(self.path_png_file,r'vew_back_up.PNG.PNG.PNG.PNG.PNG'))
|
print(os.path.join(self.path_png_file,r'vew_back_up.PNG.PNG.PNG.PNG.PNG'))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
@@ -2137,7 +1929,6 @@ class ea_fucking():
|
|||||||
except:
|
except:
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'vew_back_up.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'vew_back_up.PNG'), confidence=0.8)
|
||||||
if location:
|
if location:
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
pyautogui.click(pyautogui.center(location))
|
||||||
chek8=True
|
chek8=True
|
||||||
print('handel_page_and_code mission 3 next !!!!')
|
print('handel_page_and_code mission 3 next !!!!')
|
||||||
@@ -2146,7 +1937,6 @@ class ea_fucking():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
continue
|
continue
|
||||||
#back_done.PNG
|
|
||||||
if chek8==True:
|
if chek8==True:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@@ -2158,29 +1948,12 @@ class ea_fucking():
|
|||||||
copied_text = pyperclip.paste()
|
copied_text = pyperclip.paste()
|
||||||
pattern = r'\d+\.\d+'
|
pattern = r'\d+\.\d+'
|
||||||
codes = str(re.findall(pattern, copied_text))
|
codes = str(re.findall(pattern, copied_text))
|
||||||
if len(codes)==0:
|
|
||||||
try:
|
|
||||||
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'vew_back_up.PNG'), confidence=0.8)
|
|
||||||
pyautogui.press('tab')
|
|
||||||
pyautogui.press('enter')
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
time.sleep(10)
|
|
||||||
pyautogui.hotkey('ctrl', 'a')
|
|
||||||
pyautogui.hotkey('ctrl', 'c')
|
|
||||||
time.sleep(2)
|
|
||||||
copied_text = pyperclip.paste()
|
|
||||||
pattern = r'\d+\.\d+'
|
|
||||||
codes = str(re.findall(pattern, copied_text))
|
|
||||||
|
|
||||||
#\d+\.\d+
|
#\d+\.\d+
|
||||||
try:
|
try:
|
||||||
|
|
||||||
return [tot,'$$',codes]
|
return [tot,'$$',codes]
|
||||||
except:
|
except:
|
||||||
return 'tot'
|
return 'tot'
|
||||||
|
|
||||||
def chek_by_pdb(self,name):
|
def chek_by_pdb(self,name):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
return name
|
return name
|
||||||
@@ -2215,31 +1988,19 @@ class ea_fucking():
|
|||||||
pass
|
pass
|
||||||
###########################################
|
###########################################
|
||||||
###########################################
|
###########################################
|
||||||
|
|
||||||
try:
|
try:
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'decline_base.PNG'), confidence=0.8)
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'decline_3.PNG'), confidence=0.8)
|
||||||
|
pyautogui.click(pyautogui.center(location))
|
||||||
flag1=True
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
if flag1==True:
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'decline_3_test.PNG'), confidence=0.8)
|
||||||
|
pyautogui.click(pyautogui.center(location))
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'decline_3.PNG'), confidence=0.8)
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
if flag1==True:
|
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'decline_3_1test.PNG'), confidence=0.8)
|
||||||
|
pyautogui.click(pyautogui.center(location))
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'decline_3_test.PNG'), confidence=0.8)
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
if flag1==True:
|
|
||||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'decline_3_1test.PNG'), confidence=0.8)
|
|
||||||
pyautogui.click(pyautogui.center(location))
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -2316,9 +2077,9 @@ class Gmail:
|
|||||||
|
|
||||||
|
|
||||||
self.driver.switch_to.window(self.driver.window_handles[0])
|
self.driver.switch_to.window(self.driver.window_handles[0])
|
||||||
#if "Verify" in self.driver.page_source:
|
if "Verify" in self.driver.page_source:
|
||||||
# self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
||||||
# return 'robot'
|
return 'robot'
|
||||||
if "Verify it" in self.driver.page_source:
|
if "Verify it" in self.driver.page_source:
|
||||||
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
||||||
return 'robot'
|
return 'robot'
|
||||||
@@ -2407,12 +2168,13 @@ class Gmail:
|
|||||||
return 'robot'
|
return 'robot'
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
#if "Verify" in self.driver.page_source:
|
''' if "Verify" in self.driver.page_source:
|
||||||
# self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
||||||
# return 'robot'
|
return 'robot'
|
||||||
if "Verify it" in self.driver.page_source:
|
if "Verify it" in self.driver.page_source:
|
||||||
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
||||||
return 'robot'
|
return 'robot'
|
||||||
|
'''
|
||||||
if 'Wrong password. Try again or click Forgot password to reset it.' in self.driver.page_source:
|
if 'Wrong password. Try again or click Forgot password to reset it.' in self.driver.page_source:
|
||||||
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}_pasword_eror.png"))
|
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}_pasword_eror.png"))
|
||||||
return 'pas_eror'
|
return 'pas_eror'
|
||||||
@@ -3684,9 +3446,6 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
send_green_status(server)
|
send_green_status(server)
|
||||||
result=main(path_png_file,browser,os.path.join(path_file,value),get_cookes=check_cookiesx,codex=codexs,value=value, val2=val2,browser_proxy=browser_proxy)
|
result=main(path_png_file,browser,os.path.join(path_file,value),get_cookes=check_cookiesx,codex=codexs,value=value, val2=val2,browser_proxy=browser_proxy)
|
||||||
sleep(10)
|
|
||||||
# import pdb;pdb.set_trace()
|
|
||||||
# import pdb;pdb.set_trace()
|
|
||||||
###################
|
###################
|
||||||
# fail_15_send_sec_code_app_code
|
# fail_15_send_sec_code_app_code
|
||||||
# if '11111111' in result:
|
# if '11111111' in result:
|
||||||
@@ -3806,4 +3565,3 @@ if __name__ == "__main__":
|
|||||||
print(e)
|
print(e)
|
||||||
with open('exitlogs.txt','a')as fxs:
|
with open('exitlogs.txt','a')as fxs:
|
||||||
fxs.write(str(e)+'\n')
|
fxs.write(str(e)+'\n')
|
||||||
group_data.clear()
|
|
||||||
|
Reference in New Issue
Block a user