Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:7onez Cti expert Python Stdlib

From Leeroopedia
Knowledge Sources
Domains OSINT, Infrastructure
Last Updated 2026-10-28 14:00 GMT

Overview

Python 3.10+ standard-library environment with zero required third-party packages — the base layer for nearly every cti-expert collector, KB, and pipeline tool.

Description

This environment provides a standard CPU-based Python context using only the Python 3 standard library. The collection layer (WebPivot tools, scripts/), the KB/correlation/case tools (tools/kb/*, tools/*.py, the deterministic pipeline tools/intel.py), and BinaryPivot's core all run with no installs. Optional accelerators (requests, brotli, psycopg) unlock faster paths or silent-degrade fallbacks, but their absence never causes a failure — every optional import is guarded by a try/except that falls back to a stdlib equivalent (urllib for requests, undecodable-skip for brotli, status-note-skip for psycopg).

Usage

Use this environment for any collection, KB ingestion, clustering, timeline rendering (network HTML), binary static analysis, stealer-log parsing, MISP export building, or email permutation task. It is the mandatory prerequisite for every implementation that does not explicitly require a richer stack (Claude Agent SDK, Pydantic, Matplotlib, Pandoc, Pele, or a metered API).

System Requirements

Category Requirement Notes
OS Linux / macOS / WSL2 Kernel 5.x+ recommended
Hardware Any CPU 2GB RAM minimum; 4GB for large-cluster KB ops
Disk 1GB SSD Case data stored in git-ignored cases/

Dependencies

System Packages

  • `python3` >= 3.10 (uses `from __future__ import annotations`, `match` syntax in some modules)
  • `git` (for skill symlinking and hook installation)
  • `keytool` (optional — APK signing-cert SHA-256, ships with any JDK)
  • `openssl` (optional — signing-cert fallback for BinaryPivot)
  • `file` (optional — file-type identification for BinaryPivot)
  • `strings` (optional — faster string sweep; pure-Python fallback exists)

Python Packages

None required. The following are optional accelerators:

  • `requests` (optional — faster/robust fetching; falls back to urllib)
  • `brotli` (optional — decode Wayback id_ captures with Content-Encoding: br; absent = reported undecodable and retried)
  • `psycopg[binary]` >= 3.1 (optional — crt.sh PostgreSQL fallback in wp_ct; absent = skipped with status note)
  • `openpyxl` >= 3.1 (optional — .xlsx master evidence ledger; falls back to CSV)

Credentials

No credentials required for the stdlib-only path. Optional API keys (stored in git-ignored `.env`) unlock metered enrichment:

  • `WHOISXML_API_KEY` (optional — WhoisXML WHOIS enrichment)
  • `INTELX_KEY` (optional — Intelligence X leak-corpus search)
  • `ANYRUN_API_KEY` (optional — ANY.RUN sandbox submission)
  • `MISP_URL` / `MISP_KEY` (optional — MISP push/publish)

Quick Install

# The core needs NOTHING — Python 3.10+ stdlib only.
# Optional accelerators (install only what you need):
pip install requests brotli openpyxl
# crt.sh PostgreSQL fallback (optional):
pip install "psycopg[binary]>=3.1"

Code Evidence

WebPivot requirements stating zero required deps, from `intel_engine/WebPivot/requirements.txt:1-2`:

# WebPivot harness — the CORE needs NOTHING beyond the Python 3 stdlib.
# These are OPTIONAL accelerators; install only what you need.

BinaryPivot requirements stating zero required deps, from `intel_engine/BinaryPivot/requirements.txt:1-3`:

# BinaryPivot has ZERO required dependencies — the core runs on the Python 3 stdlib
# (zipfile, hashlib, struct, re) plus these OPTIONAL accelerators, used only if present:

IntelReport requirements stating no Python deps, from `intel_engine/IntelReport/requirements.txt:1-2`:

# IntelReport has NO Python package dependencies — render_report.py is stdlib-only.

Common Errors

Error Message Cause Solution
`ImportError: No module named 'requests'` requests not installed stdlib urllib fallback handles this automatically; or `pip install requests`
Wayback capture "undecodable" brotli not installed for br-encoded captures `pip install brotli` (capture retried next run without it)
crt.sh "degraded" sooner psycopg not installed `pip install "psycopg[binary]>=3.1"` (fallback skipped, not failed)
`.xlsx` master falls back to CSV openpyxl not installed `pip install "openpyxl>=3.1"`

Compatibility Notes

  • Python version: Requires 3.10+ (uses `from __future__ import annotations` and modern typing syntax). Python 3.8/3.9 will fail on type annotations in dataclass fields.
  • Windows: Not officially supported; use WSL2.
  • Optional deps are strictly additive: every optional import is guarded by try/except. Missing deps degrade gracefully with a visible status note — never a silent failure or a crash.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment