Project: Metabigor - OSINT intelligence tool without API key hassle Version: v2.1.0 Language: Go 1.24.0 Author: @j3ssie License: MIT
Metabigor is a command-line OSINT (Open Source Intelligence) tool designed to perform network reconnaissance and intelligence gathering without requiring API keys. It's part of the Osmedeus Engine ecosystem and focuses on seven core capabilities:
- Network Discovery (
net) - Find IP ranges (CIDRs) from ASN, organization, domain, or IP - Certificate Transparency (
cert) - Discover subdomains via crt.sh certificate logs - IP Enrichment (
ip) - Get port/service/vulnerability data via Shodan InternetDB (free) - GitHub Code Search (
github) - Find secrets and credentials in public repos via grep.app - IP Clustering (
ipc) - Group IPs by ASN for infrastructure mapping - Related Domains (
related) - Discover related domains via cert logs, WHOIS, analytics - CDN/WAF Detection (
cdn) - Identify if IPs are behind CDN or WAF providers
metabigor/
├── cmd/metabigor/ # Main application entry point
├── internal/ # Internal packages (not importable by external projects)
│ ├── asndb/ # ASN database management (local CSV lookups)
│ ├── cert/ # Certificate transparency search (crt.sh)
│ ├── cli/ # Cobra CLI commands and subcommands
│ ├── core/ # Core constants and configuration
│ ├── countrydb/ # Country database management
│ ├── gitsearch/ # GitHub code search via grep.app
│ ├── httpclient/ # HTTP client utilities (retryable, Chrome-based)
│ ├── ipinfo/ # IP enrichment (Shodan InternetDB) and clustering
│ ├── netdiscovery/ # Network discovery (static DB + dynamic sources)
│ ├── options/ # Global CLI options and configuration
│ ├── output/ # Output formatting (JSON, CSV, flat) and logging
│ ├── related/ # Related domain discovery (crt, WHOIS, analytics)
│ └── runner/ # Core execution runner and input processing
├── public/ # Embedded databases (ASN, country CSV files)
└── test/ # End-to-end test scripts
- Internal-only packages: All logic is in
internal/to prevent external imports - Cobra CLI framework: Each command is a separate file in
internal/cli/ - Runner pattern:
internal/runnerprocesses input (stdin, flags, files) and routes to handlers - Output abstraction:
internal/outputprovides consistent formatting across all commands - Embedded databases:
public/contains CSV databases embedded via//go:embedfor offline use
- User input → CLI command (
internal/cli/) - CLI initializes runner →
internal/runner/runner.go - Runner processes input sources (stdin,
-i,-I,--input) - Runner calls module-specific handler (
cert,net,ip, etc.) - Handler queries data sources (local DB, APIs, web scraping)
- Results formatted via
internal/output/writer.go - Output to stdout or file (
-oflag)
-
ASN Database:
~/.metabigor/ip-asn-combined.csv(2M+ entries)- Downloaded via
metabigor update - Source: https://github.com/iplocate/ip-address-databases
- Used by
netandipccommands for offline ASN lookups
- Downloaded via
-
Country Database:
~/.metabigor/ip-country-combined.csv- Used for geolocation enrichment
- Same source as ASN database
- Retryable HTTP: Uses
hashicorp/go-retryablehttpfor resilient API calls - Chrome CDP: Uses
chromedpfor JavaScript-heavy sites (grep.app, builtwith.com) - Rate limiting: Concurrent execution controlled via
-cflag (default: 10)
- crt.sh: Certificate transparency logs (cert, related commands)
- Shodan InternetDB: Free IP enrichment API (no key required)
- grep.app: GitHub code search
- bgp.he.net: Live BGP routing data (dynamic network discovery)
- viewdns.info: Reverse WHOIS lookups
- builtwith.com: Analytics tracking correlation (Google Analytics, GTM)
- projectdiscovery/cdncheck: CDN/WAF detection library
make build # Build and install to $GOPATH/bin
make install # Install directly via go install
make test # Run unit tests with race detection
make e2e # Run end-to-end tests
make build-all # Cross-compile for all platforms- No external imports: Keep all logic in
internal/ - Error handling: Always check errors; use
output.Error()for user-facing messages - Logging: Use
outputpackage methods (Info,Error,Debug,Success) - Silent mode: Respect
-q/--quietflag - no progress messages, errors only - Input flexibility: Always support stdin,
-i,-Ifile, and--inputflag
- Version is defined in
internal/core/constants.go - Build metadata (commit, date) injected via ldflags in Makefile
- Use semantic versioning (vMAJOR.MINOR.PATCH)
- Unit tests: Place in same package as code (
*_test.go) - E2E tests: Shell scripts in
test/directory - Test commands:
make test(unit),make e2e(end-to-end)
- Create new CLI command file in
internal/cli/(e.g.,internal/cli/newcmd.go) - Implement Cobra command with flags and input handling
- Create handler package in
internal/(e.g.,internal/newfeature/) - Add handler logic and data source integration
- Use
internal/outputfor consistent output formatting - Add help text to
internal/cli/helptext.go - Register command in
internal/cli/root.go - Add examples to README.md
make update # Downloads latest ASN and country databases to public/Then rebuild to embed the new databases:
make build- Update version in
internal/core/constants.go - Update README.md with new features
- Commit changes:
git commit -m "Release vX.Y.Z" - Tag release:
git tag vX.Y.Z - Push with tags:
git push origin main --tags - Run
make release(requires goreleaser and GITHUB_TOKEN)
- Input handling: ALL commands must support stdin,
-i,-I, and--input - Output modes: Consider JSON (
--json), CSV (--csv), and flat formats - Silent mode: Progress messages should respect
-q/--quietflag - Error handling: Use
output.Error()notfmt.Println()for errors - Concurrency: Respect
-cflag for concurrent operations
- Don't break stdin piping: Always test with
echo "input" | metabigor cmd - Don't hardcode paths: Use
options.DataDir()for database paths - Don't skip retries: Use retryable HTTP client for external API calls
- Don't assume online: Commands should work offline when using local DB
- Don't ignore cleanup: Close HTTP clients, Chrome instances, file handles
- No credentials in code: This tool specifically avoids API keys
- Input validation: Sanitize user input before passing to external commands
- Safe web scraping: Respect rate limits, use retries, handle timeouts
- No destructive operations: Tool is read-only OSINT, never modifies targets
- Use goroutines: For bulk operations (IP scanning, subdomain enumeration)
- Batch processing: Process inputs in chunks when possible
- Database caching: Load ASN/country DB once, reuse across lookups
- HTTP connection pooling: Reuse HTTP clients across requests
github.com/spf13/cobra- CLI frameworkgithub.com/projectdiscovery/cdncheck- CDN/WAF detectiongithub.com/projectdiscovery/mapcidr- CIDR manipulationgithub.com/chromedp/chromedp- Headless Chrome for JS-heavy sitesgithub.com/hashicorp/go-retryablehttp- Resilient HTTP clientgithub.com/PuerkitoBio/goquery- HTML parsinggithub.com/charmbracelet/glamour- Markdown rendering in terminal
Before committing changes:
- Run
make test- all unit tests pass - Run
make fmt- code is formatted - Run
make vet- no vet warnings - Test stdin input:
echo "input" | metabigor <cmd> - Test file input:
metabigor <cmd> -I file.txt - Test output file:
metabigor <cmd> -o output.txt - Test JSON output:
metabigor <cmd> --json - Test silent mode:
metabigor <cmd> -q - Update README.md if adding features
- Update help text in
internal/cli/helptext.go
# Build and test
make build # Build binary to bin/metabigor
make test # Run tests
make e2e # End-to-end tests
make lint # Run golangci-lint
# Database management
make update # Update embedded ASN/country databases
metabigor update # Download databases at runtime (user command)
# Release
make snapshot # Test goreleaser build
make release # Create GitHub release (needs tag + GITHUB_TOKEN)
# Development
go run ./cmd/metabigor # Run without building
go mod tidy # Clean up dependenciesMetabigor's core philosophy is API-free OSINT. When adding features:
- Prefer free data sources over API-based services
- Respect rate limits and implement retries
- Work offline when possible (local databases)
- Pipeline-friendly (stdin/stdout, clean output)
- Zero configuration (no config files, no setup beyond
metabigor update)
- GitHub Issues: https://github.com/j3ssie/metabigor/issues
- Documentation: README.md and
metabigor <cmd> --help - Part of: Osmedeus Engine (@OsmedeusEngine)
- Author: @j3ssie