├── Battle.Net Generator ├── Accounts.txt ├── Instructions.txt ├── Main.py ├── PackageInstaller.bat ├── chromedriver.exe ├── config.json ├── get-pip.py ├── proxies.txt └── requirements.txt └── README.md /Battle.Net Generator/Accounts.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Battle.Net Generator/Instructions.txt: -------------------------------------------------------------------------------- 1 | First Download python here: https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe 2 | Run the file and make sure to click “Add python to path” 3 | Now run “PackageInstaller.bat”, if you do not see anything pop up and it goes straight to Press any key to continue. 4 | You must do this: https://www.youtube.com/watch?v=dj5oOPaeIqI&ab_channel=TechnoPanti 5 | 6 | _______________________________________________________________________________________ 7 | 8 | Now run the ConfigEditor and fill out everything! 9 | 10 | Information and Suggestions 11 | - You should keep your sms country (docs.5sim.net/#countries-list) and account country the same to limit "post paid phone number" error 12 | - Account usernames have to be between 6-12 chars 13 | - Without proxies you can only make 4 accounts per 30m - 1h on home ip 14 | - Less detected proxies = easier captchas 15 | 16 | ________________________________________________________________________________________ 17 | 18 | USEFUL INFORMATION ABOUT SETTINGS 19 | 20 | Utils: 21 | * license = the one you got from the seller 22 | * headless = if off means you cannot see the browsers (true or false) 23 | * verbose = if you want to see logs or not (true or false) 24 | * use_proxies = if you want to use proxies or not (true or false) 25 | * thread_count = how many browsers you want open at a time 26 | * iterations = how many times each browser will reopen (thread_count x iterations = accounts made) 27 | * timeout = how do you want to wait for each page/element to load before an error is thrown. Higher timeout is recommended for people with slower proxies/wifi 28 | * account_format = what format you want accounts to be in accounts.txt 29 | 1 - email:password:security_answer 30 | 2 - Email: Email | Password: Password | Security: Security Answer | Battletag: Account Username 31 | 3 - Email: Email | Password: Password | Security: Security Answer | Date Made: Date account was made 32 | 4 - Email: Email | Password: Password | Security: Security Answer 33 | Anything Else - [Email: Email, Password: Password, Security: Security Answer] 34 | 35 | Captcha: 36 | * use_captcha = if you want bestcaptcha to solve the captchas for you (true or false) 37 | * captcha_service = capmonster or bestcaptcha 38 | * cap_key = go down for reference 39 | 40 | Sms: 41 | * phone_verification = if you want to phone verify your account, this is needed to play warzone (true or false) 42 | * sms_service = smsactivate or 5sim 43 | * sms_key = go down for reference 44 | * sms_country = You can find sms country here: https://docs.5sim.net/#countries-list 45 | * sms_operator = what operator you want to use, can find on 5sim.net at the bottom 46 | 47 | Email: 48 | * email_verifcation = if you want to verify your email (true or false) 49 | * email_key = go down for reference 50 | * email_domain = what domain you want to use for emails, recommended is (outlook.com, hotmail.com, gmail.com, yahoo.com, mail.ru etc..) 51 | 52 | Account Settings: 53 | * account_country = You can find all the account countries here (Copy and paste): https://pastebin.com/1dSkLNpC 54 | * custom_name = if you want a custom username, leave blank if you want random 55 | * security_question = leave blank for random, fill out if you want a custom sec question 56 | 57 | ________________________________________________________________________________________ 58 | 59 | 60 | Sms Key 61 | * First put funds in your account at: https://5sim.net/payment 62 | * Second after you have funds get your api key here: https://5sim.net/settings/security 63 | It will be under “API key 5sim protocol” and it's the long one 64 | 65 | 66 | Captcha Key 67 | * First put funds in your account at: https://bestcaptchasolver.com/order 68 | * After you have funds get your api key here: https://bestcaptchasolver.com/account 69 | It will be next to “Access Token” 70 | 71 | Email Key 72 | * First put funds in your account at: https://kopeechka.store/panel.html# 73 | * get your api key in user profile 74 | 75 | Proxies 76 | * You can get proxies anywhere as long they are ip authorized (Format = host:port) 77 | * Recommended that you get proxies from your own country, or USA, Canada or Canada 78 | * Suggested place to get cheap proxies: https://www.webshare.io/ 79 | These will get you hard captcha though so we recommend you use BestCaptcha 80 | * Suggested place to get slow but hq proxies (easy captchas): https://iproyal.com 81 | * Proxies go in “Proxies.txt” 82 | 83 | accounts will go in “Accounts.txt” 84 | 85 | 86 | FAQ's: 87 | * Unable to locate chrome binary means you don't have chrome installed 88 | * Timeout Exception means that your proxies weren’t fast enough to load a page 89 | * If chromedriver and your chrome aren't the same version it will throw an error 90 | You can find your version here: chrome://settings/help 91 | Download the same driver version here: https://chromedriver.chromium.org/downloads 92 | * Other errors are usually caused by your proxies or wifi 93 | 94 | INSTRUCTIONS NOT MADE BY ME! :) 95 | -------------------------------------------------------------------------------- /Battle.Net Generator/Main.py: -------------------------------------------------------------------------------- 1 | # Imports 2 | from selenium import webdriver 3 | from selenium.common.exceptions import TimeoutException, WebDriverException 4 | from selenium.webdriver.common.by import By 5 | from selenium.webdriver.support import expected_conditions as EC 6 | from selenium.webdriver.support.ui import WebDriverWait 7 | from selenium.webdriver.support.ui import Select 8 | from selenium.webdriver.common.proxy import Proxy, ProxyType 9 | from selenium.webdriver.chrome.service import Service 10 | from selenium.webdriver.chrome.options import Options 11 | from Crypto.Cipher import AES 12 | from Crypto.Hash import SHA256 13 | from uuid import uuid4 14 | from Crypto.Util.Padding import pad, unpad 15 | from colorama import Fore 16 | from pynput import keyboard 17 | from pystyle import Colors, Write, Colorate, Center 18 | from names import get_last_name, get_first_name 19 | from datetime import datetime, date 20 | import os 21 | import sys 22 | import json 23 | import time 24 | import random 25 | import string 26 | import threading 27 | import httpx 28 | import requests 29 | import winreg 30 | import psutil 31 | import subprocess 32 | import json as jsond 33 | import binascii 34 | import platform 35 | 36 | 37 | class AntiDebug: 38 | inVM = False 39 | 40 | def __init__(self): 41 | self.processes = list() 42 | 43 | self.blackListedPrograms = [ 44 | "httpdebuggerui.exe", 45 | "wireshark.exe", 46 | "fiddler.exe", 47 | "regedit.exe", 48 | "cmd.exe", 49 | "taskmgr.exe", 50 | "vboxservice.exe", 51 | "df5serv.exe", 52 | "processhacker.exe", 53 | "vboxtray.exe", 54 | "vmtoolsd.exe", 55 | "vmwaretray.exe", 56 | "ida64.exe", 57 | "ollydbg.exe", 58 | "pestudio.exe", 59 | "vmwareuser", 60 | "vgauthservice.exe", 61 | "vmacthlp.exe", 62 | "x96dbg.exe", 63 | "vmsrvc.exe", 64 | "x32dbg.exe", 65 | "vmusrvc.exe", 66 | "prl_cc.exe", 67 | "prl_tools.exe", 68 | "xenservice.exe", 69 | "qemu-ga.exe", 70 | "joeboxcontrol.exe", 71 | "ksdumperclient.exe", 72 | "ksdumper.exe", 73 | "joeboxserver.exe", 74 | ] 75 | 76 | 77 | 78 | self.blackListedGPU = [ 79 | "Microsoft Remote Display Adapter", 80 | "Microsoft Hyper-V Video", 81 | "Microsoft Basic Display Adapter", 82 | "VMware SVGA 3D", 83 | "Standard VGA Graphics Adapter", 84 | "NVIDIA GeForce 840M", 85 | "NVIDIA GeForce 9400M", 86 | "UKBEHH_S", 87 | "ASPEED Graphics Family(WDDM)", 88 | "H_EDEUEK", 89 | "VirtualBox Graphics Adapter", 90 | "K9SC88UK", 91 | "Стандартный VGA графический адаптер", 92 | ] 93 | 94 | threading.Thread(target=self.blockDebuggers).start() 95 | for func in [ 96 | self.listCheck, 97 | self.registryCheck, 98 | self.specsCheck, 99 | self.dllCheck, 100 | self.procCheck, 101 | ]: 102 | process = threading.Thread(target=func, daemon=True) 103 | self.processes.append(process) 104 | process.start() 105 | for t in self.processes: 106 | try: 107 | t.join() 108 | except RuntimeError: 109 | continue 110 | 111 | def programExit(self): 112 | print("Virtual Machine Detected") 113 | time.sleep(5) 114 | self.__class__.inVM = True 115 | 116 | def blockDebuggers(self): 117 | for proc in psutil.process_iter(): 118 | if any( 119 | procstr in proc.name().lower() for procstr in self.blackListedPrograms 120 | ): 121 | try: 122 | proc.kill() 123 | except (psutil.NoSuchProcess, psutil.AccessDenied): 124 | pass 125 | 126 | def listCheck(self): 127 | for path in [r"D:\Tools", r"D:\OS2", r"D:\NT3X"]: 128 | if os.path.exists(path): 129 | self.programExit() 130 | 131 | myName = os.getlogin() 132 | for user in self.blackListedUsers: 133 | if myName == user: 134 | self.programExit() 135 | 136 | myPCName = os.getenv("COMPUTERNAME") 137 | for pcName in self.blackListedPCNames: 138 | if myPCName == pcName: 139 | self.programExit() 140 | 141 | try: 142 | myHWID = ( 143 | subprocess.check_output( 144 | r"wmic csproduct get uuid", creationflags=0x08000000 145 | ) 146 | .decode() 147 | .split("\n")[1] 148 | .strip() 149 | ) 150 | except Exception: 151 | myHWID = "" 152 | for hwid in self.blackListedHWIDS: 153 | if myHWID == hwid: 154 | self.programExit() 155 | try: 156 | myIP = httpx.get("https://api64.ipify.org/").text.strip() 157 | except ( 158 | httpx.ReadError, 159 | httpx.ReadTimeout, 160 | httpx.ConnectError, 161 | httpx.ConnectTimeout, 162 | ): 163 | pass 164 | for ip in self.blackListedIPS: 165 | if myIP == ip: 166 | self.programExit() 167 | 168 | try: 169 | myGPU = ( 170 | subprocess.check_output( 171 | r"wmic path win32_VideoController get name", 172 | creationflags=0x08000000, 173 | ) 174 | .decode() 175 | .strip("Name\n") 176 | .strip() 177 | ) 178 | except Exception: 179 | myGPU = "" 180 | for gpu in self.blackListedGPU: 181 | if gpu in myGPU.split("\n"): 182 | self.programExit() 183 | 184 | def specsCheck(self): 185 | ram = str(psutil.virtual_memory()[0] / 1024**3).split(".")[0] 186 | if int(ram) <= 4: 187 | self.programExit() 188 | disk = str(psutil.disk_usage("/")[0] / 1024**3).split(".")[0] 189 | if int(disk) <= 50: 190 | self.programExit() 191 | if int(psutil.cpu_count()) <= 1: 192 | self.programExit() 193 | 194 | def registryCheck(self): 195 | reg1 = os.system( 196 | "REG QUERY HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000\\DriverDesc 2> nul" 197 | ) 198 | reg2 = os.system( 199 | "REG QUERY HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000\\ProviderName 2> nul" 200 | ) 201 | if reg1 != 1 and reg2 != 1: 202 | self.programExit() 203 | 204 | handle = winreg.OpenKey( 205 | winreg.HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Disk\\Enum" 206 | ) 207 | try: 208 | reg_val = winreg.QueryValueEx(handle, "0")[0] 209 | 210 | if "VMware" in reg_val or "VBOX" in reg_val: 211 | self.programExit() 212 | finally: 213 | winreg.CloseKey(handle) 214 | 215 | def dllCheck(self): 216 | vmware_dll = os.path.join(os.environ["SystemRoot"], "System32\\vmGuestLib.dll") 217 | virtualbox_dll = os.path.join(os.environ["SystemRoot"], "vboxmrxnp.dll") 218 | 219 | if os.path.exists(vmware_dll): 220 | self.programExit() 221 | if os.path.exists(virtualbox_dll): 222 | self.programExit() 223 | 224 | def procCheck(self): 225 | processes = ["VMwareService.exe", "VMwareTray.exe"] 226 | for proc in psutil.process_iter(): 227 | for program in processes: 228 | if proc.name() == program: 229 | self.programExit() 230 | 231 | 232 | 233 | 234 | 235 | with open("config.json", "r") as config: 236 | license_key = json.load(config) 237 | 238 | 239 | # Standalone variables 240 | thread_lock = threading.Lock() 241 | 242 | account_created = 0 243 | 244 | 245 | def _time(): 246 | return time.strftime("%H:%M:%S", time.gmtime()) 247 | 248 | 249 | class Fivesim: 250 | def __init__(self, phone_id) -> None: 251 | self.phone_id = phone_id 252 | with open("config.json", "r") as config: 253 | self.config = json.load(config) 254 | 255 | self.api_key = self.config["sms"]["sms_key"] 256 | 257 | def get_number(self) -> dict: 258 | try: 259 | token = self.api_key 260 | country = str(self.config["sms"]["sms_country"]).lower() 261 | operator = str(self.config["sms"]["sms_operator"]).lower() 262 | product = "blizzard" 263 | 264 | headers = { 265 | "Authorization": "Bearer " + token, 266 | "Accept": "application/json", 267 | } 268 | 269 | response = httpx.get( 270 | "https://5sim.net/v1/user/buy/activation/" 271 | + country 272 | + "/" 273 | + operator 274 | + "/" 275 | + product, 276 | headers=headers, 277 | ).json() 278 | 279 | return { 280 | "number": response["phone"], 281 | "phone_id": response["id"], 282 | "price": response["price"], 283 | } 284 | 285 | except Exception as err: 286 | return {False: err} 287 | 288 | def get_balance(self) -> str: 289 | token = self.api_key 290 | 291 | headers = { 292 | "Authorization": "Bearer " + token, 293 | "Accept": "application/json", 294 | } 295 | 296 | return str( 297 | round( 298 | httpx.get("https://5sim.net/v1/user/profile", headers=headers).json()[ 299 | "balance" 300 | ], 301 | 3, 302 | ) 303 | ) 304 | 305 | def finish_order(self) -> None: 306 | token = self.api_key 307 | c_id = self.phone_id 308 | 309 | headers = { 310 | "Authorization": "Bearer " + token, 311 | "Accept": "application/json", 312 | } 313 | 314 | httpx.get("https://5sim.net/v1/user/finish/" + str(c_id), headers=headers) 315 | 316 | def cancel_order(self) -> None: 317 | token = self.api_key 318 | c_id = self.phone_id 319 | 320 | headers = { 321 | "Authorization": "Bearer " + token, 322 | "Accept": "application/json", 323 | } 324 | 325 | httpx.get("https://5sim.net/v1/user/cancel/" + str(c_id), headers=headers) 326 | 327 | 328 | class SmsActivate: 329 | def __init__(self) -> None: 330 | with open("config.json", "r") as config: 331 | self.config = json.load(config) 332 | 333 | self.api_key = self.config["sms"]["sms_key"] 334 | 335 | def get_number(self): 336 | response = httpx.get( 337 | f'https://api.sms-activate.org/stubs/handler_api.php?api_key={self.api_key}&action=getNumber&service=bz&country={self.config["sms"]["sms_country"]}' 338 | ).text 339 | if not (":" in response): 340 | return {False: response} 341 | 342 | self.phone_id = response.split(":")[1] 343 | self.number = response.split(":")[2] 344 | 345 | return {"number": self.number, "phone_id": self.phone_id} 346 | 347 | def get_balance(self): 348 | return str( 349 | round( 350 | float( 351 | httpx.get( 352 | f"https://api.sms-activate.org/stubs/handler_api.php?api_key={self.api_key}&action=getBalance" 353 | ).text.split(":")[1] 354 | ), 355 | 3, 356 | ) 357 | ) 358 | 359 | def get_code(self, phone_id): 360 | response = httpx.get( 361 | f"https://api.sms-activate.org/stubs/handler_api.php?api_key={self.api_key}&action=getStatus&id={phone_id}" 362 | ).text 363 | if not ("STATUS_OK" in response): 364 | return False 365 | return response.split(":")[1] 366 | 367 | def ban(self, phone_id) -> None: 368 | httpx.get( 369 | f"https://api.sms-activate.org/stubs/handler_api.php?api_key={self.api_key}&action=setStatus&status=8&id={phone_id}" 370 | ) 371 | 372 | def sent(self, phone_id) -> None: 373 | httpx.get( 374 | f"https://api.sms-activate.org/stubs/handler_api.php?api_key={self.api_key}&action=setStatus&status=1&id={phone_id}" 375 | ) 376 | 377 | def done(self, phone_id) -> None: 378 | httpx.get( 379 | f"https://api.sms-activate.org/stubs/handler_api.php?api_key={self.api_key}&action=setStatus&status=6&id={phone_id}" 380 | ) 381 | 382 | 383 | class Email: 384 | def __init__(self, api_key, domain, email_id) -> None: 385 | self.api_key = api_key 386 | self.domain = domain 387 | self.email_id = email_id 388 | 389 | def get_email(self): 390 | get_mail = httpx.get( 391 | f"https://api.kopeechka.store/mailbox-get-email?api=2.0&spa=1&site=account.blizzard.com&sender=Battle.net&mail_type={self.domain}&token={self.api_key}" 392 | ).json() 393 | if get_mail["status"] == "OK": 394 | return dict({"mail": get_mail["mail"], "id": get_mail["id"]}) 395 | else: 396 | return get_mail["value"] 397 | 398 | def checkEmail(self): 399 | return httpx.get( 400 | f"http://api.kopeechka.store/mailbox-get-message?full=1&id={self.email_id}&token={self.api_key}&type=text&api=2.0" 401 | ).text 402 | 403 | def deleteEmail(self): 404 | httpx.get( 405 | "https://api.kopeechka.store/mailbox-cancel?id=" 406 | + self.email_id 407 | + "&token=" 408 | + self.api_key 409 | ) 410 | 411 | def waitForEmail(self): 412 | tries = 0 413 | while tries < 20: 414 | time.sleep(2) 415 | value = self.checkEmail() 416 | if not ("WAIT_LINK" in value): 417 | return ( 418 | "https://account.blizzard.com/overview?ticket=" 419 | + value.split("https://account.blizzard.com/overview?ticket=")[ 420 | 1 421 | ].split('"')[0] 422 | ) 423 | return False 424 | 425 | 426 | class Generator: 427 | def __init__(self, proxy) -> None: 428 | with open("config.json", "r") as config: 429 | self.config = json.load(config) 430 | 431 | # Object Variables 432 | self.domains = ["@yahoo.com", "@hotmail.com", "@outlook.com"] 433 | self.proxy = proxy 434 | 435 | self.useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" 436 | self.t_o = int(self.config["utils"]["timeout"]) 437 | 438 | def sprint(self, message: str) -> None: 439 | thread_lock.acquire() 440 | sys.stdout.write(message + "\n" + Fore.RESET) 441 | thread_lock.release() 442 | 443 | # Closes all browsers if f9 is clicked 444 | def check_keys(self): 445 | def on_release(key): 446 | key_pressed = str(key).replace("'", "") 447 | if key_pressed == "Key.f9": 448 | 449 | if hasattr(self, "Activate"): 450 | if not self.Activate: 451 | Fivesim(self.phone_id).cancel_order() 452 | else: 453 | SmsActivate().ban(self.phone_id) 454 | 455 | self.driver.quit() 456 | thread_lock.acquire() 457 | sys.stdout.write( 458 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.YELLOW}/{Fore.RESET}] {Fore.RED}User requested to close all browsers." 459 | + "\n" 460 | + Fore.RESET 461 | ) 462 | time.sleep(5) 463 | os._exit(1) 464 | 465 | with keyboard.Listener(on_release=on_release) as listener: 466 | listener.join() 467 | 468 | def get_dob(self) -> str: 469 | return str( 470 | "{:02d}".format(random.randint(1, 12)) 471 | + "{:02d}".format(random.randint(1, 28)) 472 | + str(random.randint(1990, 2002)) 473 | ) 474 | 475 | def __init_driver__(self) -> None: 476 | if bool(self.config["utils"]["verbose"]): 477 | self.sprint( 478 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Spoofing Webdriver" 479 | ) 480 | self.sprint( 481 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Proxy: {Fore.LIGHTMAGENTA_EX}{self.proxy}" 482 | ) 483 | 484 | ser = Service(f"{os.getcwd()}\chromedriver.exe") 485 | self.proxy_server = self.proxy 486 | 487 | if not self.proxy_server: 488 | capabilities = None 489 | 490 | else: 491 | proxy = Proxy() 492 | proxy.proxy_type = ProxyType.MANUAL 493 | proxy.http_proxy = self.proxy_server 494 | proxy.ssl_proxy = self.proxy_server 495 | capabilities = webdriver.DesiredCapabilities.CHROME 496 | proxy.add_to_capabilities(capabilities) 497 | 498 | # Spoofing to not get detected 499 | options = Options() 500 | 501 | options.add_experimental_option( 502 | "excludeSwitches", 503 | [ 504 | "enable-logging", 505 | "enable-automation", 506 | "ignore-certificate-errors", 507 | "safebrowsing-disable-download-protection", 508 | "safebrowsing-disable-auto-update", 509 | "disable-client-side-phishing-detection", 510 | ], 511 | ) 512 | 513 | options.add_argument("--lang=en") 514 | options.add_argument("--log-level=3") 515 | options.add_argument("--incognito") 516 | options.add_argument("--no-sandbox") 517 | options.add_argument("--ignore-certificate-errors") 518 | options.add_argument("--ignore-ssl-errors") 519 | options.add_argument("--disable-dev-shm-usage") 520 | options.add_argument("--profile-directory=Null") 521 | options.add_argument("--disable-extensions") 522 | options.add_argument("--disable-blink-features=AutomationControlled") 523 | options.add_argument("--start-maximized") 524 | options.add_argument(f"--user-agent={self.useragent}") 525 | 526 | if bool(self.config["utils"]["headless"]): 527 | options.add_argument("--headless") 528 | options.add_argument("--disable-gpu") 529 | 530 | self.driver = webdriver.Chrome( 531 | service=ser, desired_capabilities=capabilities, options=options 532 | ) 533 | 534 | self.driver.set_window_size(500, 570) 535 | 536 | self.driver.execute_cdp_cmd( 537 | "Network.setUserAgentOverride", {"userAgent": self.useragent} 538 | ) 539 | 540 | self.driver.execute_cdp_cmd( 541 | "Page.addScriptToEvaluateOnNewDocument", 542 | { 543 | "source": """ 544 | Object.defineProperty(navigator, 'deviceMemory', { 545 | get: () => 99 546 | }) 547 | """ 548 | }, 549 | ) 550 | 551 | self.driver.execute_cdp_cmd( 552 | "Page.addScriptToEvaluateOnNewDocument", 553 | { 554 | "source": """ 555 | Object.defineProperty(navigator, 'webdriver', { 556 | get: () => undefined 557 | }) 558 | """ 559 | }, 560 | ) 561 | 562 | def resend_sms(self) -> None: 563 | while self.sms_code is True: 564 | self.driver.execute_script( 565 | """document.querySelector('#resend-sms-verification').click();""" 566 | ) 567 | 568 | def get_sms_code(self) -> None: 569 | self.sms_code = True 570 | threading.Thread(target=self.resend_sms).start() 571 | 572 | if not self.Activate: 573 | headers = { 574 | "Authorization": "Bearer " + self.config["sms"]["sms_key"], 575 | "Accept": "application/json", 576 | } 577 | 578 | tries = 0 579 | while tries < int(self.config["utils"]["timeout"]) // 2: 580 | response = httpx.get( 581 | "https://5sim.net/v1/user/check/" + str(self.phone_id), 582 | headers=headers, 583 | ).json() 584 | if response["status"] == "RECEIVED": 585 | if response["sms"]: 586 | self.sms_code = response["sms"][0]["code"] 587 | Fivesim(self.phone_id).finish_order() 588 | return 589 | else: 590 | 591 | time.sleep(2) 592 | 593 | tries += 1 594 | 595 | self.sms_code = None 596 | return 597 | 598 | else: 599 | tries = 0 600 | 601 | SmsActivate().sent(self.phone_id) 602 | 603 | while tries < int(self.config["utils"]["timeout"]) // 2: 604 | time.sleep(2) 605 | 606 | res = SmsActivate().get_code(self.phone_id) 607 | 608 | if not (res is False): 609 | SmsActivate().done(self.phone_id) 610 | self.sms_code = res 611 | return 612 | 613 | tries += 1 614 | 615 | SmsActivate().ban(self.phone_id) 616 | 617 | self.sms_code = None 618 | return 619 | 620 | def solve_captcha(self): 621 | cap_service = str(self.config["captcha"]["captcha_service"]).lower() 622 | cap_key = self.config["captcha"]["cap_key"] 623 | 624 | if "best" in cap_service: 625 | for _ in range(3): 626 | create_task = httpx.post( 627 | "https://bcsapi.xyz/api/captcha/funcaptcha", 628 | json={ 629 | "page_url": "https://account.battle.net/creation/flow/creation-full", 630 | "s_url": "https://blizzard-api.arkoselabs.com", 631 | "site_key": "E8A75615-1CBA-5DFF-8032-D16BCF234E10", 632 | "access_token": cap_key, 633 | }, 634 | ).json() 635 | 636 | task_id = create_task["id"] 637 | 638 | while True: 639 | get_result = httpx.get( 640 | f"https://bcsapi.xyz/api/captcha/{task_id}?access_token={cap_key}" 641 | ).json() 642 | try: 643 | if get_result["status"] != "completed": 644 | pass 645 | else: 646 | self.captcha_token = get_result["solution"] 647 | return 648 | except KeyError: 649 | if bool(self.config["utils"]["verbose"]): 650 | self.sprint( 651 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not solve captcha, trying again" 652 | ) 653 | break 654 | 655 | if bool(self.config["utils"]["verbose"]): 656 | self.sprint( 657 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not solve captcha, ending thread" 658 | ) 659 | 660 | self.captcha_token = None 661 | 662 | return 663 | 664 | elif "monster" in cap_service: 665 | for _ in range(3): 666 | if self.proxy_server: 667 | create_task = httpx.post( 668 | "https://api.capmonster.cloud/createTask", 669 | json={ 670 | "clientKey": cap_key, 671 | "task": { 672 | "type": "FunCaptchaTask", 673 | "websiteURL": "https://account.battle.net/creation/flow/creation-full", 674 | "websitePublicKey": "E8A75615-1CBA-5DFF-8032-D16BCF234E10", 675 | "proxyType": "http", 676 | "proxyAddress": str(self.proxy_server).split(":")[0], 677 | "proxyPort": int(str(self.proxy_server).split(":")[1]), 678 | "userAgent": self.useragent, 679 | }, 680 | }, 681 | ).json() 682 | else: 683 | create_task = httpx.post( 684 | "https://api.capmonster.cloud/createTask", 685 | json={ 686 | "clientKey": cap_key, 687 | "task": { 688 | "type": "FunCaptchaTaskProxyless", 689 | "websiteURL": "https://account.battle.net/creation/flow/creation-full", 690 | "websitePublicKey": "E8A75615-1CBA-5DFF-8032-D16BCF234E10", 691 | }, 692 | }, 693 | ).json() 694 | 695 | if create_task["errorId"] != 0: 696 | if bool(self.config["utils"]["verbose"]): 697 | self.sprint( 698 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not create captcha task, error code: {create_task['errorId']}, ending thread" 699 | ) 700 | 701 | self.captcha_token = None 702 | 703 | return 704 | 705 | task_id = create_task["taskId"] 706 | 707 | for _ in range(120): 708 | try: 709 | get_result = httpx.post( 710 | "https://api.capmonster.cloud/getTaskResult", 711 | json={"clientKey": cap_key, "taskId": task_id}, 712 | ).json() 713 | 714 | if get_result["status"] == "ready": 715 | self.captcha_token = get_result["solution"]["text"] 716 | return 717 | 718 | elif get_result["errorId"] != 0: 719 | if bool(self.config["utils"]["verbose"]): 720 | self.sprint( 721 | f""" 722 | [{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not get captcha token, error code: {create_task['errorId']}, trying again 723 | """ 724 | ) 725 | 726 | break 727 | 728 | else: 729 | time.sleep(2) 730 | 731 | except: 732 | if bool(self.config["utils"]["verbose"]): 733 | self.sprint( 734 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not solve captcha, ending thread" 735 | ) 736 | 737 | self.captcha_token = None 738 | 739 | return 740 | 741 | if bool(self.config["utils"]["verbose"]): 742 | self.sprint( 743 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not solve captcha, ending thread" 744 | ) 745 | 746 | self.captcha_token = None 747 | 748 | return 749 | 750 | else: 751 | self.sprint( 752 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}That captcha service is not supported, ending program" 753 | ) 754 | 755 | time.sleep(5) 756 | 757 | os._exit(1) 758 | 759 | def sumbit_captcha_token(self) -> bool: 760 | for _ in range(3): 761 | self.solve_captcha() 762 | if self.captcha_token is None: 763 | continue 764 | 765 | self.driver.execute_script( 766 | f""" 767 | document.querySelector('#capture-arkose').value = "{self.captcha_token}"; 768 | document.querySelector('#flow-form-submit'); 769 | document.querySelector('#capture-arkose').click(); 770 | document.querySelector('#flow-form').submit(); 771 | """ 772 | ) 773 | 774 | try: 775 | WebDriverWait(self.driver, 5).until( 776 | EC.presence_of_element_located( 777 | ( 778 | By.XPATH, 779 | "//input[@id='capture-first-name']", 780 | ) 781 | ) 782 | ) 783 | 784 | return True 785 | 786 | except TimeoutException: 787 | if bool(self.config["utils"]["verbose"]): 788 | self.sprint( 789 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Captcha Token Invalid, getting another one" 790 | ) 791 | continue 792 | 793 | return False 794 | 795 | def fill_forms(self) -> bool: 796 | self.driver.get("https://us.account.battle.net/creation/flow/creation-full") 797 | 798 | try: 799 | print('p') 800 | 801 | except WebDriverException: 802 | if bool(self.config["utils"]["verbose"]): 803 | self.sprint( 804 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Host timed out, ending thread" 805 | ) 806 | return False 807 | 808 | except Exception as err: 809 | if bool(self.config["utils"]["verbose"]): 810 | self.sprint( 811 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Unknown Error: {err}, ending thread" 812 | ) 813 | return False 814 | 815 | WebDriverWait(self.driver, 40).until( 816 | EC.presence_of_element_located( 817 | ( 818 | By.XPATH, 819 | "//select[@id='capture-country']", 820 | ) 821 | ) 822 | ) 823 | 824 | if "Accept cookies" in self.driver.page_source: 825 | cookies = self.driver.find_element( 826 | By.XPATH, "/html/body/div[1]/div[2]/div[4]/div[2]/div/button" 827 | ) 828 | self.driver.execute_script("arguments[0].click();", cookies) 829 | 830 | self.driver.find_element(By.ID, "dob-field-inactive").click() 831 | self.driver.find_element(By.CLASS_NAME, "step__input--date--mm").send_keys( 832 | self.get_dob() 833 | ) 834 | 835 | if bool(self.config["utils"]["verbose"]): 836 | self.sprint( 837 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}DOB Set" 838 | ) 839 | 840 | if not self.config["captcha"]["use_captcha"]: 841 | self.driver.execute_script( 842 | """ 843 | document.getElementById("flow-form-submit-btn").click(); 844 | """ 845 | ) 846 | 847 | Select( 848 | self.driver.find_element(By.XPATH, "//select[@id='capture-country']") 849 | ).select_by_visible_text( 850 | str(self.config["account_settings"]["account_country"]) 851 | ) 852 | 853 | if bool(self.config["utils"]["verbose"]): 854 | self.sprint( 855 | f'[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Country Set: {Fore.LIGHTMAGENTA_EX}{self.config["account_settings"]["account_country"]}' 856 | ) 857 | 858 | if bool(self.config["captcha"]["use_captcha"]) and bool( 859 | self.config["utils"]["verbose"] 860 | ): 861 | self.sprint( 862 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.YELLOW}/{Fore.RESET}] {Fore.CYAN}Solving Captcha" 863 | ) 864 | 865 | if bool(self.config["captcha"]["use_captcha"]): 866 | if not self.sumbit_captcha_token(): 867 | if bool(self.config["utils"]["verbose"]): 868 | self.sprint( 869 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not get valid captcha token, ending thread" 870 | ) 871 | self.driver.quit() 872 | return False 873 | else: 874 | self.driver.execute_script( 875 | """ 876 | document.getElementById("flow-form-submit-btn").click(); 877 | """ 878 | ) 879 | 880 | if bool(self.config["utils"]["verbose"]): 881 | self.sprint( 882 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.YELLOW}/{Fore.RESET}] {Fore.CYAN}Waiting for user to solve captcha" 883 | ) 884 | 885 | try: 886 | WebDriverWait(self.driver, 50000).until( 887 | EC.presence_of_element_located( 888 | ( 889 | By.XPATH, 890 | "//input[@id='capture-last-name']", 891 | ) 892 | ) 893 | ) 894 | if bool(self.config["utils"]["verbose"]): 895 | self.sprint( 896 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}User Solved Captcha" 897 | ) 898 | 899 | except TimeoutException: 900 | if bool(self.config["utils"]["verbose"]): 901 | self.sprint( 902 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Host Timed Out, ending thread" 903 | ) 904 | return False 905 | 906 | if bool(self.config["utils"]["verbose"]) and bool( 907 | self.config["captcha"]["use_captcha"] 908 | ): 909 | self.sprint( 910 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Solved Captcha" 911 | ) 912 | 913 | fname, lname = get_first_name(), get_last_name() 914 | 915 | self.driver.find_element( 916 | By.XPATH, "//input[@id='capture-first-name']" 917 | ).send_keys(fname) 918 | self.driver.find_element( 919 | By.XPATH, "//input[@id='capture-last-name']" 920 | ).send_keys(lname) 921 | 922 | if bool(self.config["utils"]["verbose"]): 923 | self.sprint( 924 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Name: {Fore.LIGHTMAGENTA_EX}{fname} {lname}" 925 | ) 926 | 927 | self.driver.find_element(By.CSS_SELECTOR, "#flow-form-submit-btn").click() 928 | 929 | WebDriverWait(self.driver, self.t_o).until( 930 | EC.presence_of_element_located( 931 | ( 932 | By.XPATH, 933 | "//input[@id='capture-email']", 934 | ) 935 | ) 936 | ) 937 | 938 | if not self.config["email"]["email_verification"]: 939 | self.email = "".join( 940 | random.choice(string.ascii_letters) for _ in range(8) 941 | ) + random.choice(self.domains) 942 | else: 943 | get_email = Email( 944 | self.config["email"]["email_key"], 945 | self.config["email"]["email_domain"], 946 | None, 947 | ).get_email() 948 | 949 | if not (isinstance(get_email, dict)): 950 | if bool(self.config["utils"]["verbose"]): 951 | self.sprint( 952 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not get email, error: {Fore.LIGHTMAGENTA_EX}{get_email}" 953 | ) 954 | time.sleep(5) 955 | return False 956 | else: 957 | self.email, self.email_id = get_email["mail"], get_email["id"] 958 | 959 | self.driver.find_element(By.XPATH, "//input[@id='capture-email']").send_keys( 960 | self.email 961 | ) 962 | 963 | if bool(self.config["utils"]["verbose"]): 964 | self.sprint( 965 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Email: {Fore.LIGHTMAGENTA_EX}{self.email}" 966 | ) 967 | 968 | if self.config["sms"]["phone_verification"]: 969 | for _ in range(2): 970 | if "activate" in str(config["sms"]["sms_service"]).lower(): 971 | self.Activate = True 972 | else: 973 | self.Activate = False 974 | 975 | for _ in range(5): 976 | if not self.Activate: 977 | get_number = Fivesim(None).get_number() 978 | 979 | if str("false") in str(get_number).lower(): 980 | if bool(self.config["utils"]["verbose"]): 981 | self.sprint( 982 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not get a number, error: {get_number[False]}, ending thread" 983 | ) 984 | self.driver.quit() 985 | return False 986 | else: 987 | get_number = SmsActivate().get_number() 988 | 989 | if str("false") in str(get_number).lower(): 990 | if bool(self.config["utils"]["verbose"]): 991 | self.sprint( 992 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not get a number, error: {get_number[False]}, ending thread" 993 | ) 994 | self.driver.quit() 995 | return False 996 | 997 | if not self.Activate: 998 | self.number, self.phone_id, self.phone_price = ( 999 | get_number["number"], 1000 | get_number["phone_id"], 1001 | get_number["price"], 1002 | ) 1003 | else: 1004 | self.number, self.phone_id, self.phone_price = ( 1005 | get_number["number"], 1006 | get_number["phone_id"], 1007 | "Undefined", 1008 | ) 1009 | 1010 | self.driver.find_element( 1011 | By.XPATH, "//input[@id='capture-phone-number']" 1012 | ).send_keys(self.number) 1013 | 1014 | if bool(self.config["utils"]["verbose"]): 1015 | self.sprint( 1016 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Phone Number: {Fore.LIGHTMAGENTA_EX}{self.number} {Fore.LIGHTWHITE_EX}| {Fore.CYAN}Phone Price: {Fore.LIGHTMAGENTA_EX}₽{self.phone_price}" 1017 | ) 1018 | 1019 | self.driver.find_element( 1020 | By.CSS_SELECTOR, "#flow-form-submit-btn" 1021 | ).click() 1022 | 1023 | try: 1024 | WebDriverWait(self.driver, 4).until( 1025 | EC.presence_of_element_located( 1026 | ( 1027 | By.XPATH, 1028 | "//form[@id='flow-form']//li[1]", 1029 | ) 1030 | ) 1031 | ) 1032 | 1033 | if bool(self.config["utils"]["verbose"]): 1034 | self.sprint( 1035 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Invalid Phone Number, getting a new one" 1036 | ) 1037 | 1038 | if not self.Activate: 1039 | Fivesim(self.phone_id).cancel_order() 1040 | else: 1041 | SmsActivate().ban(self.phone_id) 1042 | 1043 | self.driver.find_element( 1044 | By.XPATH, "//input[@id='capture-phone-number']" 1045 | ).clear() 1046 | 1047 | continue 1048 | 1049 | except: 1050 | try: 1051 | WebDriverWait(self.driver, 20).until( 1052 | EC.presence_of_element_located( 1053 | ( 1054 | By.ID, 1055 | "field-0", 1056 | ) 1057 | ) 1058 | ) 1059 | break 1060 | 1061 | except TimeoutException: 1062 | if bool(self.config["utils"]["verbose"]): 1063 | self.sprint( 1064 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Host timed out, ending thread" 1065 | ) 1066 | return False 1067 | 1068 | try: 1069 | WebDriverWait(self.driver, 20).until( 1070 | EC.presence_of_element_located( 1071 | ( 1072 | By.ID, 1073 | "field-0", 1074 | ) 1075 | ) 1076 | ) 1077 | except: 1078 | if bool(self.config["utils"]["verbose"]): 1079 | self.sprint( 1080 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not get a valid number, ending thread" 1081 | ) 1082 | 1083 | self.driver.quit() 1084 | return False 1085 | 1086 | self.get_sms_code() 1087 | 1088 | if not (self.sms_code is None): 1089 | if bool(self.config["utils"]["verbose"]): 1090 | self.sprint( 1091 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Sms Code: {Fore.LIGHTMAGENTA_EX}{self.sms_code}" 1092 | ) 1093 | 1094 | self.driver.find_element(By.ID, "field-0").send_keys(self.sms_code) 1095 | 1096 | break 1097 | 1098 | else: 1099 | self.driver.execute_script( 1100 | """ 1101 | document.querySelector("#flow-button-back").click(); 1102 | """ 1103 | ) 1104 | 1105 | WebDriverWait(self.driver, self.t_o).until( 1106 | EC.presence_of_element_located( 1107 | ( 1108 | By.XPATH, 1109 | "//input[@id='capture-phone-number']", 1110 | ) 1111 | ) 1112 | ) 1113 | 1114 | self.driver.find_element( 1115 | By.XPATH, "//input[@id='capture-phone-number']" 1116 | ).clear() 1117 | 1118 | time.sleep(2) 1119 | continue 1120 | 1121 | if ( 1122 | not self.sms_code 1123 | and self.driver.find_element( 1124 | By.XPATH, "//input[@id='capture-phone-number']" 1125 | ).is_displayed() 1126 | ): 1127 | if bool(self.config["utils"]["verbose"]): 1128 | self.sprint( 1129 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not get sms code, ending thread" 1130 | ) 1131 | 1132 | time.sleep(2) 1133 | 1134 | self.driver.quit() 1135 | 1136 | time.sleep(2) 1137 | 1138 | self.driver.execute_script(''' 1139 | document.querySelector("#flow-form-submit-btn").click(); 1140 | ''') 1141 | 1142 | WebDriverWait(self.driver, self.t_o).until( 1143 | EC.presence_of_element_located( 1144 | ( 1145 | By.XPATH, 1146 | "//div[@id='legal-checkboxes']//label", 1147 | ) 1148 | ) 1149 | ) 1150 | 1151 | self.driver.find_element( 1152 | By.XPATH, 1153 | "//div[@id='legal-checkboxes']//label[@class='step__field--label step__form__block']", 1154 | ).click() 1155 | self.driver.find_element(By.ID, "flow-form-submit-btn").click() 1156 | 1157 | if bool(self.config["utils"]["verbose"]): 1158 | self.sprint( 1159 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Agreed to Tos" 1160 | ) 1161 | 1162 | WebDriverWait(self.driver, self.t_o).until( 1163 | EC.presence_of_element_located( 1164 | ( 1165 | By.XPATH, 1166 | "//input[@id='capture-password']", 1167 | ) 1168 | ) 1169 | ) 1170 | 1171 | if len(self.config["account_settings"]["custom_password"]) <= 0: 1172 | self.password = "".join( 1173 | random.choice(string.ascii_letters + string.digits) for _ in range(12) 1174 | ) 1175 | else: 1176 | self.password = self.config["account_settings"]["custom_password"] 1177 | 1178 | self.driver.find_element(By.XPATH, "//input[@id='capture-password']").send_keys( 1179 | self.password 1180 | ) 1181 | 1182 | self.driver.find_element(By.CSS_SELECTOR, "#flow-form-submit-btn").click() 1183 | 1184 | if bool(self.config["utils"]["verbose"]): 1185 | self.sprint( 1186 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Password Set To: {Fore.LIGHTMAGENTA_EX}{self.password}" 1187 | ) 1188 | 1189 | WebDriverWait(self.driver, self.t_o).until( 1190 | EC.presence_of_element_located( 1191 | ( 1192 | By.XPATH, 1193 | "//input[@id='capture-battletag']", 1194 | ) 1195 | ) 1196 | ) 1197 | 1198 | if self.config["account_settings"]["custom_name"] in ["", False]: 1199 | acc_username = self.driver.find_element( 1200 | By.XPATH, "//input[@id='capture-battletag']" 1201 | ).get_attribute("value") 1202 | if bool(self.config["utils"]["verbose"]): 1203 | self.sprint( 1204 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Preset Name: {Fore.LIGHTMAGENTA_EX}{acc_username}" 1205 | ) 1206 | self.driver.find_element(By.CSS_SELECTOR, "#flow-form-submit-btn").click() 1207 | 1208 | else: 1209 | self.driver.find_element( 1210 | By.XPATH, "//input[@id='capture-battletag']" 1211 | ).clear() 1212 | self.driver.find_element( 1213 | By.XPATH, "//input[@id='capture-battletag']" 1214 | ).send_keys(str(self.config["account_settings"]["custom_name"])) 1215 | self.driver.find_element(By.CSS_SELECTOR, "#flow-form-submit-btn").click() 1216 | 1217 | acc_username = self.config["account_settings"]["custom_name"] 1218 | 1219 | if bool(self.config["utils"]["verbose"]): 1220 | self.sprint( 1221 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Username Set To: {Fore.LIGHTMAGENTA_EX}{acc_username}" 1222 | ) 1223 | 1224 | WebDriverWait(self.driver, self.t_o).until( 1225 | EC.presence_of_element_located( 1226 | ( 1227 | By.XPATH, 1228 | "//p[normalize-space()='The following Battle.net Account has been created:']", 1229 | ) 1230 | ) 1231 | ) 1232 | 1233 | self.driver.implicitly_wait(2) 1234 | 1235 | self.driver.find_element( 1236 | By.XPATH, "//a[normalize-space()='Account Settings']" 1237 | ).click() 1238 | 1239 | self.driver.switch_to.window(self.driver.window_handles[1]) 1240 | 1241 | try: 1242 | WebDriverWait(self.driver, 5).until( 1243 | EC.presence_of_element_located( 1244 | ( 1245 | By.CSS_SELECTOR, 1246 | "#submit", 1247 | ) 1248 | ) 1249 | ) 1250 | 1251 | self.driver.implicitly_wait(2) 1252 | 1253 | self.driver.execute_script( 1254 | """ 1255 | document.querySelector("#submit").click(); 1256 | """ 1257 | ) 1258 | except: 1259 | pass 1260 | 1261 | WebDriverWait(self.driver, self.t_o).until( 1262 | EC.presence_of_element_located( 1263 | ( 1264 | By.XPATH, 1265 | "//h1[normalize-space()='Account Overview']", 1266 | ) 1267 | ) 1268 | ) 1269 | 1270 | time.sleep(3) 1271 | self.driver.switch_to.window(self.driver.window_handles[0]) 1272 | 1273 | if self.config["email"]["email_verification"]: 1274 | self.driver.get("https://account.battle.net/details#email") 1275 | WebDriverWait(self.driver, self.t_o).until( 1276 | EC.presence_of_element_located( 1277 | (By.XPATH, '//*[@id="email-card"]/div[1]/div/div[1]/h3') 1278 | ) 1279 | ) 1280 | for _ in range(2): 1281 | verify_email = Email( 1282 | self.config["email"]["email_key"], None, self.email_id 1283 | ).waitForEmail() 1284 | if not verify_email: 1285 | self.driver.execute_script( 1286 | """ 1287 | document.querySelector("#email-card > div.card-subtitle > div > div > div:nth-child(2) > span > span > span > a").click(); 1288 | """ 1289 | ) 1290 | continue 1291 | else: 1292 | self.driver.get(verify_email) 1293 | WebDriverWait(self.driver, self.t_o).until( 1294 | EC.presence_of_element_located( 1295 | ( 1296 | By.XPATH, 1297 | "//h1[normalize-space()='Account Overview']", 1298 | ) 1299 | ) 1300 | ) 1301 | 1302 | if bool(self.config["utils"]["verbose"]): 1303 | self.sprint( 1304 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Verified Email" 1305 | ) 1306 | 1307 | break 1308 | 1309 | try: 1310 | if self.driver.find_element( 1311 | By.CSS_SELECTOR, 1312 | "#email-card > div.card-subtitle > div > div > div:nth-child(2) > span > span > span > a", 1313 | ).is_displayed(): 1314 | if bool(self.config["utils"]["verbose"]): 1315 | self.sprint( 1316 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.RED}-{Fore.RESET}] {Fore.CYAN}Could not verify email" 1317 | ) 1318 | 1319 | self.Email_Verified = False 1320 | except: 1321 | pass 1322 | 1323 | self.driver.get("https://account.battle.net/security") 1324 | 1325 | if self.config["account_settings"]["security_question"] in ["", False]: 1326 | self.security_ans = "".join( 1327 | random.choice(string.ascii_letters + string.digits) for _ in range(10) 1328 | ) 1329 | else: 1330 | self.security_ans = self.config["account_settings"]["security_question"] 1331 | 1332 | WebDriverWait(self.driver, self.t_o).until( 1333 | EC.presence_of_element_located( 1334 | (By.XPATH, "//a[normalize-space()='Select a Secret Question']") 1335 | ) 1336 | ) 1337 | 1338 | WebDriverWait(self.driver, self.t_o).until( 1339 | EC.element_to_be_clickable( 1340 | (By.XPATH, "//a[normalize-space()='Select a Secret Question']") 1341 | ) 1342 | ) 1343 | 1344 | self.driver.find_element( 1345 | By.XPATH, "//a[normalize-space()='Select a Secret Question']" 1346 | ).click() 1347 | 1348 | WebDriverWait(self.driver, self.t_o).until( 1349 | EC.presence_of_element_located( 1350 | (By.XPATH, "//select[@id='question-select']") 1351 | ) 1352 | ) 1353 | 1354 | self.driver.find_element(By.XPATH, "//select[@id='question-select']").click() 1355 | 1356 | WebDriverWait(self.driver, self.t_o).until( 1357 | EC.presence_of_element_located( 1358 | ( 1359 | By.XPATH, 1360 | "/html/body/div[1]/main/section[2]/div/div[4]/div[2]/div/div[2]/form/div[1]/div[2]/select/option[2]", 1361 | ) 1362 | ) 1363 | ) 1364 | 1365 | self.driver.find_element( 1366 | By.XPATH, 1367 | "/html/body/div[1]/main/section[2]/div/div[4]/div[2]/div/div[2]/form/div[1]/div[2]/select/option[2]", 1368 | ).click() 1369 | 1370 | WebDriverWait(self.driver, self.t_o).until( 1371 | EC.presence_of_element_located((By.XPATH, "//input[@id='answer']")) 1372 | ) 1373 | 1374 | self.driver.find_element(By.XPATH, "//input[@id='answer']").send_keys( 1375 | self.security_ans 1376 | ) 1377 | 1378 | WebDriverWait(self.driver, self.t_o).until( 1379 | EC.presence_of_element_located((By.XPATH, "//button[@id='sqa-submit']")) 1380 | ) 1381 | 1382 | self.driver.find_element(By.XPATH, "//button[@id='sqa-submit']").click() 1383 | 1384 | if bool(self.config["utils"]["verbose"]): 1385 | self.sprint( 1386 | f"[{Fore.LIGHTBLUE_EX}{_time()}{Fore.RESET}][{Fore.GREEN}+{Fore.RESET}] {Fore.CYAN}Security Question/Answer Set To: {Fore.LIGHTMAGENTA_EX}{self.security_ans}" 1387 | ) 1388 | 1389 | thread_lock.acquire() 1390 | Write.Print( 1391 | f"[{_time()}][+] Created Account: {self.email}:{self.password}:{self.security_ans}\n", 1392 | Colors.rainbow, 1393 | interval=0.00, 1394 | ) 1395 | with open("Accounts.txt", "a") as accounts: 1396 | if hasattr(self, "Email_Verified"): 1397 | accounts.write( 1398 | f"Non Email Verifed [ {self.email}:{self.password}:{self.security_ans} ]\n" 1399 | ) 1400 | else: 1401 | self.format = int(self.config["utils"]["account_format"]) 1402 | 1403 | if self.format == 1: 1404 | accounts.write( 1405 | f"{self.email}:{self.password}:{self.security_ans}\n" 1406 | ) 1407 | elif self.format == 2: 1408 | accounts.write( 1409 | f"Email: {self.email} | Password: {self.password} | Security: {self.security_ans} | Battletag: {acc_username}\n" 1410 | ) 1411 | elif self.format == 3: 1412 | today = date.today() 1413 | accounts.write( 1414 | f"Email: {self.email} | Password: {self.password} | Security: {self.security_ans} | Date Made: {today.strftime(r'%d/%m/%Y')}\n" 1415 | ) 1416 | elif self.format == 4: 1417 | accounts.write( 1418 | f"Email: {self.email} | Password: {self.password} | Security: {self.security_ans}\n" 1419 | ) 1420 | else: 1421 | accounts.write( 1422 | f"[Email: {self.email}, Password: {self.password}, Security: {self.security_ans}]\n" 1423 | ) 1424 | 1425 | global account_created 1426 | account_created += 1 1427 | 1428 | 1429 | 1430 | thread_lock.release() 1431 | 1432 | self.driver.quit() 1433 | 1434 | return True 1435 | 1436 | def __main__(self): 1437 | for _ in range(int(self.config["utils"]["iterations"])): 1438 | threading.Thread(target=self.check_keys).start() 1439 | self.__init_driver__() 1440 | self.fill_forms() 1441 | 1442 | 1443 | with open("config.json", "r") as config: 1444 | config = json.load(config) 1445 | 1446 | 1447 | 1448 | print( 1449 | Center.XCenter( 1450 | Colorate.Vertical( 1451 | Colors.blue_to_red, 1452 | """ 1453 | 1454 | 1455 | ______ _ ______ 1456 | .' ____ \ (_) .' ___ | 1457 | | (___ \_|_ .--. __ _ .--. .--. / .' \_| .---. _ .--. 1458 | _.____`.[ '/'`\ [ |[ `/'`\] .'`\ \ | | ____/ /__\\[ `.-. | 1459 | | \____) || \__/ || | | | | \__. | \ `.___] | \__., | | | | 1460 | \______.'| ;.__/[___|___] '.__.' `._____.' '.__.'[___||__] 1461 | [__| 1462 | 1463 | 1464 | 1465 | """, 1466 | 1, 1467 | ) 1468 | ) 1469 | ) 1470 | 1471 | Write.Print( 1472 | "─══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════─\n", 1473 | Colors.red, 1474 | interval=0, 1475 | ) 1476 | 1477 | if config["utils"]["use_proxies"]: 1478 | proxy = open("proxies.txt", "r").read().splitlines() 1479 | else: 1480 | proxy = [False] 1481 | 1482 | threads = [] 1483 | 1484 | for i in range(int(config["utils"]["thread_count"])): 1485 | start_thread = threading.Thread(target=Generator(random.choice(proxy)).__main__) 1486 | threads.append(start_thread) 1487 | start_thread.start() 1488 | 1489 | for thread in threads: 1490 | thread.join() 1491 | -------------------------------------------------------------------------------- /Battle.Net Generator/PackageInstaller.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SETLOCAL 3 | 4 | cls||clear 5 | set /P User_Os=Is your OS windows *w* or other *o*: 6 | 7 | if /i %User_Os% == w call :Windows 8 | if /i %User_Os% == o call :others 9 | 10 | echo %User_Os% Is not a valid Operating System 11 | pause 12 | exit 13 | 14 | 15 | :Windows 16 | cls||clear 17 | title Installing Packages 18 | py -3 -m pip install -r requirements.txt 19 | cls||clear 20 | title Installed Packages 21 | @echo Installed All Packages 22 | pause 23 | exit 24 | 25 | :others 26 | cls||clear 27 | title Installing Packages 28 | python3 -m pip install -r requirements.txt 29 | cls||clear 30 | title Installed Packages 31 | @echo Installed All Packages 32 | pause 33 | exit -------------------------------------------------------------------------------- /Battle.Net Generator/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpiroHappy/Battle-Net-Generator/302350aabf0fcd479236ac4fddc1a09b9fe1e4c8/Battle.Net Generator/chromedriver.exe -------------------------------------------------------------------------------- /Battle.Net Generator/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "utils": { 3 | "license": "", 4 | "headless": false, 5 | "verbose": true, 6 | "use_proxies": true, 7 | "thread_count": "1", 8 | "iterations": "1", 9 | "timeout": "100", 10 | "account_format": "2" 11 | }, 12 | 13 | "captcha": { 14 | "use_captcha": false, 15 | "captcha_service": "", 16 | "cap_key": "" 17 | }, 18 | 19 | "sms": { 20 | "phone_verification": true, 21 | "sms_service": "SMSActivate", 22 | "sms_key": "", 23 | "sms_country": "25", 24 | "sms_operator": "" 25 | }, 26 | 27 | "email": { 28 | "email_verification": true, 29 | "email_key": "", 30 | "email_domain": "outlook.com" 31 | }, 32 | 33 | "account_settings": { 34 | "account_country": "Lao People's Democratic Republic", 35 | "custom_name": "", 36 | "security_question": "LOL", 37 | "custom_password": "Temper&Rapid" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Battle.Net Generator/proxies.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpiroHappy/Battle-Net-Generator/302350aabf0fcd479236ac4fddc1a09b9fe1e4c8/Battle.Net Generator/proxies.txt -------------------------------------------------------------------------------- /Battle.Net Generator/requirements.txt: -------------------------------------------------------------------------------- 1 | colorama==0.4.4 2 | httpx==0.19.0 3 | names==0.3.0 4 | psutil==5.9.0 5 | pycryptodome==3.14.1 6 | pynput==1.7.6 7 | pystyle==1.7 8 | requests==2.27.1 9 | selenium==4.2.0 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Battle-Net-Generator 2 | Simple Battle Net Generator In Python Easy to use 3 | 4 |