├── tokens.txt ├── proxy.txt ├── utils ├── banner.py ├── __pycache__ │ └── banner.cpython-310.pyc └── config.py ├── requirements.txt ├── README.md └── npay.py /tokens.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /proxy.txt: -------------------------------------------------------------------------------- 1 | ## example proxy format 2 | http://user:pass@ip:port 3 | -------------------------------------------------------------------------------- /utils/banner.py: -------------------------------------------------------------------------------- 1 | banner = """ 2 | 3 | NODEPAY FARMING 4 | USE AT YOUR OWN RISK! 5 | 6 | """ 7 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | curl-cffi 3 | fake-useragent 4 | loguru 5 | requests 6 | colorama 7 | -------------------------------------------------------------------------------- /utils/__pycache__/banner.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashtrobe/nodepay-farm/HEAD/utils/__pycache__/banner.cpython-310.pyc -------------------------------------------------------------------------------- /utils/config.py: -------------------------------------------------------------------------------- 1 | DOMAIN_API = { 2 | "SESSION": "https://api.nodepay.ai/api/auth/session", 3 | "PING": [ 4 | "http://52.77.10.116/api/network/ping", 5 | "http://13.215.134.222/api/network/ping", 6 | "http://18.136.143.169/api/network/ping", 7 | "http://52.74.35.173/api/network/ping", 8 | "http://18.142.214.13/api/network/ping", 9 | "http://18.142.29.174/api/network/ping", 10 | "http://52.74.31.107/api/network/ping" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NODEPAY FARMING USING PROXIES 2 | - Daily Claim 3 | - Multi Account Keep-Alive Support. 4 | 5 | # [GET RESIDENTIAL PROXIES FROM HERE](https://proxy-sale.com/?partner_link=7w04Ij8gwl) 6 | 7 | # NOTE 8 | 9 | - **Paste your proxies inside ```proxy.txt``` and the token inside ```tokens.txt```** 10 | - **To use multiple accounts, in which case one proxy from each line will be assigned to one token in each line (1 token = 1 proxy), paste all your tokens in the ```token.txt``` file and make sure there are matching number of proxies in the ```proxy.txt``` file.** 11 | 12 | # PC (WINDOWS) 13 | ## How to Get Nodepay Token - 14 | 15 | 1. Open your browser and login to the NODEPAY dashboard. 16 | 2. Press `F12` to open the **Inspect Elements** panel. 17 | 3. Go to the **Console** tab and paste the following code: 18 | ``` 19 | localStorage.getItem('np_webapp_token') 20 | ``` 21 | 22 | 4. You will receive your user ID, which looks like this: `"eyJhbG........"` 23 | 5. If you can't paste, type `allow pasting` and press Enter. 24 | 25 | ## Recommended Python Version 26 | 27 | It is recommended to use **Python 3.10**. 28 | [Download Python 3.10 here](https://www.python.org/downloads/release/python-3100/). 29 | 30 | ## Install Requirements 31 | 32 | Run the following command to install the necessary packages: 33 | 34 | ``` 35 | pip install -r requirements.txt 36 | ``` 37 | 38 | ## Running the Script 39 | 40 | ``` 41 | python npay.py 42 | ``` 43 | # FOR ANDROID 44 | 45 | ## How to Get NODEPAY User ID Using Android Device 46 | 47 | 1. Download and install [Kiwi Browser](https://play.google.com/store/apps/details?id=com.kiwibrowser.browser&hl=en). 48 | 2. Login to the NODEPAY web and go to the dashboard. 49 | 3. Open the **Developer Tools** in the Kiwi browser. 50 | 4. Go to the **Console** tab and paste this code: 51 | ``` 52 | localStorage.getItem('np_webapp_token') 53 | ``` 54 | 55 | 5. If you can't paste, type `allow pasting` and press Enter, then paste the line above. 56 | 57 | ## Configure Termux 58 | 59 | After installing Termux, ensure you have allowed storage permission for Termux (device app) settings. 60 | Alternatively, run this command in Termux and give it storage permission: 61 | 62 | ``` 63 | termux-setup-storage 64 | ``` 65 | 66 | ## Install Python 3.10 67 | 68 | Run the following commands: 69 | 70 | ``` 71 | pkg update && upgrade 72 | ``` 73 | ``` 74 | pkg install tur-repo 75 | ``` 76 | ``` 77 | pkg install python-is-python3.10 78 | ``` 79 | ``` 80 | pkg install -y rust binutils 81 | ``` 82 | ``` 83 | CARGO_BUILD_TARGET="$(rustc -Vv | grep "host" | awk '{print $2}')" pip install maturin 84 | ``` 85 | 86 | ## Clone This Script 87 | ``` 88 | pkg install git 89 | ``` 90 | ``` 91 | git clone https://github.com/ashtrobe/nodepay-farm.git 92 | ``` 93 | ## Install Requirements 94 | ``` 95 | pip3.10 install -r requirements.txt 96 | ``` 97 | ## Put your token(s) inside ```token.txt``` file and proxies inside ```proxy.txt``` file 98 | ``` 99 | pkg install nano 100 | ``` 101 | ``` 102 | nano tokens.txt 103 | ``` 104 | ``` 105 | nano proxy.txt 106 | ``` 107 | ## Download this [FILE](https://github.com/ylasgamers/nodepay/raw/refs/heads/main/libcurl-impersonate-chrome.so.4) and put it inside - "/data/data/com.termux/files/usr/lib" 108 | Example Command - ```cp libcurl-impersonate-chrome.so.4 /data/data/com.termux/files/usr/lib``` 109 | ## Run the Script 110 | ``` 111 | python npay.py 112 | ``` 113 | -------------------------------------------------------------------------------- /npay.py: -------------------------------------------------------------------------------- 1 | import requests as reqs 2 | import asyncio 3 | import time 4 | import uuid 5 | from curl_cffi import requests 6 | from loguru import logger 7 | from fake_useragent import UserAgent 8 | from utils.banner import banner 9 | from colorama import Fore, Style, init 10 | from datetime import datetime 11 | 12 | init() 13 | 14 | PING_INTERVAL = 60 15 | RETRIES = 60 16 | TOKEN_FILE = 'tokens.txt' 17 | PROXY_FILE = 'proxy.txt' 18 | DOMAIN_API = { 19 | "SESSION": "http://api.nodepay.ai/api/auth/session", 20 | "PING": "https://nw.nodepay.org/api/network/ping", 21 | "DAILY_CLAIM": "https://api.nodepay.org/api/mission/complete-mission" 22 | } 23 | 24 | CONNECTION_STATES = { 25 | "CONNECTED": 1, 26 | "DISCONNECTED": 2, 27 | "NONE_CONNECTION": 3 28 | } 29 | 30 | status_connect = CONNECTION_STATES["NONE_CONNECTION"] 31 | browser_id = None 32 | account_info = {} 33 | last_ping_time = {} 34 | 35 | def uuidv4(): 36 | return str(uuid.uuid4()) 37 | 38 | def show_banner(): 39 | print(Fore.MAGENTA + banner + Style.RESET_ALL) 40 | 41 | def show_copyright(): 42 | print(Fore.MAGENTA + Style.BRIGHT + banner + Style.RESET_ALL) 43 | 44 | def valid_resp(resp): 45 | if not resp or "code" not in resp or resp["code"] < 0: 46 | raise ValueError("Invalid response") 47 | return resp 48 | 49 | def load_tokens_from_file(filename): 50 | try: 51 | with open(filename, 'r') as file: 52 | tokens = file.read().splitlines() 53 | return tokens 54 | except Exception as e: 55 | logger.error(f"Failed to load tokens: {e}") 56 | raise SystemExit("Exiting due to failure in loading tokens") 57 | 58 | def load_proxies(proxy_file): 59 | try: 60 | with open(proxy_file, 'r') as file: 61 | proxies = file.read().splitlines() 62 | return proxies 63 | except Exception as e: 64 | logger.error(f"Failed to load proxies: {e}") 65 | raise SystemExit("Exiting due to failure in loading proxies") 66 | 67 | def dailyclaim(token): 68 | url = DOMAIN_API["DAILY_CLAIM"] 69 | headers = { 70 | "Authorization": f"Bearer {token}", 71 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36", 72 | "Content-Type": "application/json", 73 | "Origin": "https://app.nodepay.ai", 74 | "Referer": "https://app.nodepay.ai/", 75 | "Accept-Language": "en-US,en;q=0.5", 76 | "Accept": "*/*", 77 | "Connection": "keep-alive", 78 | "Upgrade-Insecure-Requests": "1" 79 | } 80 | data = { 81 | "mission_id": "1" 82 | } 83 | 84 | try: 85 | response = requests.post(url, headers=headers, json=data, timeout=15) 86 | if response.status_code != 200: 87 | log_message("Daily Claim FAILED, maybe it's already claimed?", Fore.RED) 88 | return False 89 | 90 | response_json = response.json() 91 | if response_json.get("success"): 92 | log_message("Daily Claim SUCCESSFUL", Fore.GREEN) 93 | return True 94 | else: 95 | log_message("Daily Claim FAILED, maybe it's already claimed?", Fore.RED) 96 | return False 97 | except Exception as e: 98 | log_message(f"Error in dailyclaim: {e}", Fore.RED) 99 | return False 100 | 101 | def is_valid_proxy(proxy): 102 | return True 103 | 104 | def load_session_info(proxy): 105 | return {} 106 | 107 | def save_session_info(proxy, data): 108 | pass 109 | 110 | def save_status(proxy, status): 111 | pass 112 | 113 | def handle_logout(proxy): 114 | global status_connect, account_info 115 | status_connect = CONNECTION_STATES["NONE_CONNECTION"] 116 | account_info = {} 117 | save_status(proxy, None) 118 | log_message(f"Logged out and cleared session info for proxy {proxy}", Fore.RED) 119 | 120 | async def start_ping(proxy, token): 121 | try: 122 | while True: 123 | await ping(proxy, token) 124 | await asyncio.sleep(PING_INTERVAL) 125 | except asyncio.CancelledError: 126 | log_message(f"Ping task for proxy {proxy} was cancelled", Fore.YELLOW) 127 | except Exception as e: 128 | log_message(f"Error in start_ping for proxy {proxy}: {e}", Fore.RED) 129 | 130 | async def ping(proxy, token): 131 | global last_ping_time, RETRIES, status_connect 132 | 133 | current_time = time.time() 134 | 135 | if proxy in last_ping_time and (current_time - last_ping_time[proxy]) < PING_INTERVAL: 136 | log_message(f"Skipping ping for proxy {proxy}, not enough time elapsed", Fore.YELLOW) 137 | return 138 | 139 | last_ping_time[proxy] = current_time 140 | 141 | try: 142 | data = { 143 | "id": account_info.get("uid"), 144 | "browser_id": browser_id, 145 | "timestamp": int(time.time()), 146 | "version": "2.2.7" 147 | } 148 | 149 | response = await call_api(DOMAIN_API["PING"], data, proxy, token) 150 | if response["code"] == 0: 151 | log_message(f"Ping SUCCESSFUL for {proxy} - IP Score {response['data']['ip_score']}", Fore.GREEN) 152 | RETRIES = 0 153 | status_connect = CONNECTION_STATES["CONNECTED"] 154 | else: 155 | handle_ping_fail(proxy, response) 156 | except Exception as e: 157 | log_message(f"Ping failed via proxy {proxy}: {e}", Fore.RED) 158 | handle_ping_fail(proxy, None) 159 | 160 | async def call_api(url, data, proxy, token): 161 | headers = { 162 | "Authorization": f"Bearer {token}", 163 | "Content-Type": "application/json", 164 | "Origin": "chrome-extension://lgmpfmgeabnnlemejacfljbmonaomfmm", 165 | "Accept": "*/*", 166 | "Accept-Language": "en-US,en;q=0.5", 167 | } 168 | 169 | try: 170 | response = requests.post(url, json=data, headers=headers, impersonate="safari15_5", proxies={ 171 | "http": proxy, "https": proxy}, timeout=15) 172 | 173 | response.raise_for_status() 174 | return valid_resp(response.json()) 175 | except Exception as e: 176 | log_message(f"Error during API call to {url} via proxy {proxy}: {e}", Fore.RED) 177 | raise ValueError(f"Failed API call to {url}") 178 | 179 | async def render_profile_info(proxy, token): 180 | global browser_id, account_info 181 | 182 | try: 183 | np_session_info = load_session_info(proxy) 184 | 185 | if not np_session_info: 186 | browser_id = uuidv4() 187 | response = await call_api(DOMAIN_API["SESSION"], {}, proxy, token) 188 | valid_resp(response) 189 | account_info = response["data"] 190 | if account_info.get("uid"): 191 | save_session_info(proxy, account_info) 192 | await start_ping(proxy, token) 193 | else: 194 | handle_logout(proxy) 195 | else: 196 | account_info = np_session_info 197 | await start_ping(proxy, token) 198 | except Exception as e: 199 | log_message(f"Error in render_profile_info for proxy {proxy}: {e}", Fore.RED) 200 | error_message = str(e) 201 | if any(phrase in error_message for phrase in [ 202 | "sent 1011 (internal error) keepalive ping timeout; no close frame received", 203 | "500 Internal Server Error" 204 | ]): 205 | log_message(f"Removing error proxy from the list: {proxy}", Fore.RED) 206 | remove_proxy_from_list(proxy) 207 | return None 208 | else: 209 | log_message(f"Connection error: {e}", Fore.RED) 210 | return proxy 211 | 212 | async def main(): 213 | all_proxies = load_proxies(PROXY_FILE) 214 | 215 | tokens = load_tokens_from_file(TOKEN_FILE) 216 | if not tokens: 217 | log_message("Token cannot be empty. Exiting the program.", Fore.RED) 218 | exit() 219 | if not all_proxies: 220 | log_message("Proxies cannot be empty. Exiting the program.", Fore.RED) 221 | exit() 222 | 223 | for token in tokens: 224 | log_message("Performing daily claim...", Fore.YELLOW) 225 | dailyclaim(token) 226 | 227 | while True: 228 | for token in tokens: 229 | active_proxies = [ 230 | proxy for proxy in all_proxies if is_valid_proxy(proxy)][:100] 231 | tasks = {asyncio.create_task(render_profile_info( 232 | proxy, token)): proxy for proxy in active_proxies} 233 | 234 | done, pending = await asyncio.wait(tasks.keys(), return_when=asyncio.FIRST_COMPLETED) 235 | for task in done: 236 | failed_proxy = tasks[task] 237 | if task.result() is None: 238 | log_message(f"Removing and replacing failed proxy: {failed_proxy}", Fore.RED) 239 | active_proxies.remove(failed_proxy) 240 | if all_proxies: 241 | new_proxy = all_proxies.pop(0) 242 | if is_valid_proxy(new_proxy): 243 | active_proxies.append(new_proxy) 244 | new_task = asyncio.create_task( 245 | render_profile_info(new_proxy, token)) 246 | tasks[new_task] = new_proxy 247 | tasks.pop(task) 248 | 249 | for proxy in set(active_proxies) - set(tasks.values()): 250 | new_task = asyncio.create_task( 251 | render_profile_info(proxy, token)) 252 | tasks[new_task] = proxy 253 | await asyncio.sleep(3) 254 | await asyncio.sleep(10) 255 | 256 | def log_message(message, color): 257 | timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S') 258 | print(color + f"[{timestamp}] {message}" + Style.RESET_ALL) 259 | 260 | if __name__ == '__main__': 261 | show_copyright() 262 | log_message("RUNNING WITH PROXIES", Fore.WHITE) 263 | try: 264 | asyncio.run(main()) 265 | except (KeyboardInterrupt, SystemExit): 266 | log_message("Program terminated by user.", Fore.RED) 267 | --------------------------------------------------------------------------------