Skip to content

SWORDIntel/SPECTRA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

267 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SPECTRA

Spectrally-Processing Extraction, Crawling, & Tele-Reconnaissance Archive

SPECTRA is an advanced framework for Telegram data collection, network discovery, and forensic-grade archiving with multi-account support, graph-based targeting, and robust OPSEC features.

SPECTRA

Features

  • πŸ”„ Multi-account & API key rotation with smart, persistent selection and failure detection
  • πŸ•΅οΈ Proxy rotation for OPSEC and anti-detection
  • πŸ”Ž Network discovery of connected groups and channels (with SQL audit trail)
  • πŸ“Š Graph/network analysis to identify high-value targets
  • πŸ“ Forensic archiving with integrity checksums and sidecar metadata
  • πŸ“± Topic/thread support for complete conversation capture
  • πŸ—„οΈ SQL database storage for all discovered groups, relationships, and archive metadata
  • ⚑ Parallel processing leveraging multiple accounts and proxies simultaneously
  • πŸ–₯️ Modern TUI (npyscreen) and CLI, both using the same modular backend
  • βš™οΈ Streamlined Account Management - Full CRUD operations directly in the TUI with keyboard shortcuts
  • ☁️ Forwarding Mode: Traverse a series of channels, discover related channels, and download text/archive files with specific rules, using a single API key.
  • πŸ›‘οΈ Red team/OPSEC features: account/proxy rotation, SQL audit trail, sidecar metadata, persistent state

⚑ Quick Start

Root launchers:

# Clone and enter directory
git clone https://github.com/SWORDIntel/SPECTRA.git
cd SPECTRA

# Main web console
./spectra

# Documentation launcher
python3 webapp.py

./spectra is the primary entry point for the web console. python3 webapp.py opens the documentation shell and lands on /docs.

Local GUI

The repository also includes a local web launcher for orchestration, status, and documentation:

./spectra

Optional API key protection:

export SPECTRA_GUI_API_KEY="change-me"
./spectra --api-key "$SPECTRA_GUI_API_KEY"

Standard machine-readable API surfaces:

  • /openapi.json
  • /.well-known/openapi.json
  • /docs

Installation

# Clone the repository
git clone https://github.com/SWORDIntel/SPECTRA.git
cd SPECTRA

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install core dependencies (recommended - stable)
pip install telethon rich pillow pandas networkx matplotlib python-magic pyaes pyasn1 feedgen lxml imagehash croniter npyscreen pysocks

# OR install all dependencies (may require system packages)
pip install -r requirements.txt

# Install package in development mode
pip install -e .

Configuration

SPECTRA supports multi-account configuration with automatic account import from gen_config.py (TELESMASHER-compatible) and persistent SQL storage for all operations.

Setting up Telegram API access

  1. Visit https://my.telegram.org/apps to register your application
  2. Create a config file or use the built-in account import:
# Import accounts from gen_config.py
python -m tgarchive accounts --import

System Status

Current Version: 2025-01-XX (Production Ready)

  • βœ… Core System: Fully operational with all syntax errors resolved
  • βœ… CLI Interface: 18 commands available and tested
  • βœ… Dependencies: Core dependencies installed and verified
  • βœ… Architecture: Professional-grade modular design validated
  • βœ… CNSA 2.0 Compliance: All cryptographic operations updated

Recent Enhancements (2025-01-XX):

  • Fixed critical Git merge conflicts blocking system startup
  • Resolved CLI parser conflicts and syntax errors
  • Validated full system functionality and dependency chain
  • See CHANGELOG.md for complete details

Documentation

Complete HTML documentation built with Docusaurus - a modern static site generator with:

  • πŸ” Full-text search across all documentation
  • πŸŒ™ Dark theme (default) with light mode toggle
  • πŸ“± Responsive design for mobile and desktop
  • 🧭 Interactive navigation with organized sidebar
  • ⚑ Fast loading with optimized static HTML
  • πŸ”— Versioning support for future releases

For local development:

cd docs
npm install          # Install Docusaurus dependencies
npm start            # Start development server (http://localhost:3000)
npm run build        # Build static HTML to docs/html/

Documentation Framework:

  • Built with Docusaurus 3.x
  • Source files: docs/docs/ (markdown with frontmatter)
  • Configuration: docs/docusaurus.config.js
  • Build output: docs/html/ (generated HTML files)
  • Root entry point: index.html (redirects to documentation)

Quick Links

Getting Started

User Guides

Features

Legacy Documentation

Original markdown files are still available in:

  • docs/guides/ β€” User guides and walkthroughs
  • docs/reference/ β€” Technical reference documentation
  • docs/features/ β€” Feature documentation
  • docs/reports/ β€” Security summaries and integration reports
  • docs/roadmap/ β€” Long-term initiatives and backlog
  • docs/research/ β€” Strategic research documents

Project Layout

SPECTRA/
β”œβ”€β”€ spectra              ← Main launcher for the local web console
β”œβ”€β”€ webapp.py            ← Documentation launcher (`/docs`)
β”œβ”€β”€ spectra.sh           ← Compatibility wrapper
β”œβ”€β”€ tgarchive/           ← Core CLI/TUI/archive/forwarding package
β”œβ”€β”€ src/spectra_app/     ← Web launcher and orchestration implementation
β”œβ”€β”€ spectra_app/         ← Compatibility package for repo-root imports
β”œβ”€β”€ templates/           ← Shared web UI templates
β”œβ”€β”€ docs/                ← Docusaurus source and compatibility docs
β”œβ”€β”€ scripts/             ← Install, launch, and maintenance helpers
β”œβ”€β”€ examples/            ← Example scripts
β”œβ”€β”€ tests/               ← Repo-level smoke/integration scripts
β”œβ”€β”€ deployment/          ← Docker/system deployment assets
β”œβ”€β”€ bootstrap            ← Bootstrap entrypoint
β”œβ”€β”€ index.html           ← Root redirect into the documentation site
β”œβ”€β”€ Makefile             ← Common development commands
β”œβ”€β”€ setup.py             ← Packaging entrypoint
└── CONTRIBUTING.md      ← Development workflow guide

Local runtime output such as logs/, spectra_venv/, and spectra_config.json is intentionally kept out of version control.

For detailed structure explanation, see PROJECT_STRUCTURE.md

Integration & Architecture

  • SPECTRA/tgarchive/discovery.py: Integration point for group crawling, network analysis, parallel archiving, and SQL-backed state
  • SPECTRA/tgarchive/__main__.py: Unified CLI/TUI entry point
  • examples/parallel_example.py: Example for parallel, multi-account operations
  • All modules are importable and can be reused in your own scripts or pipelines

Contributing

See CONTRIBUTING.md for development workflow and verification guidance.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A....most-in-one intelligence toolkit for crawling, archiving and exploring Telegram with limited thus far features for tracking users and attestation of multiple accounts into one profile.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors