├── LICENSE ├── README.md ├── Readme_cn.md ├── accounts.txt ├── get_token.py ├── mine.py ├── proxy.txt ├── reg.py ├── requirements.txt └── tokens.txt /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 to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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 | Educational Use Disclaimer: 16 | This software and its associated documentation are intended for educational and instructional purposes only. The authors and copyright holders encourage the use of this software for learning, experimentation, and understanding of software concepts. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION 22 | OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenLoop Automated Reg + Mining 2 | 3 | Automate OpenLoop depin mining with this Python based script for VPS, managing multiple Devices and IP address to ensure 24/7 uptime and maximize earnings. Perfect for those seeking a seamless and efficient way to handle WebSocket connections through HTTP Protocol. 4 | 5 | ## Features 6 | 7 | - openloop Automated Reg Script. 8 | - OpenLoop Automated Multiple Account 24/7 Up time Script. 9 | - Connects to a WebSocket server using HTTP proxies. 10 | - Handles Multiple Get OpenLoop Accounts at once !! 1 Account => mapped with 1 Proxy 11 | - OpenLoop project Raised 15M$ Recently - [https://substack.com/home/post/p-153030845](https://substack.com/home/post/p-153030845) 12 | 13 | #Create Accounts.txt file 14 | 15 | 1. formate => email:password 16 | 2. You can also use the gmail+1 trick or custom domain mail !! also Gmail dot tricks inorder to make accounts 17 | 18 | #Get Proxies IP address Socks5 19 | 20 | 1. Create a Account in https://app.proxies.fo/signup?referral=662d5a3a775a945a8de790ba 21 | 2. Go To https://app.proxies.fo/plans and buy the below plan 22 | 3. ![image](https://github.com/user-attachments/assets/5453eabd-0a09-49f7-b004-1ca4617b9f8a) 23 | 4. **Best** - You can use Crypto and Binance to Pay here !!! 24 | 5. Now go to DashBoard and `click Go to Generator` button 25 | 6. Now change the Proxy formate to ` USER:PASS@HOST:PORT ` and use ` HTTP` in proxy count write 200 or any number. 26 | 7. Now Click on Save to generate. 27 | 8. ![image](https://github.com/user-attachments/assets/010753b5-1112-48c0-9a40-6b00189abd10) 28 | 9. You can use any amount of Proxy You wanted the total pool size is 25k PROXIES. 29 | 30 | ## Requirements 31 | 32 | - Invitation link OpenLoop ( [https://openloop.so/ ](https://openloop.so/)) 33 | - Python (install Python By - https://www.python.org/downloads/ [windows/mac]) or Ubuntu Server [`sudo apt install python3`] 34 | - VPS Server ! You can get Via AWS free Tier or Google Free tier or any online for just ~ 2-5$ per month 35 | - Proxy Server - Buy Only ISP Residential Proxies to Earn $GRASS else you will earn 0% on data Centers / Free Cheap proxies (Best proxy providers are) 36 | - Proxies.fo - [https://app.proxies.fo/signup?referral=662d5a3a775a945a8de790ba](https://app.proxies.fo/signup?referral=662d5a3a775a945a8de790ba) [Buy Only 1GB Plan Enough for 1-6 months and you get Unlimited Accounts or proxies] 37 | - Light Node (for VPS) - [https://www.lightnode.com/?inviteCode=OUMJXM&promoteWay=LINK](https://www.lightnode.com/?inviteCode=OUMJXM&promoteWay=LINK) 38 | 39 | ## SETPS TO RUN THE CODE - 40 | 41 | Before running the script, ensure you have Python installed on your machine. Then, install the necessary Python packages using: 42 | 43 | 1. ``` git clone https://github.com/Solana0x/openloop.git ``` 44 | 2. ``` cd openloop ``` 45 | 3. ``` pip install -r requirements.txt ``` 46 | 4. Replace `Invite code` in `reg.py` File Line ```11```. 47 | 6. Dont Forget to add multiple proxies in the proxy.txt file you can add 10000+ proxy !! EACH ACCOUNT LINKED WITH 1 PROXY! Formate # `http://username:pass@ip:port`. 48 | 7. You can get Multiple Proxy Ip address from Proxies.fo Website !! [use multiple IP ! 49 | 8. To create / reg account make changes in `reg.py` file !! command to run -> `python reg.py` 50 | 9. To start Mining Run `python mine.py` make sure your `tokens.txt` file have the access token of the openloop website. 51 | 10. If you have already reg accounts and wanted new access tokens list just add your accounts data in accounts.txt file `email:pass` formate and run `python get_token.py` 52 | 53 | ![image](https://github.com/user-attachments/assets/a2350548-f56a-4905-a7a9-b83484b1a8d1) 54 | 55 | ## FOR ANY KIND OF HELP CONTACT : ` 0xphatom ` on Discord https://discord.com/users/979641024215416842 56 | 57 | # SOCIALS - 58 | 59 | - **Telegram** - [https://t.me/phantomoalpha](https://t.me/phantomoalpha) 60 | - **Discord** - [https://discord.gg/pGJSPtp9zz](https://discord.gg/pGJSPtp9zz) 61 | -------------------------------------------------------------------------------- /Readme_cn.md: -------------------------------------------------------------------------------- 1 | # OpenLoop 自动注册与挖矿脚本 2 | 3 | 使用此基于 Python 的脚本在 VPS 上实现 OpenLoop 去中心化挖矿的自动化操作,可同时管理多个设备和 IP 地址,确保 24/7 不间断运行并最大化收益。非常适合需要通过 HTTP 协议高效处理 WebSocket 连接的用户。 4 | 5 | ## 功能特性 6 | 7 | - OpenLoop 自动化注册脚本。 8 | - OpenLoop 多账号 24/7 不间断运行脚本。 9 | - 通过 HTTP 代理连接到 WebSocket 服务器。 10 | - 同时处理多个 OpenLoop 账号!每个账号对应一个独立代理。 11 | - OpenLoop 项目近期融资 1500 万美金 - [https://substack.com/home/post/p-153030845](https://substack.com/home/post/p-153030845) 12 | 13 | # 创建 Accounts.txt 文件 14 | 15 | 1. 格式 => email:password 16 | 2. 你也可以使用 Gmail + 标记或自定义域名邮箱,以及 Gmail 点号技巧来生成账号。 17 | 18 | # 获取代理 IP (Socks5/HTTP) 19 | 20 | 1. 在此注册账户:https://app.proxies.fo/signup?referral=662d5a3a775a945a8de790ba 21 | 2. 前往 https://app.proxies.fo/plans 购买对应套餐 22 | 3. ![image](https://github.com/user-attachments/assets/5453eabd-0a09-49f7-b004-1ca4617b9f8a) 23 | 4. **推荐** - 你可以使用加密货币 (Binance) 来支付。 24 | 5. 购买后进入仪表盘,点击 `Go to Generator` 按钮。 25 | 6. 在生成页面中,将代理格式设为 `USER:PASS@HOST:PORT` 并选择 `HTTP`,然后在 proxy count 中填写数量(如 200)。 26 | 7. 点击保存生成代理列表。 27 | 8. ![image](https://github.com/user-attachments/assets/010753b5-1112-48c0-9a40-6b00189abd10) 28 | 9. 你可以使用任意数量的代理,代理池最大可达 25,000 个。 29 | 30 | ## 环境要求 31 | 32 | - OpenLoop 邀请链接 ( [https://openloop.so/ ](https://openloop.so/) ) 33 | - Python (安装 Python: https://www.python.org/downloads/ [Windows/Mac]或使用 Ubuntu Server:`sudo apt install python3`) 34 | - VPS 服务器 (可使用 AWS 免费层、Google 免费层或任意 ~2-5$/月的在线服务器) 35 | - 代理服务器:购买 ISP Residential Proxies 才能获得 $GRASS 收益,如果使用数据中心或免费劣质代理将无收益。 36 | - 推荐代理提供商:Proxies.fo - [https://app.proxies.fo/signup?referral=662d5a3a775a945a8de790ba](https://app.proxies.fo/signup?referral=662d5a3a775a945a8de790ba) [购买 1GB 套餐足以支撑 1-6 个月并提供无限账号或代理] 37 | - Light Node (适用于 VPS) - [https://www.lightnode.com/?inviteCode=OUMJXM&promoteWay=LINK](https://www.lightnode.com/?inviteCode=OUMJXM&promoteWay=LINK) 38 | 39 | ## 运行步骤 40 | 41 | 在运行脚本前,请确保已安装 Python。然后使用以下命令安装必要的 Python 包: 42 | 43 | 1. ``` git clone https://github.com/Solana0x/openloop.git ``` 44 | 2. ``` cd openloop ``` 45 | 3. ``` pip install -r requirements.txt ``` 46 | 4. 在 `reg.py` 文件的第 11 行替换 `Invite code`。 47 | 6. 不要忘记在 proxy.txt 文件中添加多个代理,你可以添加多达 10000+ 条代理!!每个账号对应一个代理!格式为:`http://username:pass@ip:port` 48 | 7. 你可从 Proxies.fo 网站获取多个代理 IP 地址。 49 | 8. 注册账号时请修改 `reg.py` 文件中的相关信息,然后运行命令 `python reg.py` 来创建账号。 50 | 9. 挖矿启动方式:运行 `python mine.py`,确保你的 `tokens.txt` 文件中包含从 openloop 网站获得的访问令牌。 51 | 10. 如果你已有注册好的账号,但需要新的访问令牌列表,只需在 accounts.txt 文件中加入 `email:pass` 格式的账号数据,然后运行 `python get_token.py`。 52 | 53 | ![image](https://github.com/user-attachments/assets/a2350548-f56a-4905-a7a9-b83484b1a8d1) 54 | 55 | ## 寻求帮助 56 | 57 | 如需帮助请联系:`0xphatom` (Discord) https://discord.com/users/979641024215416842 58 | 59 | # 社交平台 60 | 61 | - **Telegram** - [https://t.me/phantomoalpha](https://t.me/phantomoalpha) 62 | - **Discord** - [https://discord.gg/pGJSPtp9zz](https://discord.gg/pGJSPtp9zz) 63 | -------------------------------------------------------------------------------- /accounts.txt: -------------------------------------------------------------------------------- 1 | email:password 2 | -------------------------------------------------------------------------------- /get_token.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | import time 4 | import random 5 | from itertools import cycle 6 | 7 | ACCOUNTS_FILE = "accounts.txt" 8 | PROXIES_FILE = "proxy.txt" 9 | TOKENS_FILE = "tokens.txt" 10 | 11 | def read_accounts(file_path): 12 | """ 13 | Reads accounts from the accounts.txt file. 14 | Each line should be formatted as email:password. 15 | """ 16 | accounts = [] 17 | with open(file_path, "r") as file: 18 | for line in file: 19 | line = line.strip() 20 | if line: 21 | email, password = line.split(":", 1) 22 | accounts.append({"email": email, "password": password}) 23 | return accounts 24 | 25 | def read_proxies(file_path): 26 | """ 27 | Reads proxies from the proxy.txt file. 28 | Each line should be formatted as http://username:password@ip:port. 29 | """ 30 | proxies = [] 31 | with open(file_path, "r") as file: 32 | proxies = [line.strip() for line in file if line.strip()] 33 | return cycle(proxies) 34 | 35 | def save_token(token, file_path): 36 | """ 37 | Saves a token to the tokens.txt file. 38 | """ 39 | with open(file_path, "a") as file: 40 | file.write(token + "\n") 41 | 42 | def get_token_for_account(account, proxy): 43 | """ 44 | Logs in to get a token for a given account using an HTTP proxy. 45 | """ 46 | url = "https://api.openloop.so/users/login" 47 | headers = {"Content-Type": "application/json"} 48 | payload = {"username": account["email"], "password": account["password"]} 49 | proxies = { 50 | "http": proxy, 51 | "https": proxy, 52 | } 53 | 54 | try: 55 | response = requests.post(url, headers=headers, data=json.dumps(payload), proxies=proxies, timeout=10) 56 | if response.status_code != 200: 57 | print(f"[ERROR] Login failed for {account['email']}. Status Code: {response.status_code}") 58 | return None 59 | 60 | data = response.json() 61 | access_token = data.get("data", {}).get("accessToken") 62 | if access_token: 63 | print(f"[SUCCESS] Token fetched for {account['email']}") 64 | return access_token 65 | else: 66 | print(f"[ERROR] No token returned for {account['email']}") 67 | except requests.exceptions.RequestException as e: 68 | print(f"[ERROR] Proxy or network error for {account['email']}: {str(e)}") 69 | return None 70 | 71 | def main(): 72 | accounts = read_accounts(ACCOUNTS_FILE) 73 | proxies = read_proxies(PROXIES_FILE) 74 | open(TOKENS_FILE, "w").close() 75 | for account in accounts: 76 | proxy = next(proxies) 77 | print(f"[INFO] Using proxy: {proxy} for account: {account['email']}") 78 | token = get_token_for_account(account, proxy) 79 | if token: 80 | save_token(token, TOKENS_FILE) 81 | time.sleep(random.uniform(5, 15)) 82 | 83 | if __name__ == "__main__": 84 | main() 85 | -------------------------------------------------------------------------------- /mine.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import random 3 | import time 4 | import json 5 | from itertools import cycle 6 | 7 | TOKENS_FILE = "tokens.txt" 8 | PROXIES_FILE = "proxy.txt" 9 | BANDWIDTH_SHARE_URL = "https://api.openloop.so/bandwidth/share" 10 | MISSIONS_URL = "https://api.openloop.so/missions" 11 | MISSION_COMPLETE_URL = "https://api.openloop.so/missions/{mission_id}/complete" 12 | 13 | def get_random_quality(): 14 | """Returns a random quality score between 60 and 99.""" 15 | return random.randint(60, 99) 16 | 17 | def get_proxies(): 18 | """Reads proxies from proxy.txt and creates a cycle.""" 19 | with open(PROXIES_FILE, "r") as file: 20 | proxies = [line.strip() for line in file if line.strip()] 21 | if not proxies: 22 | raise ValueError("No proxies found in proxy.txt.") 23 | return cycle(proxies) 24 | 25 | def get_tokens(): 26 | """Reads tokens from tokens.txt.""" 27 | with open(TOKENS_FILE, "r") as file: 28 | tokens = [line.strip() for line in file if line.strip()] 29 | if not tokens: 30 | raise ValueError("No tokens found in tokens.txt.") 31 | return tokens 32 | 33 | def share_bandwidth(token, proxy): 34 | """Shares bandwidth using the specified token and proxy.""" 35 | quality = get_random_quality() 36 | max_retries = 1 37 | 38 | for attempt in range(max_retries): 39 | try: 40 | headers = { 41 | "Authorization": f"Bearer {token}", 42 | "Content-Type": "application/json" 43 | } 44 | payload = json.dumps({"quality": quality}) 45 | 46 | response = requests.post( 47 | BANDWIDTH_SHARE_URL, 48 | headers=headers, 49 | data=payload, 50 | proxies={"http": proxy, "https": proxy}, 51 | timeout=40 52 | ) 53 | 54 | if not response.ok: 55 | raise Exception(f"Failed to share bandwidth. Status: {response.status_code}, Response: {response.text}") 56 | data = response.json() 57 | balance = data.get("data", {}).get("balances", {}).get("POINT", "N/A") 58 | print(f"[SUCCESS] Bandwidth shared. Quality: {quality}, Total Earnings: {balance}") 59 | return 60 | except Exception as e: 61 | print(f"[ERROR] Attempt {attempt + 1} failed. Error: {e}") 62 | if "locked" in str(e): 63 | print(f"[ERROR] Locked status detected. Skipping token: {token}") 64 | return 65 | time.sleep(1) 66 | 67 | print("[ERROR] Max retries reached. Skipping.") 68 | 69 | def check_missions_once(tokens, proxies): 70 | """Checks for available missions for all tokens once.""" 71 | for token in tokens: 72 | proxy = next(proxies) 73 | try: 74 | response = requests.get( 75 | MISSIONS_URL, 76 | headers={ 77 | "Authorization": f"Bearer {token}", 78 | "Content-Type": "application/json" 79 | }, 80 | proxies={"http": proxy, "https": proxy}, 81 | timeout=10 82 | ) 83 | 84 | if not response.ok: 85 | print(f"[ERROR] Failed to fetch missions for token {token}. Status: {response.status_code}") 86 | continue 87 | 88 | missions_data = response.json().get("data", {}) 89 | available_missions = [ 90 | mission["missionId"] 91 | for mission in missions_data.get("missions", []) 92 | if mission["status"] == "available" 93 | ] 94 | 95 | print(f"[INFO] {len(available_missions)} available missions found.") 96 | for mission_id in available_missions: 97 | complete_mission(mission_id, token, proxy) 98 | break 99 | except Exception as e: 100 | print(f"[ERROR] Error fetching missions: {e}") 101 | continue 102 | 103 | def complete_mission(mission_id, token, proxy): 104 | """Completes a mission.""" 105 | try: 106 | response = requests.get( 107 | MISSION_COMPLETE_URL.format(mission_id=mission_id), 108 | headers={ 109 | "Authorization": f"Bearer {token}", 110 | "Content-Type": "application/json" 111 | }, 112 | proxies={"http": proxy, "https": proxy}, 113 | timeout=10 114 | ) 115 | 116 | if not response.ok: 117 | raise Exception(f"Failed to complete mission {mission_id}. Status: {response.status_code}") 118 | 119 | data = response.json() 120 | print(f"[SUCCESS] Mission {mission_id} completed.") 121 | return data 122 | except Exception as e: 123 | print(f"[ERROR] Error completing mission {mission_id}: {e}") 124 | 125 | def main(): 126 | print("[INFO] Starting bandwidth sharing...") 127 | 128 | tokens = get_tokens() 129 | proxies = get_proxies() 130 | check_missions_once(tokens, proxies) 131 | while True: 132 | for token in tokens: 133 | proxy = next(proxies) 134 | print(f"[INFO] Using proxy: {proxy} for token: {token}") 135 | share_bandwidth(token, proxy) 136 | print("[INFO] Waiting for the next interval...") 137 | time.sleep(60) 138 | 139 | if __name__ == "__main__": 140 | main() 141 | -------------------------------------------------------------------------------- /proxy.txt: -------------------------------------------------------------------------------- 1 | http://username:password@ip:port 2 | -------------------------------------------------------------------------------- /reg.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | import random 4 | import time 5 | from itertools import cycle 6 | 7 | ACCOUNTS_FILE = "accounts.txt" 8 | PROXIES_FILE = "proxy.txt" 9 | TOKEN_FILE = "tokens.txt" 10 | 11 | INVITE_CODE = "ol41fe134b" 12 | REGISTER_URL = "https://api.openloop.so/users/register" 13 | LOGIN_URL = "https://api.openloop.so/users/login" 14 | 15 | 16 | def read_accounts(file_path): 17 | """Reads accounts from accounts.txt (email:password).""" 18 | accounts = [] 19 | with open(file_path, "r") as file: 20 | for line in file: 21 | line = line.strip() 22 | if line: 23 | email, password = line.split(":", 1) 24 | accounts.append({"email": email, "password": password}) 25 | return accounts 26 | 27 | 28 | def read_proxies(file_path): 29 | """Reads proxies from proxy.txt.""" 30 | proxies = [] 31 | with open(file_path, "r") as file: 32 | proxies = [line.strip() for line in file if line.strip()] 33 | return cycle(proxies) 34 | 35 | 36 | def save_token(token, file_path): 37 | """Saves token to tokens.txt.""" 38 | with open(file_path, "a") as file: 39 | file.write(token + "\n") 40 | 41 | 42 | def generate_name(email): 43 | """Generates a random name based on the email username.""" 44 | base_name = email.split("@")[0] 45 | random_number = random.randint(10, 99) 46 | return f"{base_name}{random_number}" 47 | 48 | 49 | def login_user(email, password, proxy): 50 | """Logs in the user to fetch the access token.""" 51 | max_retries = 5 52 | for attempt in range(max_retries): 53 | try: 54 | login_payload = {"username": email, "password": password} 55 | response = requests.post( 56 | LOGIN_URL, 57 | headers={"Content-Type": "application/json"}, 58 | data=json.dumps(login_payload), 59 | proxies={"http": proxy, "https": proxy}, 60 | timeout=10, 61 | ) 62 | 63 | if not response.ok: 64 | print(f"[ERROR] Login failed for {email}. Status: {response.status_code}") 65 | continue 66 | 67 | data = response.json() 68 | access_token = data.get("data", {}).get("accessToken") 69 | if access_token: 70 | print(f"[SUCCESS] Token fetched for {email}") 71 | save_token(access_token, TOKEN_FILE) 72 | return access_token 73 | except requests.exceptions.RequestException as e: 74 | print(f"[ERROR] Login attempt failed for {email}: {str(e)}") 75 | time.sleep(1) 76 | 77 | print(f"[ERROR] Max retries reached for login: {email}") 78 | return None 79 | 80 | 81 | def register_user(email, password, proxy): 82 | """Registers a user and handles login if registration fails.""" 83 | max_retries = 5 84 | for attempt in range(max_retries): 85 | try: 86 | name = generate_name(email) 87 | registration_payload = { 88 | "name": name, 89 | "username": email, 90 | "password": password, 91 | "inviteCode": INVITE_CODE, 92 | } 93 | response = requests.post( 94 | REGISTER_URL, 95 | headers={"Content-Type": "application/json"}, 96 | data=json.dumps(registration_payload), 97 | proxies={"http": proxy, "https": proxy}, 98 | timeout=10, 99 | ) 100 | 101 | if response.status_code == 401: 102 | print(f"[INFO] Email {email} already exists. Logging in...") 103 | return login_user(email, password, proxy) 104 | 105 | if not response.ok: 106 | print(f"[ERROR] Registration failed for {email}. Status: {response.status_code}") 107 | continue 108 | 109 | print(f"[SUCCESS] Registration successful for {email}") 110 | return login_user(email, password, proxy) 111 | except requests.exceptions.RequestException as e: 112 | print(f"[ERROR] Registration attempt failed for {email}: {str(e)}") 113 | time.sleep(1) 114 | 115 | print(f"[ERROR] Max retries reached for registration: {email}") 116 | return None 117 | 118 | 119 | def main(): 120 | accounts = read_accounts(ACCOUNTS_FILE) 121 | proxies = read_proxies(PROXIES_FILE) 122 | open(TOKEN_FILE, "w").close() 123 | 124 | for account in accounts: 125 | proxy = next(proxies) 126 | email = account["email"] 127 | password = account["password"] 128 | print(f"[INFO] Registering account {email} using proxy {proxy}") 129 | register_user(email, password, proxy) 130 | time.sleep(random.uniform(5, 15)) 131 | 132 | 133 | if __name__ == "__main__": 134 | main() 135 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | -------------------------------------------------------------------------------- /tokens.txt: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------------------------------------------