config.json without modifying files. This is especially useful for one-time scans, CI/CD integration, and testing different configurations.
Priority Order
scan4all uses the following configuration priority:- Environment Variables (Highest)
- Configuration File (
config/config.json) - Default Values (Lowest)
Any setting in
config.json can be overridden by setting an environment variable with the same name.Common Environment Variables
Scan Control
| Variable | Type | Default | Description |
|---|---|---|---|
noScan | boolean | false | Skip port scanning, read nmap XML results |
UrlPrecise | boolean | true | Enable precise URL list scanning |
priorityNmap | boolean | true | Use nmap instead of naabu if available |
EnableSubfinder | boolean | false | Enable subdomain brute-forcing |
EnableHoneyportDetection | boolean | true | Detect and skip honeypots |
enableNuclei | boolean | true | Enable Nuclei vulnerability scanner |
enableDevDebug | boolean | false | Enable development debug output |
CheckWeakPassword | boolean | true | Enable password brute-forcing |
Nmap Configuration
| Variable | Type | Description |
|---|---|---|
PPSSWWDD | string | Root/sudo password for nmap execution |
Nmap requires root privileges for SYN scanning and OS detection. Set
PPSSWWDD to your sudo password.Performance Tuning
| Variable | Type | Default | Description |
|---|---|---|---|
Fuzzthreads | integer | 32 | Number of fuzzing threads |
hydrathread | integer | 64 | Password brute-force threads |
esthread | integer | 8 | Elasticsearch worker threads |
ScanPoolSize | integer | 5000 | Maximum concurrent scan operations |
Network Settings
| Variable | Type | Default | Description |
|---|---|---|---|
Cookie | string | "" | Custom cookie header for all requests |
LimitReader | integer | 819200 | Max response body size in bytes |
ParseSSl | boolean | true | Deep analysis of SSL certificates |
Elasticsearch Integration
| Variable | Type | Default | Description |
|---|---|---|---|
enableEsSv | boolean | true | Enable Elasticsearch storage |
esUrl | string | See config | Elasticsearch endpoint URL |
esthread | integer | 8 | ES worker threads |
Hydra Credentials
| Variable | Type | Description |
|---|---|---|
HydraUser | string | Default username for all services |
HydraPass | string | Default password for all services |
Cache Management
| Variable | Type | Default | Description |
|---|---|---|---|
CacheName | string | .DbCache | Cache directory name |
autoRmCache | boolean | true | Auto-remove cache on exit |
External Services
| Variable | Type | Description |
|---|---|---|
CeyeApi | string | Ceye API token for DNS callback detection |
CeyeDomain | string | Ceye domain name |
JndiAddress | string | JNDI server address for exploitation |
Dictionary Overrides
All dictionary paths can be overridden with environment variables:Service Dictionaries
Available Service Dictionary Variables
Available Service Dictionary Variables
ssh_username,ssh_pswd,ssh_defaultftpusername,ftp_pswd,ftp_defaultrdpusername,rdp_pswd,rdp_defaultmysqlusername,mysql_pswd,mysql_defaultpostgresqlusername,postgresql_pswd,postgresql_defaultmongodbusername,mongodb_pswd,mongodb_defaultmssqlusername,mssql_pswd,mssql_defaultoracleusername,oracle_pswd,oracle_defaultredisusername,redis_pswd,redis_defaultsmbusername,smb_pswd,smb_defaulttelnetusername,telnet_pswd,telnet_defaultsnmp_user,snmp_pswd,snmp_defaultes_user,es_pswd,es_default
Web Dictionaries
Available Web Dictionary Variables
Available Web Dictionary Variables
tomcatuserpass- Tomcat credentialsjbossuserpass- JBoss credentialsweblogicuserpass- WebLogic credentialsfiledic- File/directory namesbakSuffix- Backup file extensionshttpuser- HTTP basic auth usernameshttpass- HTTP basic auth passwordstop100pass- Top 100 passwordsprefix- URL prefixesfuzzct- Content-Type headersfuzz404- 404 detection patterns
Usage Patterns
One-Time Configuration
Set variables for a single scan without modifying config files:Export for Session
Set variables for the entire terminal session:Environment File
Create a.env file for project-specific settings:
CI/CD Integration
Advanced Configuration
Combining Sources
Environment variables override config file settings:Fuzzthreads: 64 (overridden)enableNuclei: true (from config)UrlPrecise: true (overridden)
Boolean Values
Boolean environment variables accept:- True:
true,True,TRUE,1 - False:
false,False,FALSE,0, empty string
Integer Values
Integer environment variables are parsed as numbers:String Values
String values support spaces when quoted:Debugging Configuration
View effective configuration by enabling debug mode:Best Practices
Use for Overrides
Use environment variables for temporary overrides, not permanent settings
Document in Scripts
Comment environment variables in shell scripts for clarity
Protect Secrets
Never commit
.env files with passwords or API keysValidate Values
Test configuration changes on non-production targets first
Common Scenarios
Scenario 1: Quick Scan Without Elasticsearch
Scenario 2: Aggressive Scan with Custom Threads
Scenario 3: Read Nmap Results Only
Scenario 4: Full Subdomain Enumeration
Scenario 5: Custom Authentication
Troubleshooting
Variable Not Taking Effect
Variable Not Taking Effect
- Check variable name matches config.json exactly (case-sensitive)
- Ensure no spaces around
=in assignment - Verify with
echo $VARIABLE_NAME - Try exporting:
export UrlPrecise=true
Boolean Not Working
Boolean Not Working
Use lowercase
true/false:Path Not Found
Path Not Found
Use absolute paths for dictionary overrides:
Next Steps
- Review configuration file reference
- Set up custom dictionaries
- Configure Elasticsearch integration