diff --git a/mega.py b/mega.py index dd371f6..5bd99fe 100644 --- a/mega.py +++ b/mega.py @@ -69,41 +69,41 @@ driver.get("https://mega.nz/register") time.sleep(17) print(f"{GREEN}[Mega] Debug: Cookie") - driver.find_element_by_xpath("//*[@id='bodyel']/section[1]/div[4]/div[1]/div[2]/button[1]").click() + driver.find_element(By.XPATH,"//*[@id='bodyel']/section[1]/div[4]/div[1]/div[2]/button[1]").click() time.sleep(2) print(f"{GREEN}[Mega] Debug: Firstname") - driver.find_element_by_xpath("//*[@id='register-firstname-registerpage2']").click() + driver.find_element(By.XPATH,"//*[@id='register-firstname-registerpage2']").click() time.sleep(0.5) - driver.find_element_by_xpath("//*[@id='register-firstname-registerpage2']").send_keys(surname) + driver.find_element(By.XPATH,"//*[@id='register-firstname-registerpage2']").send_keys(surname) time.sleep(2) print(f"{GREEN}[Mega] Debug: Lastname") - driver.find_element_by_xpath("//*[@id='register-lastname-registerpage2']").click() + driver.find_element(By.XPATH,"//*[@id='register-lastname-registerpage2']").click() time.sleep(0.5) - driver.find_element_by_xpath("//*[@id='register-lastname-registerpage2']").send_keys(lastname) + driver.find_element(By.XPATH,"//*[@id='register-lastname-registerpage2']").send_keys(lastname) time.sleep(2) print(f"{GREEN}[Mega] Debug: Email") - driver.find_element_by_xpath("//*[@id='register-email-registerpage2']").click() + driver.find_element(By.XPATH,"//*[@id='register-email-registerpage2']").click() time.sleep(0.5) - driver.find_element_by_xpath("//*[@id='register-email-registerpage2']").send_keys(email[0] + domain) + driver.find_element(By.XPATH,"//*[@id='register-email-registerpage2']").send_keys(email[0] + domain) time.sleep(2) print(f"{GREEN}[Mega] Debug: Password") - driver.find_element_by_xpath("//*[@id='register-password-registerpage2']").click() + driver.find_element(By.XPATH,"//*[@id='register-password-registerpage2']").click() time.sleep(0.5) - driver.find_element_by_xpath("//*[@id='register-password-registerpage2']").send_keys(password) + driver.find_element(By.XPATH,"//*[@id='register-password-registerpage2']").send_keys(password) time.sleep(2) print(f"{GREEN}[Mega] Debug: Verify Password") - driver.find_element_by_xpath("//*[@id='register-password-registerpage3']").click() + driver.find_element(By.XPATH,"//*[@id='register-password-registerpage3']").click() time.sleep(0.5) - driver.find_element_by_xpath("//*[@id='register-password-registerpage3']").send_keys(password) + driver.find_element(By.XPATH,"//*[@id='register-password-registerpage3']").send_keys(password) time.sleep(2) print(f"{magenta}[Mega] Debug: Checkbox 1") - driver.find_element_by_xpath("//*[@id='register_form']/div[8]/label").click() + driver.find_element(By.XPATH,"//*[@id='register_form']/div[8]/label").click() time.sleep(2) print(f"{magenta}[Mega] Debug: Checkbox 2") - driver.find_element_by_id("register-check-registerpage2").click() + driver.find_element(By.ID,"register-check-registerpage2").click() time.sleep(2) print(f"{magenta}[Mega] Debug: Click Button") - driver.find_element_by_xpath("//*[@id='register_form']/button").click() + driver.find_element(By.XPATH,"//*[@id='register_form']/button").click() time.sleep(10) print(f"{cyan}[Xitroo] Debug: Open Xitroo") driver.get("https://xitroo.de/#" + email[0]) @@ -113,23 +113,23 @@ print(f"{red}[Xitroo] Debug: Click Email in Inbox") try: print(f"{red}>> Trying Desktop Element") - driver.find_element_by_xpath("//*[@id='mailList']/tr").click() + driver.find_element(By.XPATH,"//*[@id='mailList']/tr").click() pass except NoSuchElementException: print(f"{red}>> Trying Mobile Element") - driver.find_element_by_xpath("//*[@id='mailListMobile']").click() + driver.find_element(By.XPATH,"//*[@id='mailListMobile']").click() pass except : print(f"{red}[Warning] Email Confirmation not recieved!") pass time.sleep(2) - iframe = driver.find_element_by_id("mailContentFrame") + iframe = driver.find_element(By.ID,"mailContentFrame") time.sleep(1) print(f"{cyan}[Xitroo] Debug: Switch to Iframe") driver.switch_to.frame(iframe) time.sleep(2) print(f"{blue}[Xitroo] Debug: Click Verification Button") - driver.find_element_by_xpath("//*[@id='frameContent']/table/tbody/tr[1]/td[2]/table/" + driver.find_element(By.XPATH,"//*[@id='frameContent']/table/tbody/tr[1]/td[2]/table/" "tbody/tr/td/table/tbody/tr/td").click() time.sleep(3) print(f"{blue}[Xitroo] Debug: Switch to Parent Iframe") @@ -139,12 +139,12 @@ driver.switch_to.window(driver.window_handles[1]) time.sleep(3) print(f"{blue}[Mega] Debug: Password") - driver.find_element_by_id("login-password2").click() + driver.find_element(By.ID,"login-password2").click() time.sleep(0.5) - driver.find_element_by_id("login-password2").send_keys(password) + driver.find_element(By.ID,"login-password2").send_keys(password) time.sleep(2) print(f"{blue}[Mega] Debug: Click Button") - driver.find_element_by_xpath("//*[@id='login_form']/button").click() + driver.find_element(By.XPATH,"//*[@id='login_form']/button").click() time.sleep(5) with open("Accounts.txt", "a+") as f: f.write(f"{email[0]}{domain}:{password}\n")