Skip to content

Commit b40b106

Browse files
committed
.
1 parent 7e62b6b commit b40b106

File tree

10 files changed

+1386
-307
lines changed

10 files changed

+1386
-307
lines changed

README.md

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,18 @@ python3 discoursemap/scanner.py --help
145145
# Build Docker image
146146
docker build -t discoursemap .
147147

148-
# Run scanner with Docker
148+
# Run scanner with Docker (performance presets)
149149
docker run --rm -v $(pwd)/reports:/app/reports discoursemap \
150-
python3 main.py -u https://target-forum.com --modules info
150+
python3 main.py -u https://target-forum.com --fast
151151

152-
# Using Docker Compose
153-
docker-compose build
152+
# Using Docker Compose with environment variables
153+
export PERFORMANCE_MODE=fast
154+
export MAX_THREADS=50
154155
docker-compose run --rm discoursemap \
155-
python3 main.py -u https://target-forum.com --modules info,vuln
156+
python3 main.py -u https://target-forum.com --fast -m info vuln
157+
158+
# Start scanner services
159+
docker-compose up -d
156160

157161
# Interactive mode
158162
docker run -it --rm discoursemap bash
@@ -177,16 +181,39 @@ python3 -m pytest tests/
177181

178182
```bash
179183
# Basic security scan
180-
python3 discoursemap/scanner.py -u https://discourse.example.com
184+
python3 discoursemap/main.py -u https://discourse.example.com
181185

182186
# Scan with specific modules
183-
python3 discoursemap/scanner.py -u https://discourse.example.com -m info,vulnerability,auth
187+
python3 discoursemap/main.py -u https://discourse.example.com -m info vulnerability auth
184188

185-
# Aggressive scan with all modules
186-
python3 discoursemap/scanner.py -u https://discourse.example.com --aggressive
189+
# Quick scan (legacy mode)
190+
python3 discoursemap/main.py -u https://discourse.example.com --quick
187191

188192
# Scan with custom output
189-
python3 discoursemap/scanner.py -u https://discourse.example.com -o results.json
193+
python3 discoursemap/main.py -u https://discourse.example.com -o json -f results.json
194+
```
195+
196+
### 🚀 Performance Presets (NEW!)
197+
198+
```bash
199+
# Maximum Speed Preset (50 threads, 0.01s delay)
200+
python3 discoursemap/main.py -u https://discourse.example.com --fast
201+
202+
# Balanced Preset (20 threads, 0.05s delay) - Recommended
203+
python3 discoursemap/main.py -u https://discourse.example.com --balanced
204+
205+
# Safe Mode Preset (10 threads, 0.1s delay)
206+
python3 discoursemap/main.py -u https://discourse.example.com --safe
207+
208+
# Custom performance settings
209+
python3 discoursemap/main.py -u https://discourse.example.com -t 25 --delay 0.03
210+
211+
# Fast scan with specific modules
212+
python3 discoursemap/main.py -u https://discourse.example.com --fast -m info vuln endpoint
213+
214+
# Performance comparison
215+
time python3 discoursemap/main.py -u https://discourse.example.com --fast
216+
time python3 discoursemap/main.py -u https://discourse.example.com --safe
190217
```
191218

192219
### Advanced Options

discoursemap/main.py

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from discoursemap.modules.scanner import DiscourseScanner
2323
from discoursemap.modules.reporter import Reporter
2424
from discoursemap.modules.utils import validate_url
25-
from discoursemap.modules.banner import Banner
25+
from discoursemap.modules.banner import Banner
2626

2727
init(autoreset=False)
2828

@@ -107,6 +107,14 @@ def parse_arguments():
107107
parser.add_argument('-q', '--quick', action='store_true',
108108
help='Quick scan mode: Maximum speed with info, auth, api, vuln, waf_bypass modules')
109109

110+
# Performance presets (enhanced quick scan)
111+
parser.add_argument('--fast', action='store_true',
112+
help='Maximum speed preset (50 threads, 0.01s delay)')
113+
parser.add_argument('--balanced', action='store_true',
114+
help='Balanced preset (20 threads, 0.05s delay)')
115+
parser.add_argument('--safe', action='store_true',
116+
help='Safe preset (10 threads, 0.1s delay)')
117+
110118
# Module options
111119
parser.add_argument('-m', '--modules', nargs='+',
112120
choices=['info', 'vuln', 'endpoint', 'user', 'cve', 'plugin_detection', 'plugin_bruteforce',
@@ -329,18 +337,43 @@ def main():
329337
completed_modules, resume_data = load_resume_data(args.resume)
330338
print(f"{Fore.GREEN}[+] Found {len(completed_modules)} completed modules{Style.RESET_ALL}")
331339

332-
# Handle quick scan mode
333-
if args.quick:
334-
print(f"{Fore.CYAN}[*] Quick Scan Mode Activated - Maximum Speed Configuration{Style.RESET_ALL}")
335-
# Override settings for maximum speed
336-
args.threads = 30 # Maximum threads
337-
args.timeout = 5 # Faster timeout
338-
args.delay = 0.01 # Minimal delay
339-
args.quiet = True # Force quiet mode for speed
340-
# Set quick scan modules
340+
# Handle performance presets and quick scan mode
341+
preset_name = None
342+
performance_metrics = {}
343+
344+
if args.fast:
345+
preset_name = "Maximum Speed"
346+
args.threads = 50
347+
args.delay = 0.01
348+
args.timeout = 5
349+
args.quiet = True
350+
performance_metrics = {'threads': 50, 'delay': 0.01, 'timeout': 5}
351+
elif args.balanced:
352+
preset_name = "Balanced"
353+
args.threads = 20
354+
args.delay = 0.05
355+
args.timeout = 7
356+
performance_metrics = {'threads': 20, 'delay': 0.05, 'timeout': 7}
357+
elif args.safe:
358+
preset_name = "Safe Mode"
359+
args.threads = 10
360+
args.delay = 0.1
361+
args.timeout = 10
362+
performance_metrics = {'threads': 10, 'delay': 0.1, 'timeout': 10}
363+
elif args.quick:
364+
preset_name = "Quick Scan (Legacy)"
365+
args.threads = 30
366+
args.timeout = 5
367+
args.delay = 0.01
368+
args.quiet = True
341369
args.modules = ['info', 'auth', 'api', 'vuln', 'waf_bypass']
342-
print(f"{Fore.GREEN}[+] Quick scan modules: info, auth, api, vuln, waf_bypass{Style.RESET_ALL}")
343-
print(f"{Fore.GREEN}[+] Performance settings: 30 threads, 0.01s delay, 5s timeout{Style.RESET_ALL}")
370+
performance_metrics = {'threads': 30, 'delay': 0.01, 'timeout': 5}
371+
372+
if preset_name:
373+
print(f"{Fore.CYAN}[*] Performance Preset: {preset_name}{Style.RESET_ALL}")
374+
if args.quick:
375+
print(f"{Fore.GREEN}[+] Quick scan modules: info, auth, api, vuln, waf_bypass{Style.RESET_ALL}")
376+
print(f"{Fore.GREEN}[+] Performance settings: {performance_metrics['threads']} threads, {performance_metrics['delay']}s delay, {performance_metrics['timeout']}s timeout{Style.RESET_ALL}")
344377
print()
345378

346379
# Apply config defaults (only if not in quick mode)
@@ -398,7 +431,8 @@ def main():
398431
modules_to_run = config['modules']
399432
else:
400433
modules_to_run = ['info', 'vuln', 'endpoint', 'user', 'cve', 'plugin_detection', 'plugin_bruteforce',
401-
'api', 'auth', 'config', 'crypto', 'network', 'plugin', 'waf_bypass', 'compliance']
434+
'api', 'auth', 'config', 'crypto', 'network', 'plugin', 'waf_bypass', 'compliance',
435+
'backup_scanner', 'passive_scanner', 'file_integrity']
402436

403437
# Filter out completed modules if resuming
404438
if completed_modules:

0 commit comments

Comments
 (0)