├── data.txt ├── .gitignore ├── README.md └── bot.py /data.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | env 2 | *.py 3 | !bot.py 4 | *.txt 5 | !data.txt 6 | http.log -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dormintod 2 | 3 | Auto Claim for dormint / sleepcoin on Telegram 4 | 5 | # Table of Contents 6 | 7 | - [Dormintod](#dormintod) 8 | - [Table of Contents](#table-of-contents) 9 | - [Features](#features) 10 | - [Register](#register) 11 | - [How to Use](#how-to-use) 12 | - [Windows](#windows) 13 | - [Linux](#linux) 14 | - [Termux](#termux) 15 | - [How to Find Account Token](#how-to-find-account-token) 16 | - [Discussion](#discussion) 17 | - [Support](#support) 18 | - [Thank you \< 3](#thank-you--3) 19 | 20 | # Features 21 | 22 | - [x] Auto Claim 23 | - [x] Multi Account Support 24 | 25 | # Register 26 | 27 | Click the followling link to register : [https://t.me/dormint_bot?start=629438076](https://t.me/dormint_bot?start=629438076) 28 | 29 | # How to Use 30 | 31 | ## Windows 32 | 33 | 1. Make sure you computer was installed python and git. 34 | 35 | python site : [https://python.org](https://python.org) 36 | 37 | git site : [https://git-scm.com/](https://git-scm.com/) 38 | 39 | 2. Clone this repository 40 | ```shell 41 | git clone https://github.com/akasakaid/dormintod.git 42 | ``` 43 | 44 | 3. goto dormintod directory 45 | ``` 46 | cd dormintod 47 | ``` 48 | 49 | 4. install the require library 50 | ``` 51 | python -m pip install -r requirements.txt 52 | ``` 53 | 54 | 5. Edit `data.txt`, input you data token in `data.txt`, find you token in [How to Find Account Token](#how-to-find-account-token). One line for one data account, if you want add you second account add in new line! 55 | 56 | 6. execute the main program 57 | ``` 58 | python bot.py 59 | ``` 60 | 61 | ## Linux 62 | 63 | 1. Make sure you computer was installed python and git. 64 | 65 | python 66 | ```shell 67 | sudo apt install python3 python3-pip 68 | ``` 69 | git 70 | ```shell 71 | sudo apt install git 72 | ``` 73 | 74 | 2. Clone this repository 75 | 76 | ```shell 77 | git clone https://github.com/akasakaid/dormintod.git 78 | ``` 79 | 80 | 3. goto dormintod directory 81 | 82 | ```shell 83 | cd dormintod 84 | ``` 85 | 86 | 4. Install the require library 87 | 88 | ``` 89 | python3 -m pip install -r requirements.txt 90 | ``` 91 | 92 | 5. Edit `data.txt`, input you data token in `data.txt`, find you token in [How to Find Account Token](#how-to-find-account-token). One line for one data account, if you want add you second account add in new line! 93 | 94 | 6. execute the main program 95 | ``` 96 | python bot.py 97 | ``` 98 | 99 | ## Termux 100 | 101 | 1. Make sure you termux was installed python and git. 102 | 103 | python 104 | ``` 105 | pkg install python 106 | ``` 107 | 108 | git 109 | ``` 110 | pkg install git 111 | ``` 112 | 113 | 2. Clone this repository 114 | ```shell 115 | git clone https://github.com/akasakaid/dormintod.git 116 | ``` 117 | 118 | 3. goto dormintod directory 119 | ``` 120 | cd dormintod 121 | ``` 122 | 123 | 4. install the require library 124 | ``` 125 | python -m pip install -r requirements.txt 126 | ``` 127 | 128 | 5. Edit `data.txt`, input you data token in `data.txt`, find you token in [How to Find Account Token](#how-to-find-account-token). One line for one data account, if you want add you second account add in new line! 129 | 130 | 6. execute the main program 131 | ``` 132 | python bot.py 133 | ``` 134 | 135 | # How to Find Account Token 136 | 137 | How to find you account token 138 | 139 | 1. Active dev tool first [https://youtu.be/NYxHmck_GjE](https://youtu.be/NYxHmck_GjE) 140 | 2. Open bot and open dev tool 141 | 3. Go to network tab 142 | 4. Select `Fetch/XHR` for type (below filter box) 143 | 5. Choose one of visible urls (`info`,`status`,`or etc`) 144 | 6. Click and switch to payload tab 145 | 7. Copy token in auth_token value on payload tab, example token: 146 | 147 | Payload tab content : 148 | 149 | ``` 150 | {"auth_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjAyMzgxMTksInRnX2lkIjoiNjI5NDM4MDc2In0.SE6QqkY18-mGBEkzwnXq2-kZJSgZ8hE4qB8A3Fmemek"} 151 | ``` 152 | 153 | Copy into like example in below and paste on `data.txt` 154 | 155 | ``` 156 | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjAyMzgxMTksInRnX2lkIjoiNjI5NDM4MDc2In0.SE6QqkY18-mGBEkzwnXq2-kZJSgZ8hE4qB8A3Fmemek 157 | ``` 158 | 159 | # Discussion 160 | 161 | If you have an question or something you can ask in here : [@sdsproject_chat](https://t.me/sdsproject_chat) 162 | 163 | # Support 164 | 165 | To support me you can buy me a coffee via website in below 166 | 167 | - Send IDR directly via QRIS : [https://s.id/nusanqr](https://s.id/nusanqr) 168 | - https://trakteer.id/fawwazthoerif/tip 169 | - https://sociabuzz.com/fawwazthoerif/tribe 170 | 171 | # Thank you < 3 -------------------------------------------------------------------------------- /bot.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import json 4 | import time 5 | import requests 6 | from datetime import datetime 7 | from colorama import Fore, Style, init 8 | 9 | init(autoreset=True) 10 | merah = Fore.LIGHTRED_EX 11 | kuning = Fore.LIGHTYELLOW_EX 12 | hijau = Fore.LIGHTGREEN_EX 13 | biru = Fore.LIGHTBLUE_EX 14 | putih = Fore.LIGHTWHITE_EX 15 | hitam = Fore.LIGHTBLACK_EX 16 | reset = Style.RESET_ALL 17 | 18 | 19 | class Dormintod: 20 | def __init__(self): 21 | self.base_headers = { 22 | "host": "api.dormint.io", 23 | "connection": "keep-alive", 24 | "accept": "application/json, text/plain, */*", 25 | "user-agent": "Mozilla/5.0 (Linux; Android 10; Redmi 4A / 5A Build/QQ3A.200805.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.185 Mobile Safari/537.36", 26 | "content-type": "application/json", 27 | "origin": "https://web.dormint.io", 28 | "x-requested-with": "tw.nekomimi.nekogram", 29 | "sec-fetch-site": "same-site", 30 | "sec-fetch-mode": "cors", 31 | "sec-fetch-dest": "empty", 32 | "referer": "https://web.dormint.io/", 33 | "accept-language": "en,en-US;q=0.9", 34 | } 35 | self.line = putih + "~" * 50 36 | 37 | def load_data(self): 38 | datas = open("data.txt", "r").read().splitlines() 39 | self.log(f"{hijau}total account : {putih}{len(datas)}") 40 | if len(datas) <= 0: 41 | self.log(f"input you token account in data.txt first !") 42 | sys.exit() 43 | 44 | return datas 45 | 46 | def start_farming(self, token): 47 | url = "https://api.dormint.io/tg/farming/start" 48 | headers = self.base_headers.copy() 49 | data = json.dumps({"auth_token": token}) 50 | res = self.http(url, headers, data) 51 | if "ok" in res.text.lower(): 52 | self.log(f"{hijau}start farming successfully !") 53 | return True 54 | 55 | self.log(f"{merah}start farming failure !") 56 | return False 57 | 58 | def claim_farming(self, token): 59 | url = "https://api.dormint.io/tg/farming/claimed" 60 | data = json.dumps({"auth_token": token}) 61 | headers = self.base_headers.copy() 62 | res = self.http(url, headers, data) 63 | if "ok" in res.text.lower(): 64 | self.log(f"{hijau}claim farming successfully !") 65 | return True 66 | 67 | self.log(f"{merah}claim farming failure !") 68 | return False 69 | 70 | def status_farming(self, token): 71 | url = "https://api.dormint.io/tg/farming/status" 72 | headers = self.base_headers.copy() 73 | data = json.dumps({"auth_token": token}) 74 | while True: 75 | res = self.http(url, headers, data) 76 | farming_status = res.json()["farming_status"] 77 | farming_left = res.json()["farming_left"] 78 | if farming_status == "farming_status_not_started": 79 | self.log(f"{kuning}farming not started !") 80 | result = self.start_farming(token) 81 | continue 82 | 83 | if farming_status == "farming_status_started": 84 | self.log(f"{putih}farming is started !") 85 | farming_amount = res.json()["farming_value"] 86 | self.log(f"{hijau}farming balance : {putih}{farming_amount}") 87 | self.log(f'{putih}next claim in : {hijau}{self.secto(round(farming_left))}') 88 | return round(farming_left) + 5 89 | 90 | if farming_status == "farming_status_finished": 91 | self.log(f"{hijau}farming is finished !") 92 | result = self.claim_farming(token) 93 | continue 94 | 95 | def user_info(self, token): 96 | url = "https://api.dormint.io/user/info" 97 | headers = self.base_headers.copy() 98 | data = json.dumps({"auth_token": token}) 99 | res = self.http(url, headers, data) 100 | if '"ok"' not in res.text.lower(): 101 | self.log(f"{merah}something wrong !, check http log for more information !") 102 | return False 103 | 104 | balance = res.json()["sleepcoin_balance"] 105 | self.log(f"{hijau}balance : {putih}{balance}") 106 | 107 | def main(self): 108 | banner = f""" 109 | {hijau}Auto Claim {biru}Dormint {hijau}/ {biru}sleepcoin {hijau}on Telegram 110 | 111 | {hijau}By: {putih}t.me/AkasakaID 112 | {hijau}Github: {putih}@AkasakaID 113 | 114 | {hijau}Message: {putih}dont't forget to 'git pull' maybe i update the repo ! 115 | """ 116 | arg = sys.argv 117 | if "marinkitagawa" not in arg: 118 | os.system("cls" if os.name == "nt" else "clear") 119 | print(banner) 120 | 121 | accounts = self.load_data() 122 | print(self.line) 123 | while True: 124 | list_countdown = [] 125 | _start = int(time.time()) 126 | for no,account in enumerate(accounts): 127 | self.log(f'{hijau}account number : {putih}{no + 1}{hijau}/{putih}{len(accounts)}') 128 | self.user_info(account) 129 | result = self.status_farming(account) 130 | list_countdown.append(result) 131 | print(self.line) 132 | 133 | _end = int(time.time()) 134 | _tot = _end - _start 135 | _min = min(list_countdown) - _tot 136 | if _min <= 0: 137 | continue 138 | 139 | self.countdown(_min) 140 | 141 | def secto(self,t): 142 | menit, detik = divmod(t, 60) 143 | jam, menit = divmod(menit, 60) 144 | jam = str(jam).zfill(2) 145 | menit = str(menit).zfill(2) 146 | detik = str(detik).zfill(2) 147 | return f"{jam}:{menit}:{detik}" 148 | 149 | def countdown(self, t): 150 | while t: 151 | menit, detik = divmod(t, 60) 152 | jam, menit = divmod(menit, 60) 153 | jam = str(jam).zfill(2) 154 | menit = str(menit).zfill(2) 155 | detik = str(detik).zfill(2) 156 | print(f"waiting until {jam}:{menit}:{detik} ", flush=True, end="\r") 157 | t -= 1 158 | time.sleep(1) 159 | print(" ", flush=True, end="\r") 160 | 161 | def log(self, msg): 162 | now = datetime.now().isoformat(" ").split(".")[0] 163 | print(f"{hitam}[{now}] {reset}{msg}") 164 | 165 | def http(self, url, headers, data=None): 166 | while True: 167 | try: 168 | if data is None: 169 | res = requests.get(url, headers=headers) 170 | open("http.log", "a", encoding="utf-8").write(f"{res.text}\n") 171 | if "" in res.text: 172 | self.log("failed get json response !") 173 | time.sleep(2) 174 | continue 175 | 176 | return res 177 | 178 | if data == "": 179 | res = requests.post(url, headers=headers) 180 | open("http.log", "a", encoding="utf-8").write(f"{res.text}\n") 181 | if "" in res.text: 182 | self.log(f"failed get json response !") 183 | time.sleep(2) 184 | continue 185 | 186 | return res 187 | 188 | res = requests.post(url, headers=headers, data=data) 189 | open("http.log", "a", encoding="utf-8").write(f"{res.text}\n") 190 | if "" in res.text: 191 | self.log(f"failed get json response !") 192 | time.sleep(2) 193 | continue 194 | 195 | return res 196 | 197 | except (requests.exceptions.Timeout, requests.exceptions.ConnectionError): 198 | self.log("connection timeout / connection error !") 199 | continue 200 | 201 | 202 | if __name__ == "__main__": 203 | try: 204 | app = Dormintod() 205 | app.main() 206 | except KeyboardInterrupt: 207 | sys.exit() 208 | --------------------------------------------------------------------------------