-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_setup.py
52 lines (47 loc) · 1.45 KB
/
config_setup.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
import json
import yaml
def create_targets_json():
targets = {
"targets": [
{
"name": "Default Target 1",
"ip": "192.168.1.100",
"port": 80,
"attack_mode": "SYN Flood"
},
{
"name": "Default Target 2",
"url": "http://example.com",
"attack_mode": "HTTP DDoS"
}
]
}
with open('config/targets.json', 'w') as f:
json.dump(targets, f, indent=4)
def create_attack_config_yaml():
config = {
"attack_settings": {
"default_ports": [80, 443],
"default_thread_count": 100,
"attack_modes": ["Automatic", "SYN Flood", "HTTP DDoS", "Stealth Probe", "Custom Exploit"],
"logging": {
"enabled": True,
"log_file": "attack_log.txt",
"log_level": "INFO"
}
},
"network_settings": {
"max_bandwidth_usage": "100MBps",
"packet_interval": 0.1
},
"gui_settings": {
"appearance_mode": "System",
"theme": "dark-blue"
}
}
with open('config/attack_config.yaml', 'w') as f:
yaml.dump(config, f)
if __name__ == "__main__":
create_targets_json()
create_attack_config_yaml()
print("Configuration files have been set up.")