CLI Reference

CLI Reference

Complete command-line interface reference for SubdomainX.

Basic Usage

Single domain:

subdomainx <domain> [OPTIONS]

Multiple domains:

subdomainx --wildcard <domains_file> [OPTIONS]

Required: You must provide either a single domain as a positional argument or a file containing target domains using the --wildcard flag.

Important: Flags must be placed before the domain argument. For example:

subdomainx --subfinder --httpx example.com  # Correct
subdomainx example.com --subfinder --httpx  # Incorrect

Command Options

Required Options

OptionDescription
<domain>Target domain for single domain scan
--wildcard FILEPath to file containing target domains (one per line)

Tool Selection details

Use specific tools, otherwise all available enumeration tools will be used by default (API tools and scanners are disabled by default).

Enumeration Tools

OptionDescription
--subfinderUse subfinder tool
--amassUse amass tool
--findomainUse findomain tool
--assetfinderUse assetfinder tool
--sublist3rUse sublist3r tool
--knockpyUse knockpy tool
--dnsreconUse dnsrecon tool
--fierceUse fierce tool
--massdnsUse massdns tool
--altdnsUse altdns tool
--waybackurlsUse waybackurls tool
--linkheaderUse Link Header enumeration

API Tools details

OptionDescription
--securitytrailsUse SecurityTrails API
--virustotalUse VirusTotal API
--censysUse Censys API
--crtshUse crt.sh Certificate Transparency API
--urlscanUse URLScan.io API
--hackertargetUse HackerTarget API

Note: If no specific tools are specified, SubdomainX will use all available enumeration tools by default. API tools and scanners must be explicitly enabled.

Scanning Tools details

OptionDescription
--httpxUse httpx for HTTP scanning (discovers web services, extracts titles, status codes, and technologies)
--smapUse smap for port scanning (identifies open ports and services on discovered hosts)

Filter Options

Filter results based on specific criteria:

OptionDefaultDescriptionExample
--status-codesAllFilter by HTTP status codes (comma-separated)--status-codes 200,301,302
--portsAllFilter by ports (comma-separated)--ports 80,443,8080

Note: Filter options work with HTTP scanning (--httpx) and port scanning (--smap) results. Default values include all common HTTP status codes (100-511) and common ports (21,22,23,25,53,80,110,111,135,139,143,443,993,995,1723,3306,3389,5900,8080,8443).

Output Options

OptionDefaultDescription
--name NAMEscanUnique name for output files
--format FORMATjsonOutput format: json, txt, html
--output DIRoutputOutput directory for generated files

Performance Options

OptionDefaultDescription
--threads N10Number of concurrent threads
--retries N3Number of retry attempts
--timeout N30Timeout in seconds
--rate-limit N100Rate limit per second
--wordlist FILE""Custom wordlist file for brute-forcing
--max-http-targets N1000Maximum subdomains to scan with httpx
--resume SCAN_ID""Resume scan from checkpoint (scan ID)
--list-checkpointsfalseList available checkpoints

Screenshot Options

Capture screenshots of discovered web services using headless Chrome/Chromium.

OptionDefaultDescription
--screenshotfalseCapture screenshots of HTTP-alive subdomains
--screenshot-dir DIR{output}/screenshotsDirectory for screenshot files
--screenshot-timeout N10Timeout per page in seconds
--screenshot-resolution WxH1280x720Viewport resolution (width x height)

Note: --screenshot automatically enables --httpx since it needs HTTP results. Requires Chrome or Chromium installed on the system.

Technology Fingerprinting Options

Detect technology stacks on discovered web services during HTTP scanning.

OptionDefaultDescription
--techfalseEnable technology fingerprinting during HTTP scanning
--tech-filter""Filter results by technology (comma-separated, e.g., WordPress,nginx)

Note: --tech automatically enables --httpx since it requires HTTP scanning. --tech-filter implies --tech.

What it detects:

  • Web servers: nginx, Apache, IIS, Caddy
  • Frameworks: React, Angular, Vue, Next.js, Django, Rails, Laravel, Express.js
  • CMS platforms: WordPress, Drupal, Joomla, Wix, Squarespace
  • CDN/WAF providers: Cloudflare, Akamai, AWS CloudFront, Azure CDN
  • JavaScript libraries: jQuery, Bootstrap, Tailwind CSS
  • Languages: PHP, Java, ASP.NET, Ruby
  • PaaS/Hosting: Heroku, Vercel, Netlify, Fly.io, Shopify

Detection methods:

  • HTTP response headers (Server, X-Powered-By, CF-RAY, etc.)
  • Cookie patterns (PHPSESSID → PHP, csrftoken → Django, etc.)
  • HTML meta tags and script sources (<meta name="generator">, CDN links)
  • URL patterns and file extensions

Subdomain Takeover Options

Check for subdomain takeover vulnerabilities due to dangling DNS records.

OptionDefaultDescription
--takeoverfalseCheck all discovered subdomains for takeover vulnerabilities
--takeover-onlyfalseOnly show subdomains vulnerable to takeover

Note: --takeover-only implies --takeover. When used with --httpx, takeover detection is enhanced with HTTP body fingerprint matching in addition to DNS-based checks.

Supported services:

ServiceDetection Method
AWS S3CNAME + “NoSuchBucket” in response
GitHub PagesCNAME + “There isn’t a GitHub Pages site here”
HerokuCNAME + “No such app”
AzureCNAME + NXDOMAIN on *.azurewebsites.net
ShopifyCNAME + “Sorry, this shop is currently unavailable”
FastlyCNAME + “Fastly error: unknown domain”
PantheonCNAME + “404 error unknown site”
TumblrCNAME + “There’s nothing here”
WordPress.comCNAME + “Do you want to register”
Fly.ioCNAME + NXDOMAIN on *.fly.dev
Surge.shCNAME + “project not found”
NetlifyCNAME + “Not Found - Request ID”

Diff/Monitoring Options

Compare scan results against previous runs to detect changes.

OptionDefaultDescription
--difffalseCompare results against the most recent previous scan
--baseline FILE""Compare results against a specific baseline file

Note: --baseline implies --diff. Scan history is automatically recorded to {output}/.scan_history.json for future comparisons.

Notification Options

Send scan results and diff alerts to external channels. All credentials are read from environment variables only — never passed via CLI flags.

OptionDefaultDescription
--notify CHANNELS""Notification channels (comma-separated: slack,discord,telegram,email)

Environment variables:

VariableChannelDescription
SUBDOMAINX_SLACK_WEBHOOKSlackSlack webhook URL
SUBDOMAINX_DISCORD_WEBHOOKDiscordDiscord webhook URL
SUBDOMAINX_TELEGRAM_TOKENTelegramTelegram bot token
SUBDOMAINX_TELEGRAM_CHAT_IDTelegramTelegram chat ID
SUBDOMAINX_SMTP_HOSTEmailSMTP server hostname
SUBDOMAINX_SMTP_PORTEmailSMTP port (default: 587)
SUBDOMAINX_SMTP_USEREmailSMTP username
SUBDOMAINX_SMTP_PASSEmailSMTP password
SUBDOMAINX_NOTIFY_EMAILEmailRecipient email(s), comma-separated

Interactive TUI Dashboard

Launch an interactive terminal dashboard for real-time scan monitoring.

OptionDefaultDescription
--tuifalseEnable interactive TUI dashboard

Note: The TUI dashboard replaces the standard CLI output with a full-screen interactive interface. It provides three tabs: Dashboard (tool progress and stats), Results (sortable/filterable subdomain table), and Logs (timestamped log viewer).

Keyboard shortcuts:

KeyAction
TabSwitch to next tab
Shift+TabSwitch to previous tab
1 / 2 / 3Jump to Dashboard / Results / Logs
j / k / Up / DownScroll
sSort results (Results tab)
/Filter results (Results tab)
EscClear filter
eExport info
q / Ctrl+CQuit

SubdomainX CLI Dashboard

Utility Options

OptionDescription
--helpShow help message
--versionShow version information
--check-toolsCheck availability of enumeration tools
--install-toolsAutomatically install all missing tools
--config FILEUse custom configuration file
--verboseEnable verbose output

Tool Management

Check Tools

Check which tools are available and get installation help:

subdomainx --check-tools

Install Tools

Automatically install all missing tools:

subdomainx --install-tools
Made with ❤️ by ZeeshanStar us