├── reg.txt ├── proxies.txt ├── requirements.txt ├── LICENSE ├── accgen.py ├── Readme_cn.md ├── README.md └── main.py /reg.txt: -------------------------------------------------------------------------------- 1 | email,password,username 2 | -------------------------------------------------------------------------------- /proxies.txt: -------------------------------------------------------------------------------- 1 | http://username:password@ip:port 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | colorama 3 | faker 4 | capmonster-python 5 | python-anticaptcha 6 | 2captcha-python 7 | anticaptchaofficial 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 0xSolana 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /accgen.py: -------------------------------------------------------------------------------- 1 | import random 2 | import string 3 | 4 | base_email = "enteryouremail@gmail.com" #use only gmail address here 5 | used_emails = set() 6 | used_usernames = set() 7 | def generate_username(): 8 | while True: 9 | length = random.randint(8, 15) 10 | first_letter = random.choice(string.ascii_letters) 11 | rest = ''.join(random.choices(string.ascii_letters + string.digits, k=length - 1)) 12 | username = first_letter + rest 13 | if username not in used_usernames: 14 | used_usernames.add(username) 15 | return username 16 | def generate_password(): 17 | password_length = random.randint(8, 12) 18 | special_characters = "!@#$%^&*()-_=+" 19 | lower = random.choice(string.ascii_lowercase) 20 | upper = random.choice(string.ascii_uppercase) 21 | special = random.choice(special_characters) 22 | rest = ''.join(random.choices(string.ascii_letters + string.digits + special_characters, k=password_length - 3)) 23 | return lower + upper + special + rest 24 | def generate_email(): 25 | while True: 26 | alias_method = random.choice(['plus', 'dot']) 27 | if alias_method == 'plus': 28 | email = base_email.replace('@', f'+{random.randint(1, 9999)}@') 29 | elif alias_method == 'dot': 30 | split_email = base_email.split('@') 31 | name_part = split_email[0] 32 | if '.' not in name_part: 33 | insert_pos = random.randint(1, len(name_part) - 1) 34 | new_name_part = name_part[:insert_pos] + '.' + name_part[insert_pos:] 35 | email = f"{new_name_part}@{split_email[1]}" 36 | else: 37 | email = base_email 38 | if email not in used_emails: 39 | used_emails.add(email) 40 | return email 41 | def save_to_file(email, password, username): 42 | with open('reg.txt', 'a') as file: 43 | file.write(f"{email},{password},{username}\n") 44 | def generate_accounts(num_accounts): 45 | for _ in range(num_accounts): 46 | username = generate_username() 47 | password = generate_password() 48 | email = generate_email() 49 | save_to_file(email, password, username) 50 | if __name__ == "__main__": 51 | num_accounts = 1000 52 | generate_accounts(num_accounts) 53 | -------------------------------------------------------------------------------- /Readme_cn.md: -------------------------------------------------------------------------------- 1 | # NodePay 多账户注册免费 Python 机器人 2 | 3 | 该 Python 机器人脚本通过指定的 HTTP 代理管理多个账户连接,支持无限代理和多个 NodePay 注册账户,处理身份验证并与服务器保持持久连接。脚本还包括自动激活 NodePay 账户的功能,并将所有数据保存到一个 CSV 文件中。 4 | 5 | ## 功能 6 | 7 | - 使用代理创建账户,确保安全。 8 | - 使用 **2Captcha 服务** 自动注册账户。 9 | - 使用自定义推荐码。 10 | - 将所有邮箱、令牌、密码、用户名保存到 Excel 文件中,方便未来运行节点。 11 | - 自动激活账户,无需手动激活! 12 | - 支持多线程和从数组中选择多个推荐码! 13 | 14 | # 获取 2Captcha API Key 15 | 16 | 1. 打开 2Captcha 链接并注册:[https://2captcha.com/](https://2captcha.com/) 17 | 2. 使用加密货币作为支付方式充值 2-3 美元。 18 | 3. 复制 API Key 并将其粘贴到 `main.py` 文件的 [第 293 行](https://github.com/Solana0x/NodepayRefferal/blob/6913c17f72d4a37de0638d32017b8721f776d826/main.py#L293)。 19 | 4. ![image](https://github.com/user-attachments/assets/a4375bfe-5bdd-476c-b0c9-3c7627d33dad) 20 | 21 | # 获取 NodePay 账户的推荐码并将其添加到数组中! 22 | 23 | 1. 在 `main.py` 文件的 [第 286 行](https://github.com/Solana0x/NodepayRefferal/blob/6913c17f72d4a37de0638d32017b8721f776d826/main.py#L286) 添加您想要的推荐码。 24 | 25 | # 生成账户凭据 26 | 27 | 1. 在 `accgen.py` 文件的第 4 行添加您的邮箱,在第 51 行编写您想要生成的凭据数量。 28 | 29 | ## 运行代码的步骤 - 30 | 31 | 在运行脚本之前,确保您的机器上已经安装了 Python。然后,使用以下命令安装必要的 Python 包: 32 | 33 | 1. ``` git clone https://github.com/Solana0x/NodepayRefferal.git ``` 34 | 2. ``` cd NodepayRefferal ``` 35 | 3. ``` pip install -r requirements.txt ``` 36 | 4. 获取推荐码,生成账户凭据,获取 2Captcha API Key。 37 | 5. 在 `proxies.txt` 文件中添加多个代理,您可以添加 1000+ 代理!格式为 # `HTTP://username:pass@ip:port`。 38 | 6. 还需运行 `python accgen.py` 来生成账户 39 | 7. 运行脚本 `python main.py`。 40 | 8. 账户数据将保存到 `Accounts.csv` 文件中,请确保保存该文件。 41 | 42 | ## 系统要求 43 | 44 | - NodePay 账户邀请链接 ( [https://app.nodepay.ai/register?ref=PGiwMlh6dQJVmxE](https://app.nodepay.ai/register?ref=p2k8sttKkrPvgOf) ) 45 | - Python (通过 [https://www.python.org/downloads/](https://www.python.org/downloads/) 安装 Python [Windows/Mac]) 或 Ubuntu 服务器 [`sudo apt install python3`] 46 | - VPS 服务器!您可以通过 AWS 免费套餐、Google 免费套餐、Gitpod 或任何在线服务,每月只需 ~ 2-5 美元 47 | - 代理服务器 - 您可以购买数据中心代理来生成账户 48 | 49 | # NstProxy - https://app.nstproxy.com/register?i=SkKXHm 50 | 51 | ![image](https://github.com/user-attachments/assets/2d225d31-e06a-410b-adae-11caca9865f1) 52 | 53 | ## 需要任何帮助请联系:`0xphatom` 在 Discord 上 https://discord.com/users/979641024215416842 54 | 55 | # 社交平台 56 | 57 | # Telegram - [https://t.me/phantomoalpha](https://t.me/phantomoalpha) 58 | # Discord - [https://discord.gg/pGJSPtp9zz](https://discord.gg/pGJSPtp9zz) 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NodePay Multi Account Registration FREE Python Bot 2 | 3 | This Python Bot script manages Mulit Accounts connections through specified HTTP proxies, Unlimited Proxies and multiple Nodepay Registration Accounts handling authentication and maintaining persistent connections with a server. The script also includes functionality to automatically Activate the Nodepay account and saves all the data in a csv file. 4 | 5 | ## Features 6 | 7 | - Uses Proxies To Create Account #Safu. 8 | - Uses **2Captcha Service** to Automate Register account 9 | - Uses Custom Referrals Codes 10 | - Saves All the Emails, tokens, password, username in a Excel file for future Node running's 11 | - Activates the Accounts Too ! No Manual Activations! 12 | - Supports Multithreading and Multi Referrals Codes from a Array ! 13 | 14 | # Get 2Captcha API Key 15 | 16 | 1. Open the 2Captacha link and register in [https://2captcha.com/](https://2captcha.com/) 17 | 2. Add Funds 2-3$ Use Crypto as a Payment Method. 18 | 3. Copy the Api Key and paste the Key in the `main.py` file in Line [293](https://github.com/Solana0x/NodepayRefferal/blob/6913c17f72d4a37de0638d32017b8721f776d826/main.py#L293) add your API Key here. 19 | 4. ![image](https://github.com/user-attachments/assets/a4375bfe-5bdd-476c-b0c9-3c7627d33dad) 20 | 21 | # Get Refferal Codes of nodepay account and add it in the Array ! 22 | 23 | 1. Go to `main.py` file in the Line `286` write the [Refferals code](https://github.com/Solana0x/NodepayRefferal/blob/6913c17f72d4a37de0638d32017b8721f776d826/main.py#L286) that you wanted to add. 24 | 25 | # Generate Accounts Credentials 26 | 27 | 1. Add Your Email in the `accgen.py` in line `4` and write the number of Credentials you wanted to generate in line `51` 28 | 29 | ## SETPS TO RUN THE CODE - 30 | 31 | Before running the script, ensure you have Python installed on your machine. Then, install the necessary Python packages using: 32 | 33 | 1. ``` git clone https://github.com/Solana0x/NodepayRefferal.git ``` 34 | 2. ``` cd NodepayRefferal ``` 35 | 3. ``` pip install -r requirements.txt ``` 36 | 4. Get Refferal Codes, Generate Accounts Credentials, Get 2Captcha API Key 37 | 5. Add multiple proxies in the `proxies.txt` file you can add 1000+ proxy !! Formate # `HTTP://username:pass@ip:port`. 38 | 6. Also run `python accgen.py` in order to generate accounts 39 | 7. To Run Main Script `python main.py` 40 | 8. Accounts data will be Saved in `Accounts.csv` file make sure to save the FILE. 41 | 42 | ## Requirements 43 | 44 | - Invitation link Nodepay Accounts ( [https://app.nodepay.ai/register?ref=PGiwMlh6dQJVmxE](https://app.nodepay.ai/register?ref=p2k8sttKkrPvgOf) ) 45 | - Python (install Python By - https://www.python.org/downloads/ [windows/mac]) or Ubuntu Server [`sudo apt install python3`] 46 | - VPS Server ! You can get Via AWS free Tier or Google Free tier or Gitpod or any online for just ~ 2-5$ per month 47 | - Proxy Server - you can buy DataCenter Proxies to Earn Account Generate 48 | 49 | # NstProxy - https://app.nstproxy.com/register?i=SkKXHm 50 | 51 | ![image](https://github.com/user-attachments/assets/2d225d31-e06a-410b-adae-11caca9865f1) 52 | 53 | ## FOR ANY KIND OF HELP CONTACT : ` 0xphatom ` on Discord https://discord.com/users/979641024215416842 54 | 55 | # Socials 56 | 57 | # Telegram - [https://t.me/phantomoalpha](https://t.me/phantomoalpha) 58 | # Discord - [https://discord.gg/pGJSPtp9zz](https://discord.gg/pGJSPtp9zz) 59 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import random 3 | import csv 4 | from typing import Optional, Dict 5 | from colorama import Fore, Style, init 6 | from datetime import datetime 7 | from curl_cffi import requests 8 | from twocaptcha import TwoCaptcha 9 | 10 | init(autoreset=True) 11 | 12 | def log_step(message: str, type: str = "info"): 13 | timestamp = datetime.now().strftime("%H:%M:%S") 14 | colors = { 15 | "info": Fore.LIGHTBLUE_EX, 16 | "success": Fore.GREEN, 17 | "error": Fore.LIGHTRED_EX, 18 | "warning": Fore.YELLOW 19 | } 20 | emojis = { 21 | "info": "ℹ️", 22 | "success": "✅", 23 | "error": "❌", 24 | "warning": "⚠️" 25 | } 26 | color = colors.get(type, Fore.WHITE) 27 | emoji = emojis.get(type, "•") 28 | print(f"{Fore.LIGHTWHITE_EX}[{timestamp}] {color}{emoji} {message}{Style.RESET_ALL}") 29 | 30 | class CaptchaConfig: 31 | WEBSITE_KEY = '0x4AAAAAAAx1CyDNL8zOEPe7' 32 | WEBSITE_URL = 'https://app.nodepay.ai/login' 33 | 34 | class Service2Captcha: 35 | def __init__(self, api_key): 36 | self.solver = TwoCaptcha(api_key) 37 | 38 | async def get_captcha_token_async(self): 39 | result = await asyncio.to_thread( 40 | lambda: self.solver.turnstile( 41 | sitekey=CaptchaConfig.WEBSITE_KEY, 42 | url=CaptchaConfig.WEBSITE_URL 43 | ) 44 | ) 45 | return result['code'] 46 | 47 | class ProxyManager: 48 | def __init__(self, proxy_list: list): 49 | self.proxies = proxy_list 50 | self.current_index = -1 51 | self.total_proxies = len(proxy_list) if proxy_list else 0 52 | 53 | def get_next_proxy(self) -> Optional[Dict[str, str]]: 54 | if not self.proxies: 55 | return None 56 | self.current_index = (self.current_index + 1) % self.total_proxies 57 | proxy = self.proxies[self.current_index] 58 | return {"http": proxy, "https": proxy} 59 | 60 | class ApiEndpoints: 61 | BASE_URL = "https://api.nodepay.ai/api" 62 | 63 | @classmethod 64 | def get_url(cls, endpoint: str) -> str: 65 | return f"{cls.BASE_URL}/{endpoint}" 66 | 67 | class Auth: 68 | REGISTER = "auth/register" 69 | LOGIN = "auth/login" 70 | ACTIVATE = "auth/active-account" 71 | 72 | class LoginError(Exception): 73 | pass 74 | 75 | class ReferralClient: 76 | def __init__(self, proxy_manager: Optional[ProxyManager] = None): 77 | self.proxy_manager = proxy_manager 78 | self.current_proxy = None 79 | self.credentials_list = [] 80 | self.current_index = -1 81 | self.session = requests.Session() 82 | self.session.headers.update({ 83 | "User-Agent": ( 84 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " 85 | "AppleWebKit/537.36 (KHTML, like Gecko) " 86 | "Chrome/127.0.0.0 Safari/537.36" 87 | ) 88 | }) 89 | 90 | def _load_credentials(self) -> bool: 91 | try: 92 | if not self.credentials_list: 93 | with open('reg.txt', 'r') as f_reg: 94 | self.credentials_list = [line.strip().split(",") for line in f_reg if line.strip()] 95 | 96 | if len(self.credentials_list) == 0: 97 | log_step("Credential file (reg.txt) is empty.", "error") 98 | return False 99 | 100 | self.current_index = (self.current_index + 1) % len(self.credentials_list) 101 | self.email, self.password, self.username = self.credentials_list[self.current_index] 102 | return True 103 | 104 | except FileNotFoundError: 105 | log_step("Credential file (reg.txt) not found.", "error") 106 | return False 107 | except ValueError: 108 | log_step("Each line in reg.txt must have: email,password,username", "error") 109 | return False 110 | 111 | def _update_proxy(self): 112 | if self.proxy_manager: 113 | self.current_proxy = self.proxy_manager.get_next_proxy() 114 | if self.current_proxy: 115 | proxy_addr = self.current_proxy["http"] 116 | log_step(f"Using proxy: {proxy_addr}", "info") 117 | else: 118 | log_step("No valid proxy retrieved from ProxyManager.", "warning") 119 | else: 120 | self.current_proxy = None 121 | def _get_headers(self, auth_token: Optional[str] = None) -> Dict[str, str]: 122 | headers = { 123 | 'accept': '*/*', 124 | 'accept-language': 'en-US,en;q=0.9', 125 | 'content-type': 'application/json', 126 | 'origin': 'https://app.nodepay.ai', 127 | 'priority': 'u=1, i', 128 | 'referer': 'https://app.nodepay.ai/', 129 | 'sec-ch-ua': '"Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"', 130 | 'sec-ch-ua-mobile': '?0', 131 | 'sec-ch-ua-platform': '"Windows"', 132 | 'sec-fetch-dest': 'empty', 133 | 'sec-fetch-mode': 'cors', 134 | 'sec-fetch-site': 'cross-site', 135 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36' 136 | } 137 | if auth_token: 138 | headers['Authorization'] = f'Bearer {auth_token}' 139 | headers['origin'] = 'chrome-extension://lgmpfmgeabnnlemejacfljbmonaomfmm' 140 | return headers 141 | async def _make_request( 142 | self, 143 | method: str, 144 | endpoint: str, 145 | json_data: dict, 146 | auth_token: Optional[str] = None 147 | ) -> dict: 148 | self._update_proxy() 149 | url = ApiEndpoints.get_url(endpoint) 150 | headers = self._get_headers(auth_token) 151 | proxies = self.current_proxy 152 | log_step(f"Making {method.upper()} request to {url}", "info") 153 | log_step(f"Request headers: {headers}", "info") 154 | log_step(f"Request payload: {json_data}", "info") 155 | if proxies: 156 | log_step(f"Using proxies: {proxies}", "info") 157 | 158 | try: 159 | response = await asyncio.to_thread( 160 | lambda: self.session.request( 161 | method=method.upper(), 162 | url=url, 163 | headers=headers, 164 | json=json_data, 165 | proxies=proxies, 166 | timeout=120 167 | ) 168 | ) 169 | log_step(f"Response status code: {response.status_code}", "info") 170 | log_step(f"Response text: {response.text}", "info") 171 | try: 172 | response_json = response.json() 173 | log_step(f"JSON parsed successfully: {response_json}", "info") 174 | except Exception as e: 175 | log_step(f"Failed to parse JSON response: {str(e)}", "error") 176 | return {"success": False, "msg": f"Failed to parse JSON: {str(e)}"} 177 | return response_json 178 | 179 | except Exception as e: 180 | log_step(f"Request exception: {str(e)}", "error") 181 | return {"success": False, "msg": str(e)} 182 | 183 | async def login(self, captcha_service) -> str: 184 | try: 185 | log_step("Getting captcha token for login...", "info") 186 | captcha_token = await captcha_service.get_captcha_token_async() 187 | log_step("Captcha token obtained for login", "success") 188 | 189 | json_data = { 190 | 'user': self.email, 191 | 'password': self.password, 192 | 'remember_me': True, 193 | 'recaptcha_token': captcha_token 194 | } 195 | log_step("Attempting login...", "info") 196 | response = await self._make_request( 197 | method='POST', 198 | endpoint=ApiEndpoints.Auth.LOGIN, 199 | json_data=json_data 200 | ) 201 | if not response.get("success"): 202 | msg = response.get("msg", "Unknown login error") 203 | log_step(f"Login failed: {msg}", "error") 204 | raise LoginError(msg) 205 | access_token = response['data']['token'] 206 | log_step("Login successful", "success") 207 | return access_token 208 | except Exception as e: 209 | log_step(f"Login error: {str(e)}", "error") 210 | raise 211 | 212 | async def activate_account(self, access_token: str): 213 | try: 214 | log_step("Attempting account activation...", "info") 215 | json_data = {} 216 | response = await self._make_request( 217 | method='POST', 218 | endpoint=ApiEndpoints.Auth.ACTIVATE, 219 | json_data=json_data, 220 | auth_token=access_token 221 | ) 222 | if response.get("success"): 223 | log_step(f"Account activation successful: {response.get('msg', 'Success')}", "success") 224 | else: 225 | log_step(f"Account activation failed: {response.get('msg', 'Unknown error')}", "error") 226 | return response 227 | except Exception as e: 228 | log_step(f"Activation error: {str(e)}", "error") 229 | raise 230 | 231 | async def process_referral(self, ref_code: str, captcha_service, referral_number: int): 232 | try: 233 | if not self._load_credentials(): 234 | return None 235 | 236 | log_step(f"Loaded credentials for: {self.email}", "info") 237 | log_step("Getting captcha token for registration...", "info") 238 | reg_captcha_token = await captcha_service.get_captcha_token_async() 239 | log_step("Captcha token obtained for registration", "success") 240 | 241 | register_data = { 242 | 'email': self.email, 243 | 'password': self.password, 244 | 'username': self.username, 245 | 'referral_code': ref_code, 246 | 'recaptcha_token': reg_captcha_token 247 | } 248 | log_step("Registering account...", "info") 249 | register_response = await self._make_request('POST', ApiEndpoints.Auth.REGISTER, register_data) 250 | 251 | if register_response.get("success"): 252 | log_step(f"Registration successful: {register_response.get('msg', 'Success')}", "success") 253 | access_token = await self.login(captcha_service) 254 | activation_response = await self.activate_account(access_token) 255 | timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S') 256 | with open('accounts.csv', 'a', newline='') as csvfile: 257 | csv_writer = csv.writer(csvfile) 258 | csv_writer.writerow([ 259 | referral_number, 260 | self.email, 261 | self.password, 262 | self.username, 263 | access_token, 264 | timestamp 265 | ]) 266 | 267 | return { 268 | "username": self.username, 269 | "email": self.email, 270 | "password": self.password, 271 | "referral_code": ref_code, 272 | "token": access_token, 273 | "activation_status": activation_response.get('success', False), 274 | "activation_message": activation_response.get('msg', 'Unknown') 275 | } 276 | else: 277 | log_step(f"Registration failed: {register_response.get('msg', 'Unknown error')}", "error") 278 | return None 279 | 280 | except Exception as e: 281 | log_step(f"Error processing referral: {str(e)}", "error") 282 | return None 283 | 284 | async def main(): 285 | # SAMPLE REFER CODES YOU CAN REPLACE THE REFER CODE WITH YOURS HERE 286 | referral_codes = [ 287 | "mjIpmj2MWwKKyjz", 288 | "FFbRTqtmtKos6Dr", 289 | "28Z4fXIg2KkGGAn", 290 | "AM1A6dUEocMlSOH", 291 | "sMW33yLLziigDOR" 292 | ] 293 | api_key = "REPLACE_HERE_YOUR_API_KEY" 294 | try: 295 | with open('reg.txt', 'r') as f_reg: 296 | credentials_list = [line.strip() for line in f_reg if line.strip()] 297 | except FileNotFoundError: 298 | log_step("File reg.txt not found. Exiting.", "error") 299 | return 300 | 301 | num_referrals = len(credentials_list) 302 | if num_referrals == 0: 303 | log_step("No credentials found in reg.txt. Exiting.", "error") 304 | return 305 | use_proxies = True 306 | proxy_manager = None 307 | if use_proxies: 308 | try: 309 | with open('proxies.txt', 'r') as f: 310 | proxy_list = [line.strip() for line in f if line.strip()] 311 | proxy_manager = ProxyManager(proxy_list) 312 | log_step(f"Loaded {len(proxy_list)} proxies", "success") 313 | except FileNotFoundError: 314 | log_step("proxies.txt not found. Running without proxies.", "warning") 315 | captcha_service = Service2Captcha(api_key) 316 | log_step("Captcha service initialized", "success") 317 | with open('accounts.csv', 'w', newline='') as csvfile: 318 | csv_writer = csv.writer(csvfile) 319 | csv_writer.writerow(["S.NO", "EMAIL", "PASS", "USERNAME", "ACCESS_TOKEN", "TIMESTAMP"]) 320 | client = ReferralClient(proxy_manager) 321 | successful_referrals = [] 322 | log_step("Starting referral process...", "info") 323 | for i in range(num_referrals): 324 | ref_code = random.choice(referral_codes) 325 | tasks = [ 326 | client.process_referral(ref_code, captcha_service, referral_number=i + 1) 327 | ] 328 | results = await asyncio.gather(*tasks) 329 | for result in results: 330 | if result: 331 | log_step("Account details:", "success") 332 | print(f"{Fore.LIGHTCYAN_EX}Username: {Fore.WHITE}{result['username']}") 333 | print(f"{Fore.LIGHTCYAN_EX}Email: {Fore.WHITE}{result['email']}") 334 | print(f"{Fore.LIGHTCYAN_EX}Password: {Fore.WHITE}{result['password']}") 335 | print(f"{Fore.LIGHTCYAN_EX}Referred to: {Fore.WHITE}{result['referral_code']}") 336 | print(f"{Fore.LIGHTCYAN_EX}Token: {Fore.WHITE}{result['token']}") 337 | successful_referrals.append(result) 338 | with open('accounts.txt', 'a') as f: 339 | f.write(f"Email: {result['email']}\n") 340 | f.write(f"Password: {result['password']}\n") 341 | f.write(f"Username: {result['username']}\n") 342 | f.write(f"Referred to: {result['referral_code']}\n") 343 | f.write(f"Token: {result['token']}\n") 344 | f.write(f"Date: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n") 345 | f.write("-" * 50 + "\n") 346 | if i < num_referrals - 1: 347 | delay = random.uniform(2, 5) 348 | log_step(f"Waiting {delay:.2f} seconds before next referral...", "info") 349 | await asyncio.sleep(delay) 350 | print(f"\n{Fore.LIGHTCYAN_EX}{'='*45}") 351 | log_step("Summary:", "info") 352 | log_step(f"Total attempted: {num_referrals}", "info") 353 | log_step(f"Successful: {len(successful_referrals)}", "success") 354 | print(f"{Fore.LIGHTCYAN_EX}{'='*45}\n") 355 | 356 | if __name__ == "__main__": 357 | asyncio.run(main()) 358 | --------------------------------------------------------------------------------