From ec3399f4f950de1d25372d87f2d25ddb3953ba6d Mon Sep 17 00:00:00 2001 From: cyberviser Date: Fri, 20 Feb 2026 18:16:31 -0600 Subject: [PATCH 01/11] Add GitHub Actions workflow for Python application This workflow installs Python dependencies, runs linting with flake8, and executes tests using pytest for the Python application. --- .github/workflows/python-app.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..1168bd9 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest From 8d04db2f4d6a1b3c33956d5d1a945238f8a2a39f Mon Sep 17 00:00:00 2001 From: cyberviser Date: Fri, 20 Feb 2026 18:35:16 -0600 Subject: [PATCH 02/11] Update .github/workflows/python-app.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1168bd9..ef0ba70 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies From d4bea2a90dbc3b23759ac2873dfa68f296114800 Mon Sep 17 00:00:00 2001 From: CyberViser Date: Sat, 21 Feb 2026 13:50:51 -0600 Subject: [PATCH 03/11] feat: full project structure, proprietary license, README, CI - LICENSE: replaced MIT with CyberViser Proprietary License - README.md: full docs with usage, features, ecosystem links - terminal_pressure.py: copyright header added - requirements.txt: pinned versions - .github/workflows/ci.yml: lint matrix (Python 3.10/3.11/3.12) - .github/ISSUE_TEMPLATE/bug_report.yml: structured bug report Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.yml | 30 +++++++++++++ .github/workflows/ci.yml | 34 ++++++++++++++ LICENSE | 60 ++++++++++++++++++++++++- README.md | 64 +++++++++++++++++++++++++++ requirements.txt | 5 ++- terminal_pressure.py | 3 ++ 6 files changed, 192 insertions(+), 4 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/workflows/ci.yml create mode 100644 README.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..f5050c9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,30 @@ +name: Bug Report +description: Report a bug in TerminalPressure +title: "[Bug]: " +labels: ["bug"] +body: + - type: dropdown + id: command + attributes: + label: Which command? + options: [scan, stress, exploit, other] + validations: + required: true + - type: textarea + id: description + attributes: + label: Bug Description + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + validations: + required: true + - type: textarea + id: env + attributes: + label: Environment (OS, Python version, nmap version) + validations: + required: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e75327f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + name: Lint (Python ${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + + - name: Install dev deps + run: pip install flake8 + + - name: Lint + run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=__pycache__ + + - name: Check for unauthorized use warnings + run: | + grep -n "FOR AUTHORIZED" terminal_pressure.py && echo "✓ Auth warning present" || \ + (echo "::warning::Authorization notice missing from source" && exit 0) diff --git a/LICENSE b/LICENSE index e67242d..2de1fb1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,62 @@ -MIT License +CyberViser Proprietary License +Copyright (c) 2025 CyberViser. All Rights Reserved. + +IMPORTANT — READ CAREFULLY BEFORE USING THIS SOFTWARE. + +By accessing, downloading, cloning, forking, contributing to, or otherwise +using this repository or any part of its contents (the "Software"), you agree +to be bound by the terms of this license. If you do not agree, do not use the +Software. + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +1. OWNERSHIP + + CyberViser retains sole and exclusive ownership of all intellectual property + rights, title, and interest in and to the Software, including all source + code, documentation, and any derivative works. No ownership rights are + transferred to you under this license. + +2. PERMITTED USES (Non-Commercial Only) + + a) View and study the source code for personal or educational purposes only; + b) Run the Software locally for authorized, non-commercial security testing + on systems you own or have explicit written permission to test; + c) Submit contributions assigned irrevocably to CyberViser. + +3. RESTRICTIONS — YOU MAY NOT: + + a) Use the Software for any commercial purpose without a written license; + b) Redistribute, publish, sublicense, sell, or transfer the Software; + c) Build competing products or services using this Software; + d) Remove or alter CyberViser copyright notices or branding; + e) Use the Software against any system without explicit authorization. + +4. AUTHORIZED USE ONLY + + This tool is intended STRICTLY for authorized penetration testing and + security research. Use against systems without written authorization is + illegal and prohibited. CyberViser assumes no liability for unauthorized use. + +5. COMMERCIAL LICENSING + + Contact: contact@cyberviser.ai + +6. NO WARRANTY + + THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. + +7. LIMITATION OF LIABILITY + + CYBERVISER SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING FROM USE OR MISUSE. + +8. TERMINATION + + This license terminates immediately upon breach of any term herein. + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +© 2025 CyberViser. All Rights Reserved. -Copyright (c) 2025 Terminal-Pressure Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md new file mode 100644 index 0000000..7761424 --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# 💥 TerminalPressure — CyberViser Pentest Toolkit + +
+ +![TerminalPressure](https://img.shields.io/badge/CyberViser-TerminalPressure-ff3366?style=for-the-badge&logo=hackthebox&logoColor=white) + +[![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE) +[![Python](https://img.shields.io/badge/Python-3.10%2B-blue?logo=python)](https://python.org) +[![Part of](https://img.shields.io/badge/Part%20of-Hancock%20Platform-00ff88)](https://github.com/cyberviser/Hancock) + +**Authorized penetration testing toolkit — vulnerability scanning, stress testing, and exploit chain simulation.** + +> ⚠️ **FOR AUTHORIZED USE ONLY.** Use only on systems you own or have explicit written permission to test. Unauthorized use is illegal. + +
+ +--- + +## 🔧 Features + +| Command | Description | +|---------|-------------| +| `scan` | nmap vulnerability scan (ports 1–1024, `-sV --script vuln`) | +| `stress` | Multi-threaded connection stress test (authorized load testing) | +| `exploit` | Exploit chain simulation framework | + +--- + +## ⚡ Quick Start + +```bash +git clone https://github.com/cyberviser/TerminalPressure.git +cd TerminalPressure +pip install -r requirements.txt + +# Vulnerability scan (authorized targets only) +python terminal_pressure.py scan 192.168.1.1 + +# Stress test +python terminal_pressure.py stress 192.168.1.1 --port 80 --threads 50 --duration 60 + +# Exploit chain simulation +python terminal_pressure.py exploit 192.168.1.1 --payload default_backdoor +``` + +> Requires `nmap` installed on your system: `sudo apt install nmap` + +--- + +## 🛡️ Part of the CyberViser Ecosystem + +TerminalPressure is a standalone toolkit that integrates with the **Hancock AI agent** for AI-assisted pentest workflows. + +→ [**Hancock — AI Security Agent**](https://github.com/cyberviser/Hancock) +→ [**CyberViser Platform**](https://cyberviser.github.io/Hancock/) + +--- + +## 📄 License + +**CyberViser Proprietary License** — see [LICENSE](LICENSE). +Commercial use requires a written agreement: contact@cyberviser.ai + +© 2025 CyberViser. All Rights Reserved. diff --git a/requirements.txt b/requirements.txt index 761b2c3..3cb84f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -python-nmap -scapy +python-nmap>=0.7.1 +scapy>=2.5.0 +requests>=2.32.0 diff --git a/terminal_pressure.py b/terminal_pressure.py index b064653..6a4512e 100644 --- a/terminal_pressure.py +++ b/terminal_pressure.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2025 CyberViser. All Rights Reserved. +# Licensed under the CyberViser Proprietary License — see LICENSE for details. +# FOR AUTHORIZED SECURITY TESTING ONLY. Unauthorized use is illegal and prohibited. import argparse import nmap # Requires pip install python-nmap (user installs) import socket From ff277b397dfc684c69dd3c7b15deb33ed4b8becd Mon Sep 17 00:00:00 2001 From: CyberViser Date: Sat, 21 Feb 2026 15:00:15 -0600 Subject: [PATCH 04/11] feat: landing page website for TerminalPressure - docs/index.html: dark hacker-themed landing page matching CyberViser brand (red accent vs Hancock green) Features: terminal demo, 6 feature cards, install guide, Hancock ecosystem CTA, authorized use warning banner Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/index.html | 225 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 docs/index.html diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..879ea15 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,225 @@ + + + + + + TerminalPressure — CyberViser Pentest Toolkit + + + + + + + + + + + + + +
+
⚠ AUTHORIZED USE ONLY — FOR PENTESTERS & RED TEAMS
+

TERMINAL
PRESSURE

+

Authorized penetration testing toolkit — vulnerability scanning, connection stress testing, and exploit chain simulation. Built for red teams by CyberViser.

+ +
+ +
+
+
+
+ terminalpressure — demo +
+
+
$ python terminal_pressure.py
+
╔══════════════════════════════════════╗
+
║ TerminalPressure — CyberViser ║
+
║ Authorized Pentest Toolkit v1.0 ║
+
╚══════════════════════════════════════╝
+
+
Commands: scan | stress | exploit | exit
+
+
tp> scan 192.168.1.1
+
[*] Starting nmap vuln scan on 192.168.1.1...
+
[+] Open: 22/tcp (OpenSSH 8.2) — No critical CVEs
+
[+] Open: 80/tcp (Apache 2.4.41) — CVE-2021-41773 detected!
+
[!] CRITICAL: Path traversal / RCE on Apache 2.4.41-2.4.42
+
+
tp> exploit CVE-2021-41773
+
[*] Loading exploit chain for CVE-2021-41773...
+
[+] Exploit simulation complete. Report generated: report_20260221.txt
+
+
+
+ +
+

// capabilities

+
+
+
🔍
+

Vulnerability Scanner

+

Automated nmap-based scanning across ports 1–1024 with service detection and CVE correlation. Outputs structured reports.

+ scan <target> +
+
+
💥
+

Stress Testing

+

Multi-threaded connection load testing for authorized resilience assessments. Configurable thread count and duration.

+ stress <target> <port> +
+
+
⛓️
+

Exploit Chain Sim

+

Simulate multi-stage exploit chains for authorized red team exercises. Documents attack paths without executing payloads.

+ exploit <cve-id> +
+
+
📋
+

Report Generation

+

Auto-generates timestamped plaintext reports after each scan or test run. Ready to drop into your pentest report.

+ output: report_YYYYMMDD.txt +
+
+
🤖
+

Hancock Integration

+

Pair with Hancock AI to get instant triage, CVE analysis, and PICERL playbooks for every finding TerminalPressure uncovers.

+ cyberviser.netlify.app +
+
+
🛡️
+

Proprietary License

+

CyberViser Proprietary License — permitted for authorized research and testing. Commercial use requires a license agreement.

+ cyberviser@proton.me +
+
+
+ +
+ ⚠️ This tool is for authorized security testing only. You must have explicit written permission to test any system. Unauthorized use is illegal under the CFAA and equivalent laws. CyberViser assumes no liability for misuse. +
+ +
+
+

// quick start

+
# Clone the repo
+git clone https://github.com/cyberviser/TerminalPressure.git
+cd TerminalPressure
+
+# Install dependencies
+pip install -r requirements.txt
+
+# Run (requires nmap installed)
+# Linux: sudo apt install nmap
+# macOS: brew install nmap
+python terminal_pressure.py
+
+# Commands inside the tool
+scan    <target_ip>           # vuln scan
+stress  <target_ip> <port>   # load test
+exploit <cve-id>             # exploit sim
+exit                          # quit
+
+
+ +
+

// part of the cyberviser platform

+

TerminalPressure handles the exploitation. Hancock handles the analysis — triage findings, generate CVE reports, write executive summaries, and build IR playbooks using AI.

+ Explore Hancock AI → +
+ + + + + From 0f20e9de868edd2b5ed17d466785b8988c29d826 Mon Sep 17 00:00:00 2001 From: kalibodo Date: Sun, 22 Feb 2026 09:30:21 -0600 Subject: [PATCH 05/11] fix: prevent resource exhaustion and socket leaks in stress test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- terminal_pressure.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/terminal_pressure.py b/terminal_pressure.py index 6a4512e..a510ecc 100644 --- a/terminal_pressure.py +++ b/terminal_pressure.py @@ -8,6 +8,8 @@ import requests from scapy.all import * # For packet crafting; pip install scapy import random +import concurrent.futures +import logging import threading import time @@ -32,16 +34,16 @@ def flood(): end_time = time.time() + duration while time.time() < end_time: try: - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.connect((target, port)) - s.send(b"GET / HTTP/1.1\r\nHost: " + target.encode() + b"\r\n\r\n") - s.close() - except: - pass + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + s.connect((target, port)) + s.send(b"GET / HTTP/1.1\r\nHost: " + target.encode() + b"\r\n\r\n") + except (socket.error, OSError) as e: + logging.debug("Connection error: %s", e) print(f"[+] Applying pressure to {target}:{port} with {threads} threads for {duration}s") - for _ in range(threads): - t = threading.Thread(target=flood) - t.start() + max_workers = min(threads, 100) + with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor: + futures = [executor.submit(flood) for _ in range(threads)] + concurrent.futures.wait(futures) def exploit_chain(target, payload="default_backdoor"): # Shadow module: Simulate exploit (real: inject shellcode) From 36fc5fa2d9431b3590466c9b45f1201380bdb114 Mon Sep 17 00:00:00 2001 From: CyberViser <262890853+cyberviser@users.noreply.github.com> Date: Thu, 16 Apr 2026 17:15:49 -0500 Subject: [PATCH 06/11] Add fork ownership notice --- FORK_NOTICE.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 FORK_NOTICE.md diff --git a/FORK_NOTICE.md b/FORK_NOTICE.md new file mode 100644 index 0000000..314422d --- /dev/null +++ b/FORK_NOTICE.md @@ -0,0 +1,22 @@ +# Fork Notice + +This repository is a fork of . + +The upstream project remains owned by its original authors and remains subject +to its original license and attribution terms. + +This fork is operated by Johnny Watters (0ai-Cyberviser) through the GitHub +accounts cyberviser, cyberviser-dotcom, and 0ai-Cyberviser. + +## Scope of claim + +Johnny Watters (0ai-Cyberviser) claims ownership only over any original, +fork-specific modifications, notices, metadata, branding adjustments, and other +new material added in this fork to the extent permitted by law. + +No claim is made here to exclusive ownership of the upstream codebase. + +## Contacts + +- 0ai@cyberviserai.com +- cyberviser@proton.me \ No newline at end of file From 469f22747c782178315a3ef9c988c1188a5692a2 Mon Sep 17 00:00:00 2001 From: Johnny Watters <262890853+cyberviser@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:06:10 -0500 Subject: [PATCH 07/11] Add security policy --- SECURITY.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..859a92f --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +This repository is a fork operated by Johnny Watters (`0ai-Cyberviser`) as part of the `0AI` company portfolio. Upstream licensing remains in force. + +If you discover a security vulnerability or a safety issue, do not open a public issue first. + +Report privately to: + +- 0ai@cyberviserai.com +- cyberviser@proton.me + +Please include: + +- affected repository +- impact summary +- reproduction details +- any suggested remediation + +If the issue belongs to upstream code or project governance, report upstream as well when appropriate. \ No newline at end of file From c8d74ca222f3922883aaba2077ae18d77c469b6b Mon Sep 17 00:00:00 2001 From: Johnny Watters <262890853+cyberviser@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:06:11 -0500 Subject: [PATCH 08/11] Add support policy --- SUPPORT.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 SUPPORT.md diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..04260b4 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,16 @@ +# Support + +This repository is a fork operated by Johnny Watters (`0ai-Cyberviser`) as part of the `0AI` company portfolio. Upstream licensing remains in force. + +For general support or portfolio contact: + +- 0ai@cyberviserai.com +- cyberviser@proton.me + +Public GitHub accounts in this portfolio: + +- `0ai-Cyberviser` +- `cyberviser` +- `cyberviser-dotcom` + +Use the repository issue tracker for public, non-sensitive questions when appropriate. \ No newline at end of file From c545f6392573bc75cb79ae61888c7db8f313fc4a Mon Sep 17 00:00:00 2001 From: Johnny Watters <262890853+cyberviser@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:06:12 -0500 Subject: [PATCH 09/11] Add codeowners --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..262fe22 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @cyberviser @0ai-Cyberviser \ No newline at end of file From 7bdeee02da3dcb66b34355b09f8037b50b3b5c8a Mon Sep 17 00:00:00 2001 From: Johnny Watters <262890853+cyberviser@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:06:13 -0500 Subject: [PATCH 10/11] Add issue contact routing --- .github/ISSUE_TEMPLATE/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..4d04707 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: 0AI Support + url: https://github.com/cyberviser/TerminalPressure/blob/main/SUPPORT.md + about: Portfolio support and owner contact for this repository. + - name: Private Security Reporting + url: https://github.com/cyberviser/TerminalPressure/blob/main/SECURITY.md + about: Report vulnerabilities and safety issues privately. \ No newline at end of file From 91140970a0685d5af54d0f22996421c6bc227435 Mon Sep 17 00:00:00 2001 From: CyberViser Date: Thu, 16 Apr 2026 22:45:41 -0500 Subject: [PATCH 11/11] Lazy-load optional TerminalPressure dependencies --- docs/index.html | 42 +++++++++++-------------- terminal_pressure.py | 54 ++++++++++++++++++++++----------- tests/test_terminal_pressure.py | 38 +++++++++++++++++++++++ 3 files changed, 91 insertions(+), 43 deletions(-) create mode 100644 tests/test_terminal_pressure.py diff --git a/docs/index.html b/docs/index.html index 879ea15..8ba2468 100644 --- a/docs/index.html +++ b/docs/index.html @@ -121,23 +121,15 @@

TERMINAL
PRESSURE

terminalpressure — demo
-
$ python terminal_pressure.py
-
╔══════════════════════════════════════╗
-
║ TerminalPressure — CyberViser ║
-
║ Authorized Pentest Toolkit v1.0 ║
-
╚══════════════════════════════════════╝
+
$ python terminal_pressure.py scan 192.168.1.1
+
[+] Pressuring target: 192.168.1.1
+
Host: 192.168.1.1
+
Port 22/tcp: open (ssh)
+
Port 80/tcp: open (http)
+
Vuln Script: http-vuln-cve2021-41773 - possible path traversal

-
Commands: scan | stress | exploit | exit
-
-
tp> scan 192.168.1.1
-
[*] Starting nmap vuln scan on 192.168.1.1...
-
[+] Open: 22/tcp (OpenSSH 8.2) — No critical CVEs
-
[+] Open: 80/tcp (Apache 2.4.41) — CVE-2021-41773 detected!
-
[!] CRITICAL: Path traversal / RCE on Apache 2.4.41-2.4.42
-
-
tp> exploit CVE-2021-41773
-
[*] Loading exploit chain for CVE-2021-41773...
-
[+] Exploit simulation complete. Report generated: report_20260221.txt
+
$ python terminal_pressure.py exploit 192.168.1.1 --payload default_backdoor
+
[+] Injecting backdoor sim on 192.168.1.1 - Codex tip: Replace with real rev-shell
@@ -155,13 +147,13 @@

Vulnerability Scanner

💥

Stress Testing

Multi-threaded connection load testing for authorized resilience assessments. Configurable thread count and duration.

- stress <target> <port> + stress <target> --port 80
⛓️

Exploit Chain Sim

Simulate multi-stage exploit chains for authorized red team exercises. Documents attack paths without executing payloads.

- exploit <cve-id> + exploit <target> --payload default_backdoor
📋
@@ -198,16 +190,16 @@

// quick start

# Install dependencies pip install -r requirements.txt -# Run (requires nmap installed) +# Run scans (requires nmap installed) # Linux: sudo apt install nmap # macOS: brew install nmap -python terminal_pressure.py +python terminal_pressure.py scan 192.168.1.1 + +# Stress test +python terminal_pressure.py stress 192.168.1.1 --port 80 --threads 50 --duration 60 -# Commands inside the tool -scan <target_ip> # vuln scan -stress <target_ip> <port> # load test -exploit <cve-id> # exploit sim -exit # quit +# Exploit simulation +python terminal_pressure.py exploit 192.168.1.1 --payload default_backdoor
diff --git a/terminal_pressure.py b/terminal_pressure.py index a510ecc..bd46de2 100644 --- a/terminal_pressure.py +++ b/terminal_pressure.py @@ -3,17 +3,32 @@ # Licensed under the CyberViser Proprietary License — see LICENSE for details. # FOR AUTHORIZED SECURITY TESTING ONLY. Unauthorized use is illegal and prohibited. import argparse -import nmap # Requires pip install python-nmap (user installs) -import socket -import requests -from scapy.all import * # For packet crafting; pip install scapy -import random import concurrent.futures +import importlib import logging -import threading +import socket import time +def _load_optional_dependency(module_name, package_name): + """Import command-specific dependencies only when the command is used.""" + try: + return importlib.import_module(module_name) + except ImportError as exc: + raise SystemExit( + f"Missing optional dependency '{package_name}'. " + f"Install it with `pip install {package_name}`." + ) from exc + + +def positive_int(value): + value = int(value) + if value <= 0: + raise argparse.ArgumentTypeError("must be a positive integer") + return value + + def scan_vulns(target): + nmap = _load_optional_dependency("nmap", "python-nmap") scanner = nmap.PortScanner() print(f"[+] Pressuring target: {target}") scanner.scan(target, '1-1024', '-sV --script vuln') @@ -50,38 +65,41 @@ def exploit_chain(target, payload="default_backdoor"): if payload == "default_backdoor": print(f"[+] Injecting backdoor sim on {target} - Codex tip: Replace with real rev-shell") # Placeholder: In prod, use metasploit embeds or custom C2 - pkt = IP(dst=target)/TCP(dport=4444, flags="S")/Raw(load="CHAOS_AWAKEN") - send(pkt, verbose=0) + scapy = _load_optional_dependency("scapy.all", "scapy") + pkt = scapy.IP(dst=target) / scapy.TCP(dport=4444, flags="S") / scapy.Raw(load=b"CHAOS_AWAKEN") + scapy.send(pkt, verbose=0) else: print(f"[+] Custom exploit chain: {payload}") -def main(): +def build_parser(): parser = argparse.ArgumentParser(description="Terminal Pressure: Cyber Tool for Pressure Testing") - subparsers = parser.add_subparsers(dest='command') + subparsers = parser.add_subparsers(dest='command', required=True) scan_parser = subparsers.add_parser('scan', help='Scan for vulnerabilities') scan_parser.add_argument('target', type=str, help='Target IP/hostname') stress_parser = subparsers.add_parser('stress', help='Stress test (DDoS sim)') stress_parser.add_argument('target', type=str, help='Target IP/hostname') - stress_parser.add_argument('--port', type=int, default=80, help='Port') - stress_parser.add_argument('--threads', type=int, default=50, help='Threads') - stress_parser.add_argument('--duration', type=int, default=60, help='Duration in seconds') + stress_parser.add_argument('--port', type=positive_int, default=80, help='Port') + stress_parser.add_argument('--threads', type=positive_int, default=50, help='Threads') + stress_parser.add_argument('--duration', type=positive_int, default=60, help='Duration in seconds') exploit_parser = subparsers.add_parser('exploit', help='Exploit chain (advanced)') exploit_parser.add_argument('target', type=str, help='Target IP/hostname') exploit_parser.add_argument('--payload', type=str, default='default_backdoor', help='Payload type') + return parser - args = parser.parse_args() +def main(argv=None): + parser = build_parser() + args = parser.parse_args(argv) if args.command == 'scan': scan_vulns(args.target) elif args.command == 'stress': stress_test(args.target, args.port, args.threads, args.duration) - elif args.command == 'exploit': - exploit_chain(args.target, args.payload) else: - parser.print_help() + exploit_chain(args.target, args.payload) + return 0 if __name__ == "__main__": - main() + raise SystemExit(main()) diff --git a/tests/test_terminal_pressure.py b/tests/test_terminal_pressure.py new file mode 100644 index 0000000..df998c5 --- /dev/null +++ b/tests/test_terminal_pressure.py @@ -0,0 +1,38 @@ +import unittest +from unittest.mock import patch + +import terminal_pressure + + +class TerminalPressureCliTests(unittest.TestCase): + def test_stress_command_does_not_import_optional_modules(self): + with patch("terminal_pressure._load_optional_dependency", side_effect=AssertionError("unexpected import")), \ + patch("terminal_pressure.stress_test") as stress_test: + result = terminal_pressure.main( + ["stress", "127.0.0.1", "--port", "8080", "--threads", "2", "--duration", "1"] + ) + + self.assertEqual(result, 0) + stress_test.assert_called_once_with("127.0.0.1", 8080, 2, 1) + + def test_scan_reports_missing_python_nmap_dependency(self): + with patch("terminal_pressure.importlib.import_module", side_effect=ImportError("missing")): + with self.assertRaises(SystemExit) as exc: + terminal_pressure.scan_vulns("127.0.0.1") + + self.assertIn("python-nmap", str(exc.exception)) + + def test_exploit_reports_missing_scapy_dependency(self): + with patch("terminal_pressure.importlib.import_module", side_effect=ImportError("missing")): + with self.assertRaises(SystemExit) as exc: + terminal_pressure.exploit_chain("127.0.0.1") + + self.assertIn("scapy", str(exc.exception)) + + def test_positive_int_parser_rejects_zero(self): + with self.assertRaises(SystemExit): + terminal_pressure.main(["stress", "127.0.0.1", "--threads", "0"]) + + +if __name__ == "__main__": + unittest.main()