├── local_proxies.txt ├── getuserid.md ├── README.md ├── howrun.md ├── Requirements.md ├── lite_noproxy.py └── lite_proxy.py /local_proxies.txt: -------------------------------------------------------------------------------- 1 | http://ip:port 2 | socks4://ip:port 3 | socks5://ip:port 4 | http://user:pass@ip:port 5 | socks4://user:pass@ip:port 6 | socks5://user:pass@ip:port 7 | -------------------------------------------------------------------------------- /getuserid.md: -------------------------------------------------------------------------------- 1 | - Make Sure Already Login On Dashboard Your Grass Account 2 | - Right Click > Inspect OR F12 3 | - Search/Go/Click Application > Storage > Click Local Storage > Click https://app.getgrass.io/ 4 | - Fill Filter With userId, You Will Found Your userId Grass 5 | 6 | [![YLAS GAMERS](https://img001.prntscr.com/file/img001/QjiSwHhQTOi7op-gHY-DJg.png)](https://github.com/ylasgamers/getgrasslite) 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Automatic Bot GetGrass Without & With Proxy 2 | # [Register Here](https://app.getgrass.io/register/?referralCode=fIp-ogmECoJZhIN) 3 | # [Install Requirement First Here !](https://github.com/ylasgamers/getgrasslite/blob/main/Requirements.md) 4 | # [Get userId Grass Here](https://github.com/ylasgamers/getgrasslite/blob/main/geruserid.md) 5 | # [How To Run](https://github.com/ylasgamers/getgrasslite/blob/main/howrun.md) 6 | -------------------------------------------------------------------------------- /howrun.md: -------------------------------------------------------------------------------- 1 | # Before Run, Make Sure Already Install Requirements & Settings Proxy On local_proxies.txt 2 | ``` 3 | You Can Manual Download As Zip File 4 | OR 5 | git clone https://github.com/ylasgamers/getgrasslite.git 6 | ``` 7 | ``` 8 | cd getgrasslite 9 | ``` 10 | - Please Choose : 11 | - Lite 1x 12 | - Lite Version With Proxy = lite_proxy.py 13 | - Lite Version Without Proxy = lite_noproxy.py 14 | ``` 15 | python lite_proxy.py 16 | python lite_noproxy.py 17 | OR 18 | python3 lite_proxy.py 19 | python3 lite_noproxy.py 20 | ``` 21 | -------------------------------------------------------------------------------- /Requirements.md: -------------------------------------------------------------------------------- 1 | - Recomended Using Python 3.10 2 | - For Windows [Download Here x64](https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe) [Scrool Down For Other Version] 3 | - Maybe For Windows 10 Or Higher You Can Install Python 3.10 From Microsoft Store 4 | ``` 5 | - Install Requirements 6 | python -m pip install pip --upgrade 7 | pip install requests 8 | pip install asyncio 9 | pip install aiohttp 10 | pip install loguru 11 | pip install websockets_proxy 12 | pip install fake_useragent==1.5.1 13 | ``` 14 | - For Termux Android [Download Here](https://f-droid.org/repo/com.termux_1020.apk) [F-Droid Version] 15 | ``` 16 | After Install Termux, Make Sure Allowed Permission Storage On Setting Termux 17 | - Install Python 3.10 18 | pkg update && upgrade 19 | pkg install tur-repo 20 | pkg install python-is-python3.10 21 | - Install Requirements 22 | pip install --upgrade pip 23 | pkg install -y rust binutils 24 | CARGO_BUILD_TARGET="$(rustc -Vv | grep "host" | awk '{print $2}')" pip install maturin 25 | pip install requests 26 | pip install asyncio 27 | pip install aiohttp 28 | pip install loguru 29 | pip install websockets_proxy 30 | pip install fake_useragent==1.5.1 31 | ``` 32 | - For Ubuntu 18.04 | 20.04 | 22.04 (VPS) 33 | ``` 34 | - Install Python 3.10 35 | apt update && sudo apt upgrade -y 36 | apt install software-properties-common -y 37 | add-apt-repository ppa:deadsnakes/ppa 38 | apt install python3.10 39 | apt install python3-pip 40 | - Install Requirements 41 | pip install requests 42 | pip install asyncio 43 | pip install aiohttp 44 | pip install loguru 45 | pip install websockets_proxy 46 | pip install fake_useragent==1.5.1 47 | ``` 48 | -------------------------------------------------------------------------------- /lite_noproxy.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import random 3 | import ssl 4 | import json 5 | import time 6 | import uuid 7 | import requests 8 | import websockets 9 | import os, base64 10 | from loguru import logger 11 | from fake_useragent import UserAgent 12 | from base64 import b64decode, b64encode 13 | import aiohttp 14 | from aiohttp import ClientSession, ClientWebSocketResponse 15 | 16 | async def connect_to_wss(user_id): 17 | #user_agent = UserAgent(os=['windows', 'macos', 'linux'], browsers='chrome') 18 | user_agent = [ 19 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", 20 | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", 21 | "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36" 22 | ] 23 | random_user_agent = random.choice(user_agent)#user_agent.random 24 | device_id = str(uuid.uuid4()) 25 | logger.info(device_id) 26 | while True: 27 | try: 28 | await asyncio.sleep(random.randint(1, 10) / 10) 29 | custom_headers = { 30 | "User-Agent": random_user_agent, 31 | "Origin": "chrome-extension://ilehaonighjijnmpnagapkhpcdbhclfg" 32 | } 33 | ssl_context = ssl.create_default_context() 34 | ssl_context.check_hostname = False 35 | ssl_context.verify_mode = ssl.CERT_NONE 36 | 37 | uri = "wss://proxy2.wynd.network:4650" 38 | 39 | # WebSocket connection via proxy using aiohttp 40 | connector = aiohttp.TCPConnector(ssl_context=ssl_context) 41 | async with ClientSession(connector=connector) as session: 42 | async with session.ws_connect( 43 | uri, 44 | headers=custom_headers, 45 | ) as websocket: 46 | 47 | response = await websocket.receive() 48 | message = json.loads(response.data) 49 | logger.info(message) 50 | 51 | if message["action"] == "AUTH": 52 | auth_response = { 53 | "id": message["id"], 54 | "origin_action": "AUTH", 55 | "result": { 56 | "browser_id": device_id, 57 | "user_id": user_id, 58 | "user_agent": custom_headers['User-Agent'], 59 | "timestamp": int(time.time()), 60 | "device_type": "extension", 61 | "version": "4.26.2", 62 | "extension_id": "ilehaonighjijnmpnagapkhpcdbhclfg" 63 | } 64 | } 65 | logger.debug(auth_response) 66 | await websocket.send_json(auth_response) 67 | 68 | response_auth = await websocket.receive() 69 | message_auth = json.loads(response_auth.data) 70 | logger.info(message_auth) 71 | 72 | if message_auth["action"] == "HTTP_REQUEST": 73 | headers = { 74 | "Content-Type": "application/json; charset=utf-8", 75 | "User-Agent": custom_headers['User-Agent'] 76 | } 77 | 78 | async with session.get(message_auth["data"]["url"], headers=headers) as response: 79 | result = await response.json() 80 | content = await response.text() 81 | code = result.get('code') 82 | if None == code: 83 | logger.error(f"Error send http") 84 | logger.error(f"Status : {response.status}") 85 | else: 86 | logger.info(f"Send http success : {code}") 87 | logger.info(f"Status : {response.status}") 88 | response_body = base64.b64encode(content.encode()).decode() 89 | httpreq_response = { 90 | "id": message_auth["id"], 91 | "origin_action": "HTTP_REQUEST", 92 | "result": { 93 | "url": message_auth["data"]["url"], 94 | "status": response.status, 95 | "status_text": response.reason, 96 | "headers": dict(response.headers), 97 | "body": response_body 98 | } 99 | } 100 | logger.debug(httpreq_response) 101 | await websocket.send_json(httpreq_response) 102 | 103 | while True: 104 | send_ping = { 105 | "id": str(uuid.uuid4()), 106 | "version": "1.0.0", 107 | "action": "PING", 108 | "data": {} 109 | } 110 | logger.debug(send_ping) 111 | await websocket.send_json(send_ping) 112 | 113 | response_ping = await websocket.receive() 114 | message_ping = json.loads(response_ping.data) 115 | logger.info(message_ping) 116 | 117 | if message_ping["action"] == "PONG": 118 | pong_response = { 119 | "id": message_ping["id"], 120 | "origin_action": "PONG" 121 | } 122 | logger.debug(pong_response) 123 | await websocket.send_json(pong_response) 124 | await asyncio.sleep(5) 125 | except Exception as e: 126 | logger.error(e) 127 | 128 | 129 | async def main(): 130 | #find user_id on the site in conlose localStorage.getItem('userId') (if you can't get it, write allow pasting) 131 | _user_id = input('Please Enter your user ID: ') 132 | await connect_to_wss(_user_id) 133 | 134 | if __name__ == '__main__': 135 | asyncio.run(main()) 136 | -------------------------------------------------------------------------------- /lite_proxy.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import random 3 | import ssl 4 | import time 5 | import uuid 6 | import json 7 | import requests 8 | import os, base64 9 | from loguru import logger 10 | from fake_useragent import UserAgent 11 | from base64 import b64decode, b64encode 12 | import aiohttp 13 | from aiohttp import ClientSession, ClientWebSocketResponse 14 | 15 | async def connect_to_wss(socks5_proxy, user_id): 16 | #user_agent = UserAgent(os=['windows', 'macos', 'linux'], browsers='chrome') 17 | user_agent = [ 18 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", 19 | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", 20 | "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36" 21 | ] 22 | random_user_agent = random.choice(user_agent)#user_agent.random 23 | device_id = str(uuid.uuid3(uuid.NAMESPACE_DNS, socks5_proxy)) 24 | logger.info(device_id) 25 | while True: 26 | try: 27 | await asyncio.sleep(random.randint(1, 10) / 10) 28 | custom_headers = { 29 | "User-Agent": random_user_agent, 30 | "Origin": "chrome-extension://ilehaonighjijnmpnagapkhpcdbhclfg" 31 | } 32 | ssl_context = ssl.create_default_context() 33 | ssl_context.check_hostname = False 34 | ssl_context.verify_mode = ssl.CERT_NONE 35 | 36 | uri = "wss://proxy2.wynd.network:4650" 37 | 38 | # WebSocket connection via proxy using aiohttp 39 | connector = aiohttp.TCPConnector(ssl_context=ssl_context) 40 | async with ClientSession(connector=connector) as session: 41 | async with session.ws_connect( 42 | uri, 43 | headers=custom_headers, 44 | proxy=socks5_proxy, # Use HTTP proxy for WebSocket connection 45 | ) as websocket: 46 | 47 | response = await websocket.receive() 48 | message = json.loads(response.data) 49 | logger.info(message) 50 | 51 | if message["action"] == "AUTH": 52 | auth_response = { 53 | "id": message["id"], 54 | "origin_action": "AUTH", 55 | "result": { 56 | "browser_id": device_id, 57 | "user_id": user_id, 58 | "user_agent": custom_headers['User-Agent'], 59 | "timestamp": int(time.time()), 60 | "device_type": "extension", 61 | "version": "4.26.2", 62 | "extension_id": "ilehaonighjijnmpnagapkhpcdbhclfg" 63 | } 64 | } 65 | logger.debug(auth_response) 66 | await websocket.send_json(auth_response) 67 | 68 | response_auth = await websocket.receive() 69 | message_auth = json.loads(response_auth.data) 70 | logger.info(message_auth) 71 | 72 | if message_auth["action"] == "HTTP_REQUEST": 73 | headers = { 74 | "Content-Type": "application/json; charset=utf-8", 75 | "User-Agent": custom_headers['User-Agent'] 76 | } 77 | 78 | async with session.get(message_auth["data"]["url"], headers=headers, proxy=socks5_proxy) as response: 79 | result = await response.json() 80 | content = await response.text() 81 | code = result.get('code') 82 | if None == code: 83 | logger.error(f"Error send http") 84 | logger.error(f"Status : {response.status}") 85 | else: 86 | logger.info(f"Send http success : {code}") 87 | logger.info(f"Status : {response.status}") 88 | response_body = base64.b64encode(content.encode()).decode() 89 | httpreq_response = { 90 | "id": message_auth["id"], 91 | "origin_action": "HTTP_REQUEST", 92 | "result": { 93 | "url": message_auth["data"]["url"], 94 | "status": response.status, 95 | "status_text": response.reason, 96 | "headers": dict(response.headers), 97 | "body": response_body 98 | } 99 | } 100 | logger.debug(httpreq_response) 101 | await websocket.send_json(httpreq_response) 102 | 103 | while True: 104 | send_ping = { 105 | "id": str(uuid.uuid4()), 106 | "version": "1.0.0", 107 | "action": "PING", 108 | "data": {} 109 | } 110 | logger.debug(send_ping) 111 | await websocket.send_json(send_ping) 112 | 113 | response_ping = await websocket.receive() 114 | message_ping = json.loads(response_ping.data) 115 | logger.info(message_ping) 116 | 117 | if message_ping["action"] == "PONG": 118 | pong_response = { 119 | "id": message_ping["id"], 120 | "origin_action": "PONG" 121 | } 122 | logger.debug(pong_response) 123 | await websocket.send_json(pong_response) 124 | await asyncio.sleep(5) 125 | except Exception as e: 126 | logger.error(e) 127 | logger.error(socks5_proxy) 128 | 129 | 130 | async def main(): 131 | #find user_id on the site in conlose localStorage.getItem('userId') (if you can't get it, write allow pasting) 132 | _user_id = input('Please Enter your user ID: ') 133 | with open('local_proxies.txt', 'r') as file: 134 | local_proxies = file.read().splitlines() 135 | tasks = [asyncio.ensure_future(connect_to_wss(i, _user_id)) for i in local_proxies] 136 | await asyncio.gather(*tasks) 137 | 138 | if __name__ == '__main__': 139 | #letsgo 140 | asyncio.run(main()) 141 | --------------------------------------------------------------------------------