├── shot.png ├── requirements.txt ├── config.py ├── run.bat ├── LICENSE ├── README.md ├── .gitignore └── main.py /shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aDarkDev/NotPixel/HEAD/shot.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | telethon>=1.37.0 2 | requests>=2.28.1 3 | urllib3>=1.26.12 4 | python-dotenv 5 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | # put yours 2 | API_ID = 123 3 | API_HASH = "123" 4 | 5 | # =============[upgrades]================ 6 | # default is 5 level you can change it your self 7 | PAINT_REWARD_MAX = 5 # max is 7 8 | ENERGY_LIMIT_MAX = 5 # max is 6 9 | RE_CHARGE_SPEED_MAX = 5 # max is 11 10 | 11 | # ================[proxy]================ 12 | USE_PROXY = False # or put True if you want use it 13 | PROXIES = { 14 | "http":"socks5://127.0.0.1", 15 | "https":"socks5://127.0.0.1", # if you using socks4 or http only replace it with "socks5" 16 | } 17 | -------------------------------------------------------------------------------- /run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if not exist venv ( 4 | echo Creating virtual environment... 5 | python -m venv venv 6 | ) 7 | 8 | echo Activating virtual environment... 9 | call venv\Scripts\activate 10 | 11 | if not exist venv\Lib\site-packages\installed ( 12 | if exist requirements.txt ( 13 | echo installing wheel for faster installing 14 | pip install wheel 15 | echo Installing dependencies... 16 | pip install -r requirements.txt 17 | echo. > venv\Lib\site-packages\installed 18 | ) else ( 19 | echo requirements.txt not found, skipping dependency installation. 20 | ) 21 | ) else ( 22 | echo Dependencies already installed, skipping installation. 23 | ) 24 | 25 | 26 | echo Starting the bot... 27 | python main.py 28 | 29 | echo done 30 | pause -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Dark Dev 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NotPixel 2 | Introducing the [NotPixel Bot](https://t.me/notpixel): 3 | 4 | a fully automatic tool for claiming and painting. With built-in anti-detection features, it works efficiently and discreetly to get the best results. Simplify your tasks with the NotPixel Bot! 5 | ![d](https://github.com/aDarkDev/NotPixel/blob/3478a347a2783afbe5faff49672c4bead56d9907/shot.png) 6 | 7 | ## Features: 8 | * 🌵 Automatic Boosting ( New Update ) 9 | * 👾 Multi-Session 10 | * 🔥 Multi-Thread 11 | * ⭕️ Error handling 12 | * ✍🏻 Draw with desired x,y 13 | * 💰 Claim Mining 14 | * 💰 Paint Pixel 15 | * 💸 Show user balance 16 | * 🤖 Anti detect 17 | * 🐍 easy to use as module 18 | 19 | Upcoming features: 🤔 20 | 21 | ## Quick Installation 22 | 23 | To easy install libraries and run bot just open run.bat on Windows and edit .env file 24 | 25 | ## Installation 26 | 27 | 1. Install the required libraries: 28 | ```bash 29 | $ python3 -m pip install -r requirements.txt 30 | ``` 31 | 2. Insert your API Hash and API ID, which can be obtained from my.telegram.org under the Development section in main.py 32 | 33 | Then just run it! 34 | ```bash 35 | $ python3 main.py 36 | ``` 37 | 38 | ### Don't forget to star⭐️ the project and report any bugs🪲 you encounter. Good luck! 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/latest/usage/project/#working-with-version-control 110 | .pdm.toml 111 | .pdm-python 112 | .pdm-build/ 113 | 114 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 115 | __pypackages__/ 116 | 117 | # Celery stuff 118 | celerybeat-schedule 119 | celerybeat.pid 120 | 121 | # SageMath parsed files 122 | *.sage.py 123 | 124 | # Environments 125 | .env 126 | .venv 127 | env/ 128 | venv/ 129 | ENV/ 130 | env.bak/ 131 | venv.bak/ 132 | 133 | # Spyder project settings 134 | .spyderproject 135 | .spyproject 136 | 137 | # Rope project settings 138 | .ropeproject 139 | 140 | # mkdocs documentation 141 | /site 142 | 143 | # mypy 144 | .mypy_cache/ 145 | .dmypy.json 146 | dmypy.json 147 | 148 | # Pyre type checker 149 | .pyre/ 150 | 151 | # pytype static type analyzer 152 | .pytype/ 153 | 154 | # Cython debug symbols 155 | cython_debug/ 156 | 157 | # PyCharm 158 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 159 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 160 | # and can be added to the global gitignore or merged into this file. For a more nuclear 161 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 162 | #.idea/ 163 | 164 | # Ignore session files 165 | sessions/ 166 | 167 | # Ignore virtual environment 168 | myenv/ -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from telethon.sync import TelegramClient, functions 2 | from urllib.parse import unquote 3 | import threading 4 | import requests 5 | import urllib3 6 | import asyncio 7 | import random 8 | import config 9 | import time 10 | import os 11 | 12 | report_bug_text = "If you have done all the steps correctly and you think this is a bug, report it to github.com/aDarkDev with response. response: {}" 13 | authenticate_error = "Please follow the steps correctly. Not authenticated." 14 | 15 | async def GetWebAppData(client): 16 | notcoin = await client.get_entity("notpixel") 17 | msg = await client(functions.messages.RequestWebViewRequest(notcoin,notcoin,platform="android",url="https://notpx.app/")) 18 | webappdata_global = msg.url.split('https://notpx.app/#tgWebAppData=')[1].replace("%3D","=").split('&tgWebAppVersion=')[0].replace("%26","&") 19 | user_data = webappdata_global.split("&user=")[1].split("&auth")[0] 20 | webappdata_global = webappdata_global.replace(user_data,unquote(user_data)) 21 | return webappdata_global 22 | 23 | class NotPx: 24 | UpgradePaintReward = { 25 | 2: { 26 | "Price": 5, 27 | }, 28 | 3: { 29 | "Price": 100, 30 | }, 31 | 4: { 32 | "Price": 200, 33 | }, 34 | 5: { 35 | "Price": 300, 36 | }, 37 | 6: { 38 | "Price": 500, 39 | }, 40 | 7: { 41 | "Price": 600, 42 | "Max": 1 43 | } 44 | } 45 | 46 | UpgradeReChargeSpeed = { 47 | 2: { 48 | "Price": 5, 49 | }, 50 | 3: { 51 | "Price": 100, 52 | }, 53 | 4: { 54 | "Price": 200, 55 | }, 56 | 5: { 57 | "Price": 300, 58 | }, 59 | 6: { 60 | "Price": 400, 61 | }, 62 | 7: { 63 | "Price": 500, 64 | }, 65 | 8: { 66 | "Price": 600, 67 | }, 68 | 9: { 69 | "Price": 700, 70 | }, 71 | 10: { 72 | "Price": 800, 73 | }, 74 | 11: { 75 | "Price": 900, 76 | "Max":1 77 | } 78 | } 79 | 80 | UpgradeEnergyLimit = { 81 | 2: { 82 | "Price": 5, 83 | }, 84 | 3: { 85 | "Price": 100, 86 | }, 87 | 4: { 88 | "Price": 200, 89 | }, 90 | 5: { 91 | "Price": 300, 92 | }, 93 | 6: { 94 | "Price": 400, 95 | "Max": 1 96 | } 97 | } 98 | 99 | def __init__(self,session_name:str) -> None: 100 | self.session = requests.Session() 101 | if config.USE_PROXY: 102 | self.session.proxies = config.PROXIES 103 | self.session_name = session_name 104 | self.__update_headers() 105 | 106 | def __update_headers(self): 107 | client = TelegramClient(self.session_name,config.API_ID,config.API_HASH).start() 108 | WebAppQuery = client.loop.run_until_complete(GetWebAppData(client)) 109 | client.disconnect() 110 | self.session.headers = { 111 | 'Accept': 'application/json, text/plain, */*', 112 | 'Accept-Language': 'en-US,en;q=0.9', 113 | 'Authorization': f'initData {WebAppQuery}', 114 | 'Priority': 'u=1, i', 115 | 'Referer': 'https://notpx.app/', 116 | 'Sec-Ch-Ua': 'Chromium;v=119, Not?A_Brand;v=24', 117 | 'Sec-Ch-Ua-Mobile': '?0', 118 | 'Sec-Ch-Ua-Platform': 'Linux', 119 | 'Sec-Fetch-Dest': 'empty', 120 | 'Sec-Fetch-Mode': 'cors', 121 | 'Sec-Fetch-Site': 'same-origin', 122 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.105 Safari/537.36', 123 | } 124 | 125 | def request(self, method, end_point, key_check, data=None): 126 | try: 127 | if method == "get": 128 | response = self.session.get(f"https://notpx.app/api/v1{end_point}", timeout=5) 129 | else: 130 | response = self.session.post(f"https://notpx.app/api/v1{end_point}", timeout=5, json=data) 131 | # Handle notpixel heavyload error 132 | if "failed to parse" in response.text: 133 | print("[x] {}NotPixel internal error. Wait 5 minutes...{}".format(Colors.RED, Colors.END)) 134 | time.sleep(5 * 60) 135 | elif response.status_code == 200: 136 | if key_check in response.text: 137 | return response.json() # Return the JSON response 138 | else: 139 | raise Exception(report_bug_text.format(response.text)) 140 | elif response.status_code >= 500: 141 | time.sleep(5) 142 | else: 143 | nloop = asyncio.new_event_loop() 144 | asyncio.set_event_loop(nloop) 145 | client = TelegramClient(self.session_name,config.API_ID,config.API_HASH,loop=nloop).start() 146 | WebAppQuery = nloop.run_until_complete(GetWebAppData(client)) 147 | client.disconnect() 148 | self.session.headers.update({ 149 | "Authorization":"initData " + WebAppQuery 150 | }) 151 | print("[+] Authentication renewed!") 152 | time.sleep(2) 153 | 154 | except requests.exceptions.ConnectionError: 155 | print("[!] {}ConnectionError{} {}. Sleeping for 5s...".format(Colors.RED, Colors.END, end_point)) 156 | time.sleep(5) 157 | except urllib3.exceptions.NewConnectionError: 158 | print("[!] {}NewConnectionError{} {}. Sleeping for 5s...".format(Colors.RED, Colors.END, end_point)) 159 | time.sleep(5) 160 | except requests.exceptions.Timeout: 161 | print("[!] {}Timeout Error{} {}. Sleeping for 5s...".format(Colors.RED, Colors.END, end_point)) 162 | time.sleep(5) 163 | 164 | return self.request(method, end_point, key_check, data) 165 | 166 | def claim_mining(self): 167 | return self.request("get","/mining/claim","claimed")['claimed'] 168 | 169 | def accountStatus(self): 170 | return self.request("get","/mining/status","speedPerSecond") 171 | 172 | def autoPaintPixel(self): 173 | # making pixel randomly 174 | colors = [ "#FFFFFF" , "#000000" , "#00CC78" , "#BE0039" ] 175 | random_pixel = (random.randint(100,990) * 1000) + random.randint(100,990) 176 | data = {"pixelId":random_pixel,"newColor":random.choice(colors)} 177 | 178 | return self.request("post","/repaint/start","balance",data)['balance'] 179 | 180 | def paintPixel(self,x,y,hex_color): 181 | pixelformated = (y * 1000) + x + 1 182 | data = {"pixelId":pixelformated,"newColor":hex_color} 183 | 184 | return self.request("post","/repaint/start","balance",data)['balance'] 185 | 186 | def upgrade_paintreward(self): 187 | return self.request("get","/mining/boost/check/paintReward","paintReward")['paintReward'] 188 | 189 | def upgrade_energyLimit(self): 190 | return self.request("get","/mining/boost/check/energyLimit","energyLimit")['energyLimit'] 191 | 192 | def upgrade_reChargeSpeed(self): 193 | return self.request("get","/mining/boost/check/reChargeSpeed","reChargeSpeed")['reChargeSpeed'] 194 | 195 | class Colors: 196 | # Source: https://gist.github.com/rene-d/9e584a7dd2935d0f461904b9f2950007 197 | """ ANSI color codes """ 198 | BLACK = "\033[0;30m" 199 | RED = "\033[0;31m" 200 | GREEN = "\033[0;32m" 201 | BROWN = "\033[0;33m" 202 | BLUE = "\033[0;34m" 203 | PURPLE = "\033[0;35m" 204 | CYAN = "\033[0;36m" 205 | LIGHT_GRAY = "\033[0;37m" 206 | DARK_GRAY = "\033[1;30m" 207 | LIGHT_RED = "\033[1;31m" 208 | LIGHT_GREEN = "\033[1;32m" 209 | YELLOW = "\033[1;33m" 210 | LIGHT_BLUE = "\033[1;34m" 211 | LIGHT_PURPLE = "\033[1;35m" 212 | LIGHT_CYAN = "\033[1;36m" 213 | LIGHT_WHITE = "\033[1;37m" 214 | BOLD = "\033[1m" 215 | FAINT = "\033[2m" 216 | ITALIC = "\033[3m" 217 | UNDERLINE = "\033[4m" 218 | BLINK = "\033[5m" 219 | NEGATIVE = "\033[7m" 220 | CROSSED = "\033[9m" 221 | END = "\033[0m" 222 | # cancel SGR codes if we don't write to a terminal 223 | if not __import__("sys").stdout.isatty(): 224 | for _ in dir(): 225 | if isinstance(_, str) and _[0] != "_": 226 | locals()[_] = "" 227 | else: 228 | # set Windows console in VT mode 229 | if __import__("platform").system() == "Windows": 230 | kernel32 = __import__("ctypes").windll.kernel32 231 | kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7) 232 | del kernel32 233 | 234 | 235 | print(r"""{} 236 | _ _ _ ______ ______ _ 237 | | \ | | | | | ___ \ | ___ \ | | 238 | | \| | ___ | |_| |_/ /_ __ | |_/ / ___ | |_ 239 | | . ` |/ _ \| __| __/\ \/ / | ___ \/ _ \| __| 240 | | |\ | (_) | |_| | > < | |_/ / (_) | |_ 241 | \_| \_/\___/ \__\_| /_/\_\ \____/ \___/ \__| 242 | 243 | NotPx Auto Paint & Claim by aDarkDev - v2.0 {}""".format(Colors.BLUE, Colors.END)) 244 | 245 | 246 | def painter(NotPxClient:NotPx,session_name:str): 247 | print("[+] {}Auto painting started{}.".format(Colors.CYAN,Colors.END)) 248 | while True: 249 | try: 250 | user_status = NotPxClient.accountStatus() 251 | if not user_status: 252 | time.sleep(5) 253 | continue 254 | else: 255 | charges = user_status['charges'] 256 | levels_recharge = user_status['boosts']['reChargeSpeed'] + 1 257 | levels_paintreward = user_status['boosts']['paintReward'] + 1 258 | levels_energylimit = user_status['boosts']['energyLimit'] + 1 259 | user_balance = user_status['userBalance'] 260 | 261 | if levels_recharge - 1 < config.RE_CHARGE_SPEED_MAX and NotPx.UpgradeReChargeSpeed[levels_recharge]['Price'] <= user_balance: 262 | status = NotPxClient.upgrade_reChargeSpeed() 263 | print("[+] {}ReChargeSpeed Upgrade{} to level {} result: {}".format(Colors.CYAN,Colors.END,levels_recharge,status)) 264 | user_balance -= NotPx.UpgradeReChargeSpeed[levels_recharge]['Price'] 265 | 266 | if levels_paintreward - 1 < config.PAINT_REWARD_MAX and NotPx.UpgradePaintReward[levels_paintreward]['Price'] <= user_balance: 267 | status = NotPxClient.upgrade_paintreward() 268 | print("[+] {}PaintReward Upgrade{} to level {} result: {}".format(Colors.CYAN,Colors.END,levels_paintreward,status)) 269 | user_balance -= NotPx.UpgradePaintReward[levels_paintreward]['Price'] 270 | 271 | if levels_energylimit - 1 < config.ENERGY_LIMIT_MAX and NotPx.UpgradeEnergyLimit[levels_energylimit]['Price'] <= user_balance: 272 | status = NotPxClient.upgrade_energyLimit() 273 | print("[+] {}EnergyLimit Upgrade{} to level {} result: {}".format(Colors.CYAN,Colors.END,levels_energylimit,status)) 274 | user_balance -= NotPx.UpgradeEnergyLimit[levels_energylimit]['Price'] 275 | 276 | if charges > 0: 277 | for _ in range(charges): 278 | balance = NotPxClient.autoPaintPixel() 279 | print("[+] {}{}{}: 1 {}Pixel painted{} successfully. User new balance: {}{}{}".format( 280 | Colors.CYAN,session_name,Colors.END, 281 | Colors.GREEN,Colors.END, 282 | Colors.GREEN,balance,Colors.END 283 | )) 284 | t = random.randint(1,6) 285 | print("[!] {}{} anti-detect{}: Sleeping for {}...".format(Colors.CYAN,session_name,Colors.END,t)) 286 | time.sleep(t) 287 | else: 288 | print("[!] {}{}{}: {}No charge available{}. Sleeping for 10 minutes...".format( 289 | Colors.CYAN,session_name,Colors.END, 290 | Colors.YELLOW,Colors.END 291 | )) 292 | time.sleep(600) 293 | except requests.exceptions.ConnectionError: 294 | print("[!] {}{}{}: {}ConnectionError{}. Sleeping for 5s...".format( 295 | Colors.CYAN,session_name,Colors.END, 296 | Colors.RED,Colors.END 297 | )) 298 | time.sleep(5) 299 | except urllib3.exceptions.NewConnectionError: 300 | print("[!] {}{}{}: {}NewConnectionError{}. Sleeping for 5s...".format( 301 | Colors.CYAN,session_name,Colors.END, 302 | Colors.RED,Colors.END 303 | )) 304 | time.sleep(5) 305 | except requests.exceptions.Timeout: 306 | print("[!] {}{}{}: {}Timeout Error{}. Sleeping for 5s...".format( 307 | Colors.CYAN,session_name,Colors.END, 308 | Colors.RED,Colors.END 309 | )) 310 | time.sleep(5) 311 | 312 | 313 | def mine_claimer(NotPxClient: NotPx, session_name: str): 314 | time.sleep(5) # start with delay... 315 | 316 | print("[+] {}Auto claiming started{}.".format(Colors.CYAN, Colors.END)) 317 | while True: 318 | acc_data = NotPxClient.accountStatus() 319 | 320 | # Check if acc_data is None 321 | if acc_data is None: 322 | print("[!] {}{}{}: {}Failed to retrieve account status. Retrying...{}".format(Colors.CYAN, session_name, Colors.END, Colors.RED, Colors.END)) 323 | time.sleep(5) # Wait before retrying 324 | continue 325 | 326 | # Check if the necessary keys exist in acc_data 327 | if 'fromStart' in acc_data and 'speedPerSecond' in acc_data: 328 | fromStart = acc_data['fromStart'] 329 | speedPerSecond = acc_data['speedPerSecond'] 330 | if fromStart * speedPerSecond > 0.3: 331 | claimed_count = round(NotPxClient.claim_mining(), 2) 332 | print("[+] {}{}{}: {} NotPx Token {}claimed{}.".format( 333 | Colors.CYAN, session_name, Colors.END, 334 | claimed_count, Colors.GREEN, Colors.END 335 | )) 336 | else: 337 | print("[!] {}{}{}: {}Unexpected account data format. Retrying...{}".format(Colors.CYAN, session_name, Colors.END, Colors.RED, Colors.END)) 338 | 339 | print("[!] {}{}{}: Sleeping for 1 hour...".format(Colors.CYAN, session_name, Colors.END)) 340 | time.sleep(3600) 341 | 342 | def multithread_starter(): 343 | dirs = os.listdir("sessions/") 344 | sessions = list(filter(lambda x: x.endswith(".session"),dirs)) 345 | sessions = list(map(lambda x: x.split(".session")[0],sessions)) 346 | for session_name in sessions: 347 | try: 348 | cli = NotPx("sessions/"+session_name) 349 | threading.Thread(target=painter,args=[cli,session_name]).start() 350 | threading.Thread(target=mine_claimer,args=[cli,session_name]).start() 351 | except Exception as e: 352 | print("[!] {}Error on load session{} \"{}\", error: {}".format(Colors.RED,Colors.END,session_name,e)) 353 | 354 | # start script 355 | if __name__ == "__main__": 356 | if not os.path.exists("sessions"): 357 | os.mkdir("sessions") 358 | 359 | while True: 360 | option = input("[!] {}Enter 1{} For Adding Account and {}2 for start{} mine + claim: ".format(Colors.BLUE,Colors.END,Colors.BLUE,Colors.END)) 361 | if option == "1": 362 | name = input("\nEnter Session name: ") 363 | if not any(name in i for i in os.listdir("sessions/")): 364 | client = TelegramClient("sessions/"+name,config.API_ID,config.API_HASH).start() 365 | client.disconnect() 366 | print("[+] Session {} {}saved success{}.".format(name,Colors.GREEN,Colors.END)) 367 | else: 368 | print("[x] Session {} {}already exist{}.".format(name,Colors.RED,Colors.END)) 369 | elif option == "2": 370 | print("{}Warning!{} Most airdrops utilize {}UTC detection to prevent cheating{}, which means they monitor your sleep patterns and the timing of your tasks. It's advisable to {}run your script when you're awake and to pause it before you go to sleep{}.".format( 371 | Colors.YELLOW,Colors.END,Colors.YELLOW,Colors.END,Colors.YELLOW,Colors.END 372 | )) 373 | multithread_starter() 374 | break 375 | --------------------------------------------------------------------------------