Skip to content

Commit

Permalink
Proxy Checker
Browse files Browse the repository at this point in the history
  • Loading branch information
InvalidAccount committed Nov 23, 2022
1 parent 80167d7 commit 8c1988c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 24 deletions.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...) |

</div>

Expand All @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 20 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -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()

Expand All @@ -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))
Expand Down

0 comments on commit 8c1988c

Please sign in to comment.