How sebastian93921/oott works
Project Type and Purpose
• Type: Open-source security CLI toolkit in Go
• Purpose: Provide various pentesting scans (subdomains, web, secrets, emails, local files) via a unified command‐line interface.
File Structure
• Top-level “main.go” invokes the CLI (cli/).
• “cli/” holds subcommands (emailscan, secretscan, subdomainscan, webscan, localscan).
• Each feature has its own package: localscan/, subdomains/, webscans/, secrets/, emails/.
• Shared logic in common/, helper/, lib/ (config, filtering).
• defaults/ houses pattern definitions (secretpatterns.json, wappalyzer fingerprints).
• External integrations: GitHub API, DuckDuckGo API, PGP scanning, massdns, etc.
README for Insights
• Usage examples show how CLI flags map to modules.
• Supported plugins list reveals external services and requirements (API keys, installed tools).
Main Components & Their Interactions
A. CLI Layer
– Component: Root command (cobra) in cli/root.go → subcommands in cli/*.go
– Responsibility: parse flags, dispatch to scan modules
B. Scan Modules
1. Localscan
• Reads files from local filesystem → uses secretpatterns.json → reports secrets
2. SubdomainScan
• Orchestrates multiple subdomain providers (subdomains/*.go)
• Fast scan, HTTP-status check options
3. WebScan
• Crawler + Wappalyzer fingerprinting (webscans/*.go)
4. SecretScan
• Uses GitHub API (common/github.go) for code‐search of secrets
5. EmailScan
• Uses DuckDuckGo, GitHub, PGP modules (emails/*.go)
C. Shared Utilities
• lib/: config loading, filtering logic
• helper/: formatting, pretty printing, general helpers
• common/: API wrappers for DuckDuckGo, GitHub
D. Defaults and Data Files
• default secret patterns (defaults/secretpatterns.json)
• wappalyzer signatures (defaults/wappalyzer/*.json)
E. External Services & Tools
• GitHub API, DuckDuckGo API, Archive.org, AlienVault, CertSpotter, LeakIX, RapidDNS, URLScan.io, massdns, PGP tool
Architectural Patterns & Design Principles
• Plugin-style modularity: each scan type is isolated in its own package
• Dependency injection via config (lib/config.go)
• Shared utilities to avoid duplication (common/, helper/)
• Data-driven patterns: default JSON files drive fingerprinting and secret patterns
4. Module to: