|
22 | 22 | from discoursemap.modules.scanner import DiscourseScanner |
23 | 23 | from discoursemap.modules.reporter import Reporter |
24 | 24 | from discoursemap.modules.utils import validate_url |
25 | | -from discoursemap.modules.banner import Banner |
| 25 | + from discoursemap.modules.banner import Banner |
26 | 26 |
|
27 | 27 | init(autoreset=False) |
28 | 28 |
|
@@ -107,6 +107,14 @@ def parse_arguments(): |
107 | 107 | parser.add_argument('-q', '--quick', action='store_true', |
108 | 108 | help='Quick scan mode: Maximum speed with info, auth, api, vuln, waf_bypass modules') |
109 | 109 |
|
| 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 | + |
110 | 118 | # Module options |
111 | 119 | parser.add_argument('-m', '--modules', nargs='+', |
112 | 120 | choices=['info', 'vuln', 'endpoint', 'user', 'cve', 'plugin_detection', 'plugin_bruteforce', |
@@ -329,18 +337,43 @@ def main(): |
329 | 337 | completed_modules, resume_data = load_resume_data(args.resume) |
330 | 338 | print(f"{Fore.GREEN}[+] Found {len(completed_modules)} completed modules{Style.RESET_ALL}") |
331 | 339 |
|
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 |
341 | 369 | 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}") |
344 | 377 | print() |
345 | 378 |
|
346 | 379 | # Apply config defaults (only if not in quick mode) |
@@ -398,7 +431,8 @@ def main(): |
398 | 431 | modules_to_run = config['modules'] |
399 | 432 | else: |
400 | 433 | 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'] |
402 | 436 |
|
403 | 437 | # Filter out completed modules if resuming |
404 | 438 | if completed_modules: |
|
0 commit comments