Update main.py

new update for by pass
This commit is contained in:
2025-10-10 15:07:19 +00:00
parent 330031a187
commit 24866cced6

34
main.py
View File

@@ -2006,8 +2006,9 @@ class ea_fucking():
class Gmail: class Gmail:
def __init__(self, name, pasword, browser_proxy): def __init__(self, name, pasword, browser_proxy,back___mail=''):
self.flag_exit = None self.flag_exit = None
self.back___mail = back___mail
self.name = name self.name = name
self.pasword = pasword self.pasword = pasword
@@ -2175,6 +2176,29 @@ class Gmail:
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'
''' '''
# import pdb;pdb.set_trace()
xxn=self.driver.find_elements(By.XPATH, "//*[contains(text(), 'Confirm your recovery email')]")
try:
xxn.click()
except:
pass
for i in xxn:
try:
i.click()
except:
pass
try:
elem = self.driver.execute_script("return document.activeElement")
except:
elem = self.driver.execute_script("return document.activeElement")
elem.send_keys(self.back___mail)
elem.send_keys(Keys.ENTER)
sleep(20)
self.driver.get('https://mail.google.com/mail/u/0/#inbox')
sleep(5)
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'
@@ -3156,6 +3180,7 @@ def delete_if_low_disk_space(path_to_check, folder_to_delete, threshold_gb=10):
if __name__ == "__main__": if __name__ == "__main__":
conter_port=0 conter_port=0
@@ -3171,7 +3196,7 @@ if __name__ == "__main__":
print(db_config) print(db_config)
manager = EmailGroupManager(db_config) manager = EmailGroupManager(db_config)
group_data=[] group_data=[{'id': 15683, 'email': 'td621003@gmail.com', 'email_password': 'uGs9UhAmZ3', 'back_up_mail': 'vodungf24uq@disbox.org', 'seler_name': 'atefe_2', 'group_id': 128}]
while True: while True:
try: try:
@@ -3210,6 +3235,7 @@ if __name__ == "__main__":
#df = pd.read_excel(os.path.join(path_file, ixs), engine='openpyxl') #df = pd.read_excel(os.path.join(path_file, ixs), engine='openpyxl')
print(ixs) print(ixs)
# {'id': 4, 'email': 'sunnmp97667@gmail.com', 'email_password': 'Exgvufc6Rxtf'} # {'id': 4, 'email': 'sunnmp97667@gmail.com', 'email_password': 'Exgvufc6Rxtf'}
back_up_mail=ixs['back_up_mail']
value=ixs['email'] value=ixs['email']
val2=ixs['email_password'] val2=ixs['email_password']
id_mail=ixs['id'] id_mail=ixs['id']
@@ -3272,7 +3298,7 @@ if __name__ == "__main__":
os.system("taskkill /f /im uc_driver.exe") os.system("taskkill /f /im uc_driver.exe")
os.system("taskkill /f /im chromedriver.exe") os.system("taskkill /f /im chromedriver.exe")
codexs=Gmail(value,val2,browser_proxy=browser_proxy) codexs=Gmail(value,val2,browser_proxy=browser_proxy,back___mail=back_up_mail)
try: try:
@@ -3281,7 +3307,7 @@ if __name__ == "__main__":
if codexs.flag_exit==True: if codexs.flag_exit==True:
codexs.flag_exit=None codexs.flag_exit=None
codexs.end() codexs.end()
codexs=Gmail(value,val2,browser_proxy=browser_proxy) codexs=Gmail(value,val2,browser_proxy=browser_proxy,back___mail=back_up_mail)
check_cookiesx=str(codexs.check_cookies()) check_cookiesx=str(codexs.check_cookies())
if 'pas_eror' in check_cookiesx: if 'pas_eror' in check_cookiesx: