diff --git a/README.md b/README.md index 5fd71db..cc67f3e 100644 --- a/README.md +++ b/README.md @@ -68,22 +68,23 @@ sudo apt install chromium-chromedriver ## ⚙️ Config Document -| Name | Description | -|-----------------|------------------------------------------------------------------| -| Prefix | Log Prefix (Default: &beGen&5>> ) | -| ProxyFile | proxy file path (Default: proxy.txt) | -| OutputFile | output file path (Default: account.txt) | -| Timer | Generate Timer (Default: true) | -| providers | Captcha Providers (Default: anycaptcha/twocaptcha) | -| api_key | Your Api Key (Default: ) | -| site_key | outlook site key (Default: B7D8911C-5CC8-A9A3-35B0-554ACEE604DA) | -| Domain | Email Domain (Default: @hotmail.com/@outlook.com) | -| minBirthDate | Minimum BirthDate (Default: 1980) | -| maxBirthDate | Maximum BirthDate (Default: 1999) | -| PasswordLength | Password Length (Default: 10) | -| FirstNameLength | First Name Length (Default: 5) | -| LastNameLength | Last Name Length (Default: 5) | -| DriverArguments | driver argument list (Default: ...) | +| Name | Description | +|-------------------|------------------------------------------------------------------| +| Prefix | Log Prefix (Default: &beGen&5>> ) | +| ProxyFile | proxy file path (Default: proxy.txt) | +| OutputFile | output file path (Default: account.txt) | +| Timer | Generate Timer (Default: true) | +| ProxyCheckTimeout | Checking Proxy Timeout (Default: 2) | +| providers | Captcha Providers (Default: anycaptcha/twocaptcha) | +| api_key | Your Api Key (Default: ) | +| site_key | outlook site key (Default: B7D8911C-5CC8-A9A3-35B0-554ACEE604DA) | +| Domain | Email Domain (Default: @hotmail.com/@outlook.com) | +| minBirthDate | Minimum BirthDate (Default: 1980) | +| maxBirthDate | Maximum BirthDate (Default: 1999) | +| PasswordLength | Password Length (Default: 10) | +| FirstNameLength | First Name Length (Default: 5) | +| LastNameLength | Last Name Length (Default: 5) | +| DriverArguments | driver argument list (Default: ...) | @@ -102,7 +103,8 @@ sudo apt install chromium-chromedriver "Prefix": "&beGen&5>> ", "ProxyFile": "proxy.txt", "OutputFile": "account.txt", - "Timer": true + "Timer": true, + "ProxyCheckTimeout": 2 }, "Captcha": { "providers": "anycaptcha", diff --git a/config.json b/config.json index b971b5a..a62e135 100644 --- a/config.json +++ b/config.json @@ -3,12 +3,13 @@ "Prefix": "&beGen&5>> ", "ProxyFile": "proxy.txt", "OutputFile": "account.txt", - "Timer": true + "Timer": true, + "ProxyCheckTimeout": 2 }, "Captcha": { "providers": "anycaptcha/twocaptcha", "api_key": "", - "site_key": "B7D8911C-5CC8-A9A3-35B0-554ACEE604DA" + "site_key": "" }, "EmailInfo": { "Domain": "@hotmail.com/@outlook.com", diff --git a/main.py b/main.py index 0b2a186..1b021cf 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,7 @@ from random import randint, choice from typing import Any +import requests from colorama import Fore from selenium import webdriver from selenium.webdriver.chrome.webdriver import WebDriver @@ -80,6 +81,15 @@ def solver(self, site_url, browser): solvedCaptcha += 1 return result + def check_proxy(self, proxy): + with suppress(Exception): + requests.get("https://outlook.live.com", proxies={ + "http": "http://{}".format(proxy), + "https": "http://{}".format(proxy) + }, timeout=self.config["ProxyCheckTimeout"]) + return True + return False + def fElement(self, driver: WebDriver, by: By = By.ID, value=None, delay: float = 0.3): # Custom find Element Function count = 0 @@ -191,6 +201,7 @@ def CreateEmail(self, driver: WebDriver): time.sleep(0.5) driver.execute_script( 'parent.postMessage(JSON.stringify({eventId:"challenge-complete",payload:{sessionToken:"' + token + '"}}),"*")') + self.print("&aCaptcha Solved") self.update() self.fElement(driver, By.ID, 'idBtn_Back').click() self.print(f'Email Created in {str(self.Timer.timer(time.time())).split(".")[0]}s') if \ @@ -199,11 +210,11 @@ def CreateEmail(self, driver: WebDriver): self.Utils.logger(self.email + self.config['EmailInfo']['Domain'], self.password) self.update() driver.quit() - except KeyboardInterrupt: - driver.quit() - sys.exit() - except: - self.print('&4Something is wrong :(') + except Exception as e: + if e == KeyboardInterrupt: + driver.quit() + sys.exit(0) + self.print("&4Something is wrong | %s" % str(e).split("\n")[0].strip()) finally: driver.quit() @@ -213,6 +224,10 @@ def run(self): while True: self.generate_info() proxy = choice(self.proxies) # Select Proxy + if not self.check_proxy(proxy): + self.print("&c%s &f| &4Invalid Proxy&f" % proxy) + self.proxies.remove(proxy) + continue self.print(proxy) self.options.add_argument("--proxy-server=http://%s" % proxy) self.CreateEmail(driver=webdriver.Chrome(options=self.options, desired_capabilities=self.capabilities))