-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dumper.py
256 lines (238 loc) · 12 KB
/
Dumper.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
import discord
from discord import Webhook, RequestsWebhookAdapter
import os, sys, time, ctypes
import urllib.request
from pystyle import Center, Anime, Colors, Colorate, System
from colorama import Fore, Back, Style
from requests import get
import random
import webbrowser
### COLORI E VAR ###
VERSIONETOOL = "0.1"
c = Fore.LIGHTCYAN_EX
g = Fore.LIGHTGREEN_EX
y = Fore.LIGHTYELLOW_EX
b = Fore.LIGHTBLUE_EX
w = Fore.LIGHTWHITE_EX
m = Fore.LIGHTMAGENTA_EX
r = Fore.LIGHTRED_EX
### SCHERMATA ###
def impostatitolo(_str):
system = os.name
if system == 'nt':
ctypes.windll.kernel32.SetConsoleTitleW(f"{_str} | github.com/itsmat")
elif system == 'posix':
sys.stdout.write(f"\x1b]0;{_str} | github.com/itsmat\x07")
else:
pass
def clear():
system = os.name
if system == 'nt':
os.system('cls')
elif system == 'posix':
os.system('clear')
else:
print('\n'*120)
return
def titolohome():
print(f"""\n\n{m}
▓█████ ███▄ ▄███▓ ▒█████ ▄▄▄██▀▀▀██▓ ▓█████▄ █ ██ ███▄ ▄███▓ ██▓███ ▓█████ ██▀███
▓█ ▀ ▓██▒▀█▀ ██▒▒██▒ ██▒ ▒██ ▓██▒ ▒██▀ ██▌ ██ ▓██▒▓██▒▀█▀ ██▒▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒
▒███ ▓██ ▓██░▒██░ ██▒ ░██ ▒██▒ ░██ █▌▓██ ▒██░▓██ ▓██░▓██░ ██▓▒▒███ ▓██ ░▄█ ▒
▒▓█ ▄ ▒██ ▒██ ▒██ ██░▓██▄██▓ ░██░ ░▓█▄ ▌▓▓█ ░██░▒██ ▒██ ▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄
░▒████▒▒██▒ ░██▒░ ████▓▒░ ▓███▒ ░██░ ░▒████▓ ▒▒█████▓ ▒██▒ ░██▒▒██▒ ░ ░░▒████▒░██▓ ▒██▒
░░ ▒░ ░░ ▒░ ░ ░░ ▒░▒░▒░ ▒▓▒▒░ ░▓ ▒▒▓ ▒ ░▒▓▒ ▒ ▒ ░ ▒░ ░ ░▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░
░ ░ ░░ ░ ░ ░ ▒ ▒░ ▒ ░▒░ ▒ ░ ░ ▒ ▒ ░░▒░ ░ ░ ░ ░ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░
░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ▒ ░ ░ ░ ░ ░░░ ░ ░ ░ ░ ░░ ░ ░░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░
\n{w}""")#.replace('█', f'{y}█{b}'))
banner = r"""
░█████╗░░█████╗░██████╗░██╗░█████╗░░█████╗░███╗░░░███╗███████╗███╗░░██╗████████╗░█████╗░
██╔══██╗██╔══██╗██╔══██╗██║██╔══██╗██╔══██╗████╗░████║██╔════╝████╗░██║╚══██╔══╝██╔══██╗
██║░░╚═╝███████║██████╔╝██║██║░░╚═╝███████║██╔████╔██║█████╗░░██╔██╗██║░░░██║░░░██║░░██║
██║░░██╗██╔══██║██╔══██╗██║██║░░██╗██╔══██║██║╚██╔╝██║██╔══╝░░██║╚████║░░░██║░░░██║░░██║
╚█████╔╝██║░░██║██║░░██║██║╚█████╔╝██║░░██║██║░╚═╝░██║███████╗██║░╚███║░░░██║░░░╚█████╔╝
░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░╚════╝░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚══════╝╚═╝░░╚══╝░░░╚═╝░░░░╚════╝░
"""[1:]
def transizione():
clear()
caricamento()
clear()
def caricamento():
carattere = ['|', '/', '-', '\\']
for i in carattere+carattere+carattere:
sys.stdout.write(f"""\r{y}[{b}#{y}]{w} Loading... {i}""")
sys.stdout.flush()
time.sleep(0.2)
global idserver
idserver = 'No servers set'
global token
token = 'No tokens set'
global tipodump
tipodump = 0
if not os.path.exists('Dumps'):
os.makedirs('Dumps')
client = discord.Client()
encoding = sys.stdout.encoding
def main():
global tipodump
global idserver
global token
impostatitolo(f"Mat Emoji Dumper {VERSIONETOOL} - Loading")
Anime.Fade(Center.Center(banner), Colors.green_to_red, Colorate.Vertical, time=1)
#System.Size(160, 40)
clear()
impostatitolo(f"Mat Emoji Dumper {VERSIONETOOL}")
titolohome()
print(f""" {y}[{b}+{y}]{g} Main: {y}[{b}+{y}]{c} Settings:
{y}[{w}1{y}]{g} Emoji dump a server {y}[{w}10{y}]{c} Enter server ID
{y}[{w}2{y}]{g} Emoji dump all servers {y}[{w}11{y}]{c} Enter client token
{y}[{w}3{y}]{g} Server Nuker
{m}Made by Mat#3616 | github.com/itsmat
{m}ID Server : {b}{idserver}
{m}Token : {b}{token}
\t\t\t\t\t\t\t\t\t\t\t\t\t""")
global scelta
scelta = input(f"""{y}[{b}#{y}]{w} : """)
if scelta == '1' or scelta == '01':
if token != 'No tokens set':
if idserver != 'No servers set':
try:
tipodump = 1
print('The dump will start as soon as you send/receive a message')
client.run(token)
except Exception as errore:
input(f"{y}[{Fore.LIGHTRED_EX }!{y}]{w} Error [{errore}]!")
main()
else:
input(f"{y}[{Fore.LIGHTRED_EX }!{y}]{w} Server ID is missing [tasto 10 nella home]!")
main()
else:
input(f"{y}[{Fore.LIGHTRED_EX }!{y}]{w} Missing token [tasto 11 nella home]!")
main()
if scelta == '2' or scelta == '02':
if token != 'No tokens set':
try:
tipodump = 2
print('The dump will start as soon as you send/recieve a message')
client.run(token)
except Exception as errore:
input(f"{y}[{Fore.LIGHTRED_EX }!{y}]{w} Error [{errore}]!")
main()
else:
input(f"{y}[{Fore.LIGHTRED_EX }!{y}]{w} Missing token [tasto 11 nella home]!")
main()
if scelta == '3' or scelta == '03':
webbrowser.open_new_tab("https://github.com/itsmat/DiscordNukerTool")
main()
elif scelta == '10' or scelta == '010':
transizione()
dioporco = input(f'''{y}[{b}#{y}]{w} Enter the server id: ''')
idserver = dioporco
main()
elif scelta == '11' or scelta == '011':
transizione()
diocane = input(f'''{y}[{b}#{y}]{w} Enter client-token: ''')
token = diocane
main()
elif scelta == 'dsc' or scelta == 'discord':
webbrowser.open_new_tab("https://discord.gg/CzynytAxfh")
main()
elif scelta == 'exit' or scelta == 'chiudi':
transizione()
sys.exit()
else:
clear()
main()
@client.event
async def on_message(message):
global tipodump
global idserver
dump = 0
if tipodump == 0:
pass
if tipodump == 1:
emojipng = 0
emojigif = 0
server = await client.fetch_guild(idserver)
numeroemoji = len(server.emojis)
print(F'{y}Server: {server.name} [{server.id}] - {b}{numeroemoji}{w}')
code = random.randint(0,9999)
cartella = 'Dumps\\' + f'c{code}' + '\\' + server.name.translate({ord(c): None for c in '/<:"\\|?+*:>'})
if numeroemoji > 0:
if not os.path.exists(cartella):
os.makedirs(cartella)
print(f'{b}Downloading the emojis...')
try:
if dump == 0:
for emoji in server.emojis:
if emoji.animated:
nomeemoji = cartella + '\\' + emoji.name + '.gif'
emojigif += 1
else:
nomeemoji = cartella + '\\' + emoji.name + '.png'
emojipng += 1
if not os.path.exists(nomeemoji):
with open (nomeemoji, 'wb') as file:
request = urllib.request.Request(emoji.url, headers={'User-Agent': 'Mozilla/5.0'})
finale = urllib.request.urlopen(request).read()
file.write(finale)
dump = 1
input(f'''{g}DUMP COMPLETED SUCCESFULLY.
{r}Server: {server.name}
Emoji Download: {emojipng}
Emoji Animated Download: {emojigif}
Path: {cartella}{w}''')
main()
else:
input('Error')
main()
except:
input('Error')
main()
if tipodump == 2:
servers = 0
emojipng = 0
emojigif = 0
code = random.randint(0,9999)
try:
for server in client.guilds:
servers += 1
numeroemoji = len(server.emojis)
print(F'{y}Server: {server.name} [{server.id}] - {b}{numeroemoji}{w}')
cartella = 'Dumps\\' + f'c{code}' + '\\' + server.name.translate({ord(c): None for c in '/<:"\\|?+*:>'})
if numeroemoji > 0:
if not os.path.exists(cartella):
os.makedirs(cartella)
print(f'{b}Downloading the emojis...')
try:
for emoji in server.emojis:
if emoji.animated:
nomeemoji = cartella + '\\' + emoji.name + '.gif'
emojigif += 1
else:
nomeemoji = cartella + '\\' + emoji.name + '.png'
emojipng += 1
if not os.path.exists(nomeemoji):
with open (nomeemoji, 'wb') as file:
request = urllib.request.Request(emoji.url, headers={'User-Agent': 'Mozilla/5.0'})
finale = urllib.request.urlopen(request).read()
file.write(finale)
except:
input('Error')
main()
try:
input(f'''{g}DUMP SUCCESSFULLY COMPLETED.
{r}Server: {servers}
Emoji Download: {emojipng}
Emoji Animated Download: {emojigif}
Path: {cartella}{w}''')
main()
except:
input('Error')
main()
except:
input('Error')
main()
main()