Skip to content

CMS Detection Module (48) crashes after first run and mishandles errors #37

@ahaseeb99

Description

@ahaseeb99

Summary:::
The CMS Detection module (Module 48) in Argus consistently crashes or enters an unstable state after one execution. It also fails to handle HTTP errors gracefully.

After one successful run, subsequent executions often result in unhandled exceptions (NoneType errors), or partial execution.

Environment:::
OS: Windows 11 Pro - 64-bit operating system, x64-based processor
Processor: 13th Gen Intel(R) Core(TM) i5-13420H (2.10 GHz)
RAM: 24.0 GB (23.7 GB usable)
Shell (Command Prompt): Argus interactive CLI
Argus Path: C:\Users\QT\Desktop\Argus\argus
Module: 48 - CMS Detection
Threads Tested: 1, 10, 10000
Python: Python 3.11.9

Steps to Reproduce:::

1 - Launch Argus > Select the CMS Detection module: use 48
2 - Set a target with protocol:
- set target https://www.kwsc.gos.pk
- set threads 10
- run
3 - Observe CMS detection output (WordPress detected)
4 - Change target and run again:
- set target https://probdone.com
- run
5 - Observe crash with unhandled exception:
- AttributeError: 'NoneType' object has no attribute 'status_code'
6 - Repeat with other domains (with or without protocol):
- https://brainflaretechnologies.net
- brainflaretechnologies.net

Expected Behavior:::

Module should:
- Handle HTTP errors (406, 502, etc.) without crashing
- Never reference response.status_code if response is None
- Sanitize target URLs before using them as directory names
- Remain reusable across multiple runs in the same session

Actual Behavior:::
- Module crashes on HTTP errors due to missing None checks
- Report generation fails on Windows due to invalid path characters (https:)
- After one run, module often becomes unstable
- Partial execution may still generate a report despite fatal errors

Error Logs / Tracebacks:::
- AttributeError: 'NoneType' object has no attribute 'status_code'
File "argus\modules\cms_detection.py", line 160, in enumerate_cms
- Error generating report: [WinError 123]
...results\https:

Additional Notes / Suggestions:::
- Sanitize targets before using them in file paths (e.g., strip http://, https://, replace : and /)
- Guard against None responses before accessing attributes
- Consider retry logic or clearer user-facing error messages
- Reset module state after execution to allow reuse

Checklist:::
- Checked existing issues
- Included reproduction steps
- Included environment details
- Included full error logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions