-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgenerate-catalog.py
More file actions
192 lines (152 loc) Β· 5.85 KB
/
generate-catalog.py
File metadata and controls
192 lines (152 loc) Β· 5.85 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
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
#!/usr/bin/env python3
"""
Generate comprehensive module catalog for enhanced NullSec framework
NullSec Framework - Module Catalog Generator v1.0
https://github.com/bad-antics/nullsec
Generates markdown documentation for all security modules
"""
__version__ = "1.0"
__author__ = "bad-antics"
import json
from pathlib import Path
from collections import defaultdict
MODULES_DIR = Path.home() / "nullsec" / "nullsecurity"
def generate_catalog():
"""Generate markdown catalog of all enhanced modules"""
modules_by_category = defaultdict(list)
# Load all JSON configs
for json_file in sorted(MODULES_DIR.glob("*.json")):
try:
with open(json_file, 'r') as f:
config = json.load(f)
category = config.get('category', 'generic')
modules_by_category[category].append({
'name': config.get('name', json_file.stem),
'description': config.get('description', 'No description'),
'file': json_file.stem,
'params': len(config.get('parameters', []))
})
except:
continue
# Generate markdown
catalog = """# π― NullSec Enhanced Module Catalog
**Total Enhanced Modules:** {total}
**Categories:** {categories}
**All modules feature:** Interactive parameters, automatic logging, vulnerability tracking
---
""".format(
total=sum(len(mods) for mods in modules_by_category.values()),
categories=len(modules_by_category)
)
# Category icons
category_icons = {
'network': 'π',
'web': 'πΈοΈ',
'wireless': 'π‘',
'password': 'π',
'exploit': 'π₯',
'enum': 'π',
'social': 'π',
'database': 'πΎ',
'mobile': 'π±',
'iot': 'π',
'generic': 'βοΈ'
}
# Category descriptions
category_desc = {
'network': 'Network scanning, pivoting, and infrastructure attacks',
'web': 'Web application testing and exploitation',
'wireless': 'WiFi, Bluetooth, RFID, NFC, and wireless attacks',
'password': 'Password cracking, hash attacks, and credential stuffing',
'exploit': 'Exploitation frameworks and vulnerability exploitation',
'enum': 'Reconnaissance and information gathering',
'social': 'Social engineering and phishing attacks',
'database': 'Database exploitation and data exfiltration',
'mobile': 'Android and iOS mobile application security',
'iot': 'IoT, SCADA, ICS, and embedded device attacks',
'generic': 'General purpose security tools'
}
# Sort categories
for category in sorted(modules_by_category.keys()):
modules = modules_by_category[category]
icon = category_icons.get(category, 'βοΈ')
desc = category_desc.get(category, 'Security testing tools')
catalog += f"## {icon} {category.title()} ({len(modules)} modules)\n\n"
catalog += f"*{desc}*\n\n"
catalog += "| Module | Description | Parameters |\n"
catalog += "|--------|-------------|------------|\n"
for mod in sorted(modules, key=lambda x: x['name']):
name = mod['name']
desc = mod['description'][:80] + ('...' if len(mod['description']) > 80 else '')
params = mod['params']
catalog += f"| **{name}** | {desc} | {params} |\n"
catalog += "\n"
# Usage section
catalog += """---
## π Usage
### From CLI Launcher
```bash
cd ~/nullsec
./nullsec-launcher.py
# Navigate to any module - automatically uses enhanced framework!
```
### From Desktop GUI
```bash
cd ~/nullsec
python3 nullsec-launcher.py # Or use desktop icon
# All modules now have interactive parameter collection
```
### Direct Execution
```bash
cd ~/nullsec
python3 module-framework.py nullsecurity/<module>.sh nullsecurity/<module>.json
```
## π Features
Every enhanced module includes:
- β
**Rich Interactive Parameters** - Smart prompts with validation
- β
**Automatic Logging** - All actions logged to `~/nullsec/logs/targets/[target]/`
- β
**Organized Output** - Subdirectories for scans/, exploits/, credentials/, screenshots/
- β
**Vulnerability Tracking** - Auto-detection with severity levels
- β
**Summary Reports** - SUMMARY.md with findings and next steps
- β
**Beautiful UI** - Color-coded, formatted output
- β
**Default Values** - Suggested defaults for faster workflow
- β
**Help Text** - Descriptions and examples for every parameter
## π Log Structure
```
~/nullsec/logs/targets/
βββ 192.168.1.100/
β βββ SUMMARY.md
β βββ port-scanner_20260114_153045.log
β βββ scans/
β βββ exploits/
β βββ credentials/
β βββ screenshots/
βββ example.com/
βββ SUMMARY.md
βββ xss-attack_20260114_154230.log
```
## π― Parameter Types
Modules use intelligent parameter types:
- **IP Address** - Validates IPv4/IPv6 addresses
- **Port** - Validates port numbers (1-65535)
- **URL** - Validates web URLs
- **Domain** - Validates domain names
- **File** - Validates file existence
- **Choice** - Numbered menu selection
- **Boolean** - Yes/No toggle
- **String** - Free text input
## π Documentation
- **MODULE_DEVELOPMENT_GUIDE.md** - Developer guide for creating modules
- **ENHANCED_FRAMEWORK_GUIDE.md** - User guide for the framework
- **MODULE_ENHANCEMENTS_SUMMARY.md** - Overview of enhancements
---
**All 185+ modules are now enhanced and ready for professional penetration testing!**
"""
return catalog
if __name__ == "__main__":
catalog = generate_catalog()
output_file = Path.home() / "nullsec" / "ENHANCED_MODULES_CATALOG.md"
with open(output_file, 'w') as f:
f.write(catalog)
print(f"β
Catalog generated: {output_file}")
print(f"π {len(catalog)} bytes written")