def create_account(driver, x_i, y_i): print(Fore.CYAN+"Creating Account...........", Fore.WHITE) print() word = RandomWord(max_word_size = 7).generate()+str(random.randint(0, 9))+str(random.randint(0, 9)) word = word.lower() driver.get("https://mail.protonmail.com/create/new?language=en") randpwd = random_pwd() time.sleep(1) WebDriverWait(driver, 60).until(EC.visibility_of_element_located( (By.TAG_NAME, 'iframe'))) time.sleep(.5) driver.switch_to.frame(driver.find_element_by_tag_name("iframe")) WebDriverWait(driver, 60).until(EC.presence_of_element_located( (By.ID, 'username'))).click time.sleep(.5) username = WebDriverWait(driver, 60).until(EC.presence_of_element_located( (By.ID, 'username'))) for i in word: username.send_keys(i) time.sleep(.1) driver.switch_to.default_content() print(Fore.CYAN+"Please wait\n\n", Fore.WHITE) password = WebDriverWait(driver, 60).until( EC.element_to_be_clickable((By.ID, 'password'))) for i in randpwd: password.send_keys(i) time.sleep(.1) time.sleep(.5) print(Fore.CYAN+"Please wait\n\n", Fore.WHITE) input_value(driver, '//*[@id = "passwordc"]', randpwd) time.sleep(.5) driver.switch_to.frame(driver.find_element_by_class_name("bottom")) human_move(driver, '//*[@id = "app"]/div/footer/button', x_i, y_i) driver.switch_to.default_content() time.sleep(1) check_error = True while check_error == True: try: WebDriverWait(driver, 4).until( EC.presence_of_element_located((By.CSS_SELECTOR, 'div[class = "modal-footer"]'))) check_error = False except: print(Fore.RED+"\nUsername error\n", Fore.WHITE) print(Fore.LIGHTGREEN_EX+"Solving", Fore.WHITE) randuser = random_user() driver.switch_to.frame(driver.find_element_by_tag_name("iframe")) while username.get_attribute('value') != '': username.send_keys(Keys.BACKSPACE) randuser = random_user() for i in randuser: username.send_keys(i) time.sleep(.1) driver.switch_to.default_content() time.sleep(.5) driver.switch_to.frame(driver.find_element_by_class_name("bottom")) human_move(driver, '//*[@id = "app"]/div/footer/button', x_i, y_i) driver.switch_to.default_content() print(Fore.LIGHTGREEN_EX+"Maybe solved", Fore.WHITE) check_error = True time.sleep(.3) human_move(driver, '//*[@id = "confirmModalBtn"]', x_i, y_i) time.sleep(1) try: human_move(driver, '//*[@id="verification-panel"]/div[3]/label/div', x_i, y_i) human_move(driver, '//*[@id="verification-panel"]/div[2]/label/div', x_i, y_i) except: print(Fore.RED+"Looks like YOU have abused the bot!! Try Again later", Fore.WHITE) input("Press enter/return key to exit.") driver.close() return human_move(driver, '//*[@id="emailVerification"]',x_i,y_i) domain = ['boximail.com'] email = word + "@" + random.choice(domain) input_value(driver, '//*[@id ="emailVerification"]', email) human_move(driver, '//*[@id="verification-panel"]/form[1]/div[1]/div[2]/button', x_i, y_i) check_error = True while check_error: #check if domain is blocked try: time.sleep(1) driver.find_element_by_xpath('//*[@id="signup"]/div[4]') email = word + "@" + random.choice(domain) driver.find_element_by_xpath('//*[@id ="emailVerification"]').clear() input_value(driver, '//*[@id ="emailVerification"]', email) human_move(driver, '//*[@id="verification-panel"]/form[1]/div[1]/div[2]/button', x_i, y_i) time.sleep(1) except: check_error = False while True: try: uid = requests.get(f"https://getnada.com/api/v1/inboxes/{email}").json() uid = uid["msgs"][0]["uid"] break except: time.sleep(1) pass html = requests.get(f"https://getnada.com/api/v1/messages/html/{uid}").content soup = bs(html,"html5lib") code = soup.find("code").text human_move(driver, '//*[@id="codeValue"]',x_i, y_i) code_input = WebDriverWait(driver, 60).until(EC.element_to_be_clickable((By.CSS_SELECTOR, 'input[type = "text"]'))) for i in code: code_input.send_keys(i) time.sleep(.1) human_move(driver, '//*[@id="verification-panel"]/p[3]/button', x_i, y_i) # Complete setup btn time.sleep(1) human_move(driver, '//*[@id="confirmModalBtn"]',x_i,y_i) for _ in range(0, 3): human_move(driver, '//*[@id="pm_wizard"]/div/div[5]/button[1]',x_i,y_i) time.sleep(.5) human_move(driver, '//*[@id="pm_wizard"]/div/div[5]/button[2]',x_i,y_i) print(Fore.GREEN+"\nAccount Details.\n", Fore.WHITE) username = "******" + word password = "******" + randpwd with open("Accounts.txt", 'a') as f: f.write(datetime.now().strftime("%Y-%m-%d %H:%M")+"\n") f.write(username+"\n") f.write(password+"\n") f.write("-------------------------------\n") print(username) print(password) return
def gen(): word = RandomWord(max_word_size=7).generate() + str(random.randint( 0, 9)) + str(random.randint(0, 9)) word = word.lower() email = word + "@zetmail.com" headers = { 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-US,en;q=0.9', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'DNT': '1', 'Host': 'account.cosmote.gr', 'Origin': 'https://account.cosmote.gr', 'Referer': 'https://account.cosmote.gr/register?nakedRegister&chid=foodboxweb&alt-theme=third-party', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'same-origin', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.63', 'X-Requested-With': 'XMLHttpRequest', } data = { "username-autofill": "", "password-autofill": "", "csm-email": email, "csm-name": "fVictor", "csm-surname": "fbrown", "csm-password": "******", "csm-recovery-asset": "*****@*****.**", "csm-mail": "*****@*****.**" } s = requests.session() s.get( "https://account.cosmote.gr/el/register?nakedRegister&chid=foodboxweb&alt-theme=third-party" ) cosmote = "https://account.cosmote.gr/register?p_p_id=Cosmoteid_INSTANCE_ElwamDfwl07C&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=registerUserNaked&p_p_cacheability=cacheLevelPage" s.post(url=cosmote, data=data, headers=headers) sleep(1) token = [] while token == []: token = s.get(f"https://getnada.com/api/v1/inboxes/{email}").json() token = token["msgs"] token = token[0]["uid"] html = s.get(f"https://getnada.com/api/v1/messages/html/{token}").content print(html) soup = bs(html, "html5lib") url = soup.find("a", attrs={'id': 'emailSubmitImageUrl'})['href'] s.get(url) data = { "IDToken1": f"{email}", "IDToken2": "TECHTANIC#8090", "realm": "hub", "goto": "https://account.cosmote.gr/user-login", "gotoOnFail": "https://account.cosmote.gr/user-login?p_p_id=CosmoteLogin_INSTANCE_XQ2b6cwTiH8w&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&_CosmoteLogin_INSTANCE_XQ2b6cwTiH8w_loginError=true&channelLoginError=true&chid=ACCOUNTS&" } s.post("https://idmextsso.ote.gr/opensso/OTECloudLogin", data=data) #verify s.get("https://box.gr/") data = { "IDToken1": f"{email}", "IDToken2": "TECHTANIC#8090", "realm": "hub", "goto": "https%3A%2F%2Fidmextsso.cosmote.gr%2Fauth%2Frealms%2Fhub%2Fprotocol%2Fopenid-connect%2Fauth%3Fresponse_type%3Dcode%26scope%3Dopenid%26client_id%3Dboxweb%26redirect_uri%3Dhttps%3A%2F%2Fbox.gr%2Flogin", "gotoOnFail": "https://account.cosmote.gr/el/modalloginextended?p_p_id=CosmoteModalLoginExtended&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&_CosmoteModalLoginExtended_fullPageRedirect=true&_CosmoteModalLoginExtended_loginError=true" } headers = { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US,en;q=0.9", "Cache-Control": "max-age=0", "Connection": "keep-alive", "Content-Type": "application/x-www-form-urlencoded", "DNT": "1", "Host": "idmextsso.ote.gr", "Origin": "https://box.gr", "Referer": "https://box.gr/", "Sec-Fetch-Dest": "document", "Sec-Fetch-Mode": "navigate", "Sec-Fetch-Site": "cross-site", "Sec-Fetch-User": "******", "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.70" } s.post("https://idmextsso.ote.gr/opensso/OTECloudLogin", data=data, headers=headers) ### r = s.get( "https://idmextsso.ote.gr/opensso/OTECloudLogin?target=https%3A%2F%2Fidmextsso.cosmote.gr%2Fauth%2Frealms%2Fhub%2Fprotocol%2Fopenid-connect%2Fauth%3Fresponse_type%3Dcode%26scope%3Dopenid%26client_id%3Dboxweb%26redirect_uri%3Dhttps%3A%2F%2Fbox.gr%2Flogin&realm=hub&stage=1" ) #data = {"address":[{"type":"Σπίτι","latitude":"38.04623159999999","longitude":"23.8183371","city":"Μαρούσι","streetNo":"75","street":"Μεσογείων","region":"Περιφερειακή ενότητα Βορείου Τομέα Αθηνών","postalCode":"15126","floor":"2","nameAtBell":"γιαννης","comments":"null","firstName":"fVictor","lastName":"fbrown"}]} return email