Environment:AIPentest CyberStrikeAI Python 3 10 Plus
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Tooling |
| Last Updated | 2026-10-19 00:00 GMT |
Overview
Python 3.10+ runtime with a managed `venv/` providing HTTP helpers and exploitation libraries used by Python-based MCP tool recipes and external MCP servers.
Description
CyberStrikeAI's core server is written in Go, but a Python 3.10+ environment is required for the supporting tooling layer. `run.sh` validates `python3 >= 3.10`, creates a virtual environment at `./venv/`, and installs `requirements.txt` into it. Python-based tool recipes (e.g. `api-fuzzer`, `http-framework-test`, `dnslog`, `execute-python-script`, `install-python-package`) and the bundled MCP servers under `mcp-servers/` (e.g. `pent_claude_agent`, `reverse_shell`) invoke `python3` and rely on this venv for `requests`, `httpx`, `mcp`, and exploitation frameworks.
Usage
Use this environment for any workflow that runs Python-based pentest tool recipes or external MCP servers. It is the mandatory prerequisite for the runEinoADKAgentLoop implementation (which federates Python MCP servers via stdio) and for tool recipes that shell out to `python3`.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux / macOS / Windows | Linux recommended |
| Hardware | Minimal | Python tooling is lightweight; constrained by tool recipes |
| Disk | 200MB+ for venv + packages | Exploitation libraries (impacket, bloodhound) add weight |
| Software | Python >= 3.10 | run.sh enforces 3.10+ floor; `python3-venv` required to create venv |
Dependencies
System Packages
- `python3` >= 3.10
- `python3-venv` (Debian/Ubuntu; needed to create the venv)
- `python3-pip` (CentOS path)
Python Packages (from requirements.txt)
- `requests` >= 2.32.3
- `httpx[http2]` >= 0.27.0
- `charset-normalizer` >= 3.3.2
- `chardet` >= 5.2.0, < 6
- `arjun` >= 2.2.0
- `uro` >= 1.0.2
- `bloodhound` >= 1.6.1
- `impacket` >= 0.11.0
- `mcp` >= 1.0.0 (Model Context Protocol SDK)
Credentials
The Python environment itself needs no credentials, but tool recipes read API keys from the Go server's config or environment. Tools that call external intel services expect:
- `SHODAN_API_KEY` — Shodan search (tools/shodan_search.yaml)
- `FOFA_API_KEY` — FOFA search (tools/fofa_search.yaml)
- `ZOOMEYE_API_KEY` — ZoomEye search (tools/zoomeye_search.yaml)
- `QUAKE_API_KEY` — Quake search (tools/quake_search.yaml)
These are injected by the Go server at tool-invocation time, not stored in the venv.
Quick Install
# Ubuntu/Debian
sudo apt-get install python3 python3-venv python3-pip
# macOS
brew install python3
# Create venv and install dependencies (run.sh does this automatically)
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
# Verify
python3 --version # must be >= 3.10
Code Evidence
Python version check from `run.sh:96-117`:
check_python() {
if ! command -v python3 >/dev/null 2>&1; then
error "python3 not found"
info "Install Python 3.10 or later first:"
echo " macOS: brew install python3"
echo " Ubuntu: sudo apt-get install python3 python3-venv"
exit 1
fi
PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}')
PYTHON_MAJOR=$(echo "$PYTHON_VERSION" | cut -d. -f1)
PYTHON_MINOR=$(echo "$PYTHON_VERSION" | cut -d. -f2)
if [ "$PYTHON_MAJOR" -lt 3 ] || ([ "$PYTHON_MAJOR" -eq 3 ] && [ "$PYTHON_MINOR" -lt 10 ]); then
error "Python version too old: $PYTHON_VERSION (requires 3.10+)"
exit 1
fi
}
Venv creation from `run.sh:166-170`:
setup_python_env() {
info "Creating Python virtual environment..."
python3 -m venv "$VENV_DIR"
}
Dependencies from `requirements.txt:1-17`:
requests>=2.32.3
httpx[http2]>=0.27.0
charset-normalizer>=3.3.2
chardet>=5.2.0,<6
arjun>=2.2.0
uro>=1.0.2
bloodhound>=1.6.1
impacket>=0.11.0
mcp>=1.0.0
MCP server launch example from `web/static/i18n/en-US.json` (MCP stdio config shape):
"placeholder": "{\n \"my-server\": {\n \"command\": \"python3\",\n \"args\": [\"${HOME}/mcp/server.py\"],\n \"env\": { \"API_KEY\": \"${API_KEY}\" },\n \"timeout\": 300\n }}"
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `python3 not found` | Python not installed | Install via brew/apt/yum; see Quick Install |
| `Python version too old (requires 3.10+)` | Python < 3.10 | Upgrade to Python 3.10+ |
| `ensurepip` / venv creation fails | `python3-venv` not installed | `sudo apt-get install python3-venv` |
| `No module named 'mcp'` in an MCP server | venv not activated or requirements not installed | Re-run `pip install -r requirements.txt` inside `venv/` |
| pip download timeout | Cannot reach default PyPI mirror | `pip install --index-url <mirror> -r requirements.txt` |
Compatibility Notes
- venv location: `run.sh` creates `./venv/` at the repo root; `upgrade.sh` backs it up during self-update.
- Optional heavy deps: `angr` and `pwntools` are commented out in `requirements.txt` — install them manually only when binary-analysis tool recipes are needed.
- Windows: Python is supported but tool recipes are typically written for POSIX shells; use WSL2 on Windows.
- MCP servers: External Python MCP servers are launched as stdio subprocesses by the Go server; their `env` block is injected at launch, not from the venv.