Configuration
Learn how to configure SubdomainX using YAML files and CLI options.
Configuration Overview
CLI-First Approach: SubdomainX prioritizes command-line arguments over configuration files. All options can be passed directly via CLI flags.
Optional YAML Config: YAML configuration files are optional and provide default values that can be overridden by CLI arguments.
CLI Overrides YAML: Command-line arguments always take precedence over configuration file settings.
YAML Configuration
Default Configuration File
Create a configuration file at configs/default.yaml:
# SubdomainX Configuration File
# All options are optional and can be overridden via CLI
# Input configuration
wildcard_file: "" # Path to domains file (required via CLI)
# Output configuration
unique_name: "scan"
output_format: "json" # json, txt, html
output_dir: "output"
# Performance settings
threads: 10
retries: 3
timeout: 30
rate_limit: 100
# Filter settings
filters:
status_code: "" # Filter by HTTP status codes (e.g., "200,301,302")
ports: "" # Filter by ports (e.g., "80,443,8080")
# Tool selection (enumeration tools enabled by default, APIs and scanners disabled)
tools:
subfinder: true
findomain: true
assetfinder: true
amass: true
sublist3r: true
knockpy: true
dnsrecon: true
fierce: true
massdns: true
altdns: true
securitytrails: false
virustotal: false
censys: false
waybackurls: false
linkheader: false
# Scanning tools
scanners:
httpx: false
smap: falseConfiguration Parameters
Input Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
wildcard_file | string | "" | --wildcard | Path to file containing target domains (one per line) |
Output Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
unique_name | string | "scan" | --name | Unique name for output files |
output_format | string | "json" | --format | Output format: json, txt, html |
output_dir | string | "output" | --output | Output directory for generated files |
Performance Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
threads | integer | 10 | --threads | Number of concurrent threads |
retries | integer | 3 | --retries | Number of retry attempts |
timeout | integer | 30 | --timeout | Timeout in seconds |
rate_limit | integer | 100 | --rate-limit | Rate limit per second |
wordlist | string | "" | --wordlist | Custom wordlist file path |
max_http_targets | integer | 1000 | --max-http-targets | Maximum subdomains to scan with httpx |
Filter Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
status_code | string | "" | --status-codes | Filter by HTTP status codes (comma-separated) |
ports | string | "" | --ports | Filter by ports (comma-separated) |
Note: Filter options work with HTTP scanning (
--httpx) and port scanning (--smap) results.
Screenshot Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
screenshot | boolean | false | --screenshot | Capture screenshots of HTTP-alive subdomains |
screenshot_dir | string | {output}/screenshots | --screenshot-dir | Directory for screenshot files |
screenshot_timeout | integer | 10 | --screenshot-timeout | Timeout per page in seconds |
screenshot_resolution | string | "1280x720" | --screenshot-resolution | Viewport resolution (WxH) |
Note:
--screenshotautomatically enables--httpx. Requires Chrome or Chromium installed on the system.
Technology Fingerprinting Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
tech_detect | boolean | false | --tech | Enable technology fingerprinting during HTTP scanning |
tech_filter | string | "" | --tech-filter | Filter results by technology (comma-separated) |
Note:
--techautomatically enables--httpx.--tech-filterimplies--tech.
Subdomain Takeover Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
takeover | boolean | false | --takeover | Check subdomains for takeover vulnerabilities |
takeover_only | boolean | false | --takeover-only | Only show subdomains vulnerable to takeover |
Note:
--takeover-onlyimplies--takeover. Use with--httpxfor enhanced body-based detection.
TUI Dashboard Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
tui | boolean | false | --tui | Enable interactive TUI dashboard |
Note: When TUI mode is enabled, the standard CLI banner and log output are replaced by a full-screen interactive dashboard. All scan results are displayed in real time across three tabs: Dashboard, Results, and Logs.
Diff/Monitoring Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
diff_enabled | boolean | false | --diff | Compare results against the most recent previous scan |
baseline_file | string | "" | --baseline | Path to a specific baseline file for diff comparison |
Note: Scan history is automatically stored in
{output_dir}/.scan_history.json. The--baselineflag implies--diff.
Notification Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
notify_channels | string[] | [] | --notify | Notification channels (comma-separated: slack,discord,telegram,email) |
Important: All notification credentials must be set via environment variables — they are never stored in config files or passed via CLI flags. See CLI Reference for the full list of environment variables.
REST API Server Configuration
| Parameter | Type | Default | CLI Flag | Description |
|---|---|---|---|---|
port | integer | 8080 | --port | Port for the API server to listen on |
api_key | string | "" | --api-key | Bearer token for API authentication |
Note: Server mode is started with
subdomainx serve. Server-specific flags are separate from scan flags.
Tool Configuration
Tool selection is primarily controlled via CLI flags. YAML configuration provides default states. By default, enumeration tools are enabled while API tools and scanners are disabled:
Enumeration Tools
subfinder→--subfinderamass→--amassfindomain→--findomainassetfinder→--assetfindersublist3r→--sublist3rknockpy→--knockpydnsrecon→--dnsreconfierce→--fiercemassdns→--massdnsaltdns→--altdnswaybackurls→--waybackurlslinkheader→--linkheader
API Tools
securitytrails→--securitytrailsvirustotal→--virustotalcensys→--censyscrtsh→--crtshurlscan→--urlscanhackertarget→--hackertarget
Scanning Tools
httpx→--httpxsmap→--smap
Usage Examples
Use Default Configuration
Run with default settings from config file:
Single domain:
subdomainx example.comMultiple domains:
subdomainx --wildcard domains.txtOverride Configuration
Override specific settings via CLI:
Single domain:
subdomainx --threads 20 --format html --max-http-targets 500 example.comMultiple domains:
subdomainx --wildcard domains.txt --threads 20 --format html --max-http-targets 200Custom Config File
Use a custom configuration file:
Single domain:
subdomainx --config my-config.yaml example.comMultiple domains:
subdomainx --wildcard domains.txt --config my-config.yamlCLI Only
Ignore config file and use only CLI arguments:
Single domain:
subdomainx --subfinder --httpx --format json example.comMultiple domains:
subdomainx --wildcard domains.txt --subfinder --httpx --format jsonAPI Configuration
Configure API tools using environment variables:
Single domain:
# Set API keys
export SECURITYTRAILS_API_KEY="your_key"
export VIRUSTOTAL_API_KEY="your_key"
export CENSYS_API_ID="your_id"
export CENSYS_SECRET="your_secret"
export URLSCAN_API_KEY="your_key"
export HACKERTARGET_API_KEY="your_key"
# Use APIs
subdomainx --securitytrails --virustotal --censys --crtsh --urlscan --hackertarget example.comMultiple domains:
# Set API keys
export SECURITYTRAILS_API_KEY="your_key"
export VIRUSTOTAL_API_KEY="your_key"
export CENSYS_API_ID="your_id"
export CENSYS_SECRET="your_secret"
export URLSCAN_API_KEY="your_key"
export HACKERTARGET_API_KEY="your_key"
# Use APIs
subdomainx --wildcard domains.txt --securitytrails --virustotal --censys --crtsh --urlscan --hackertargetWordlist Configuration
Custom wordlists can be used with tools that support brute-forcing:
Single domain:
# Use custom wordlist
subdomainx --wordlist /path/to/wordlist.txt example.com
# Wordlist should contain one subdomain per line
# Example wordlist content:
# www
# mail
# ftp
# admin
# api
# dev
# testMultiple domains:
subdomainx --wildcard domains.txt --wordlist /path/to/wordlist.txtSupported tools for custom wordlists:
- subfinder - Uses
-wflag for custom wordlists - amass - Uses
-wflag for custom wordlists - massdns - Uses custom wordlist for DNS brute-forcing
- altdns - Uses custom wordlist for subdomain permutations
With Filters
Use filters to focus on specific results:
Single domain:
subdomainx --httpx --smap --status-codes 200,301,302 --ports 80,443,8080 example.comMultiple domains:
subdomainx --wildcard domains.txt --httpx --smap --status-codes 200,301,302 --ports 80,443,8080Configuration Tips
Tip:
- CLI arguments always override YAML configuration
- Use YAML for default settings and CLI for specific overrides
- Configuration files are optional - you can use CLI only
- Keep configuration files in version control for team consistency
- Use environment variables for sensitive configuration (API keys)
- Filter options help focus on relevant results and reduce noise
- API tools require environment variables for authentication