Overview
This guide covers common issues encountered when using scan4all and their solutions. If you encounter problems not covered here, check the GitHub Discussions.
Installation Issues
libpcap Library Errors
Problem: Error when running scan4all:
libpcap.so.0.8: cannot open shared object file: No such file or directory
Solution 1 - Install libpcap:
Ubuntu/Debian:
sudo apt update
sudo apt install -y libpcap0.8-dev libpcap-dev
CentOS/RHEL:
sudo yum install -yy glibc-devel.x86_64 libpcap
macOS:
Solution 2 - Create symbolic link:
If you have a different version of libpcap installed:
# Check what versions are available
ls -all /lib64/libpcap*
# or on some systems
ls -all /usr/lib/x86_64-linux-gnu/libpcap*
# Create symbolic link to required version
sudo ln -s /lib64/libpcap.so.1.9.1 /lib64/libpcap.so.0.8
Docker Environment
Ubuntu container:
apt update && apt install -yy libpcap0.8-dev
CentOS container:
yum install -yy glibc-devel.x86_64
Runtime Issues
Too Many Open Files
Problem: Error during scanning:
This occurs when scanning many targets simultaneously.
Check current limits:
ulimit -a
awk '{print $1}' /proc/sys/fs/file-nr
Solution - Increase file descriptor limit:
Temporary (current session):
Permanent (Linux):
Edit /etc/security/limits.conf:
* soft nofile 819200
* hard nofile 819200
Log out and back in for changes to take effect.
Verify:
nmap Not Found
Problem: scan4all cannot detect nmap even though it’s installed.
Solution 1 - Disable nmap:
priorityNmap=false ./scan4all -l targets.txt
Solution 2 - Install nmap:
Ubuntu/Debian:
CentOS/RHEL:
macOS:
Solution 3 - Verify PATH:
Ensure nmap’s location is in your PATH.
nmap Permission Errors
Problem: nmap requires root privileges but PPSSWWDD not set.
Solution - Set root password:
export PPSSWWDD=yourRootPassword
./scan4all -l targets.txt
Be cautious when storing passwords in environment variables. Consider using naabu instead if you cannot provide root access.
Alternative - Use naabu:
priorityNmap=false ./scan4all -l targets.txt
Configuration Issues
Elasticsearch Connection Failed
Problem: Cannot connect to Elasticsearch or results not being stored.
Check Elasticsearch status:
curl http://127.0.0.1:9200/_cluster/health
Solution 1 - Start Elasticsearch:
mkdir -p ~/MyWork/scan4all/logs ~/MyWork/scan4all/data
cd ~/MyWork/scan4all
docker run --restart=always --ulimit nofile=65536:65536 \
-p 9200:9200 -p 9300:9300 -d --name es \
-v $PWD/logs:/usr/share/elasticsearch/logs \
-v $PWD/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v $PWD/config/jvm.options:/usr/share/elasticsearch/config/jvm.options \
-v $PWD/data:/usr/share/elasticsearch/data \
hktalent/elasticsearch:7.16.2
Solution 2 - Initialize indices:
Solution 3 - Check configuration:
Verify config/config.json:
{
"enableEsSv": true,
"esUrl": "http://127.0.0.1:9200/%s_index/_doc/%s"
}
Solution 4 - Authentication issues:
If Elasticsearch requires authentication, update config/nuclei_esConfig.yaml:
username: your_username
password: your_password
Config File Not Found
Problem: scan4all cannot find config/config.json.
Solution 1 - Generate default config:
Run scan4all once to auto-generate the config directory:
Solution 2 - Clone repository:
git clone https://github.com/GhostTroops/scan4all
cd scan4all
go build
Solution 3 - Specify config location:
Ensure scan4all is run from the directory containing the config folder, or the config folder is in your home directory.
Scanning Issues
Incomplete Results
Problem: Port scan results are incomplete or missing services.
Possible causes and solutions:
1. Network issues with nmap:
# Switch to naabu
priorityNmap=false ./scan4all -l targets.txt
2. Rate limiting or packet loss:
# Reduce scan rate in config/config.json
"nmap": "nmap ... --min-rate 5000 ..."
3. Firewall blocking:
- Verify target is reachable:
ping target
- Check for filtering:
nmap -Pn target
- Try from different network location
4. Timeout too aggressive:
# Increase timeout in config/config.json
"nmap": "nmap ... --host-timeout 20m ..."
No Vulnerabilities Found
Problem: scan4all completes but finds no vulnerabilities.
Verification steps:
1. Confirm targets are reachable:
./scan4all -l targets.txt -v -debug
2. Check if ports were discovered:
# View port scan results
http://127.0.0.1:9200/naabu_index/_doc/_search?q=host:"target.com"
3. Verify POC execution:
# Enable nuclei debugging
# Edit config/config.json
{
"nuclei": {
"verbose": true,
"debug": true
}
}
4. Update POC templates:
# Ensure you're using latest version
go install github.com/GhostTroops/scan4all@latest
Scan Running Too Slow
Problem: Scans take excessively long to complete.
Solutions:
See the Performance Tuning guide for comprehensive optimization strategies.
Quick fixes:
1. Enable nmap (if not already):
export PPSSWWDD=yourRootPassword
priorityNmap=true ./scan4all -l targets.txt
2. Reduce port range:
# Edit config/config.json
{
"naabu": {
"TopPorts": "100"
}
}
3. Disable expensive features:
export EnableSubfinder=false
export ParseSSl=false
./scan4all -l targets.txt
4. Split target list:
split -l 100 targets.txt batch_
for batch in batch_*; do
./scan4all -l $batch &
done
High Memory Usage
Problem: scan4all or Elasticsearch consuming excessive memory.
For scan4all:
1. Reduce thread counts:
{
"nuclei": {"threads": 25},
"httpx": {"threads": 25}
}
2. Disable caching:
{
"autoRmCache": "true"
}
3. Scan smaller batches:
# Process targets in smaller groups
head -100 targets.txt > batch1.txt
./scan4all -l batch1.txt
For Elasticsearch:
Adjust JVM heap size in config/jvm.options:
Set heap to 50% of available RAM, but not exceeding 31GB.
Cookie and Authentication Issues
Problem: Authenticated scanning not working with Cookie parameter.
Solution 1 - Verify cookie format:
# Correct format
Cookie='sessionid=abc123; csrftoken=xyz789' ./scan4all -host target.com
# Not this
Cookie='Cookie: sessionid=abc123' ./scan4all -host target.com
Solution 2 - Escape special characters:
Cookie='complex=value%3Dtest%26foo%3Dbar' ./scan4all -host target.com
Solution 3 - Use config file:
Some tools support cookie configuration. Check tool-specific docs.
Output and Results Issues
Cannot Find Results
Problem: Scan completed but results are missing.
Check output locations:
1. Elasticsearch:
# Check all indices
http://127.0.0.1:9200/_cat/indices
# Search specific index
http://127.0.0.1:9200/nuclei_index/_doc/_search?size=100
2. File output:
# Specify output file explicitly
./scan4all -l targets.txt -o results.csv -csv
./scan4all -l targets.txt -json -o results.json
3. Check current directory:
ls -lah *.csv *.json *.txt
Elasticsearch Query Issues
Problem: Cannot query or find specific results in Elasticsearch.
Common query patterns:
By target ID:
http://127.0.0.1:9200/nmap_index/_doc/_search?q=_id:192.168.0.111
By host field:
http://127.0.0.1:9200/nuclei_index/_doc/_search?q=host:"target.com"
All results from index:
http://127.0.0.1:9200/httpx_index/_doc/_search?size=1000
Filter by severity:
http://127.0.0.1:9200/nuclei_index/_doc/_search?q=severity:critical
Integration Issues
log4j-scan Not Working
Problem: log4j vulnerability scanning fails.
Solution - Install log4j-scan:
mkdir -p ~/MyWork
cd ~/MyWork
git clone https://github.com/hktalent/log4j-scan
scan4all will automatically detect and use log4j-scan if it’s in ~/MyWork/log4j-scan.
Verify Python dependencies:
cd ~/MyWork/log4j-scan
pip3 install -r requirements.txt
Subdomain Enumeration Not Working
Problem: EnableSubfinder=true but no subdomains found.
Solution 1 - Verify configuration:
export EnableSubfinder=true
export ParseSSl=true
./scan4all -host target.com -v
Solution 2 - Check API keys:
Some subdomain sources require API keys. Configure in subfinder’s config if needed.
Solution 3 - Be patient:
Subdomain enumeration is very slow. It may take considerable time for results to appear.
Windows Issues
Problem: Cache files or nmap paths incorrect on Windows.
Solution 1 - Use Windows path format:
The tool should automatically add .exe to nmap, but verify:
{
"nmap": "nmap.exe ..."
}
Solution 2 - Antivirus interference:
Security software may block port scanning. Add exception for scan4all and nmap.
Solution 3 - WinPcap/Npcap:
Install Npcap (Windows packet capture library):
https://npcap.com/#download
macOS Issues
Problem: Permission denied errors on macOS.
Solution 1 - Grant permissions:
macOS may require security permissions for network tools:
- System Preferences → Security & Privacy → Privacy
- Grant Full Disk Access if needed
Solution 2 - Use sudo:
sudo ./scan4all -l targets.txt
Solution 3 - Set PPSSWWDD:
export PPSSWWDD=yourPassword
./scan4all -l targets.txt
Getting Help
Debug Mode
Enable verbose debugging:
./scan4all -l targets.txt -v -debug
Debug mode significantly slows scanning. Use only for troubleshooting.
Useful Diagnostics
Gather information for bug reports:
# Version information
./scan4all -version
# System information
uname -a
go version
# Check dependencies
which nmap
nmap --version
# File limits
ulimit -a
# Network connectivity
ping -c 4 target.com
traceroute target.com
GitHub Discussions:
https://github.com/GhostTroops/scan4all/discussions
GitHub Issues:
https://github.com/GhostTroops/scan4all/issues
Documentation:
When asking for help, include:
- scan4all version
- Operating system and version
- Full error message
- Command line used (redact sensitive targets)
- Relevant configuration snippets
- Steps to reproduce
Common Error Messages
”Target not found”
Cause: Invalid target format or unreachable host.
Solution:
- Verify target format (IP, domain, CIDR, URL)
- Check network connectivity
- Try with
-v flag for more details
”No ports found”
Cause: Port scan failed or target has no open ports.
Solution:
- Verify target is online
- Try with
priorityNmap=true
- Check firewall rules
- Test with manual nmap scan
”POC execution failed”
Cause: nuclei or vscan encountered an error.
Solution:
- Update to latest version
- Check nuclei templates are present
- Verify target is accessible
- Review error details with
-v -debug
”Elasticsearch index error”
Cause: Index not initialized or ES not running.
Solution:
# Check ES status
curl http://127.0.0.1:9200
# Reinitialize indices
./config/initEs.sh
Prevention Best Practices
To avoid common issues:
-
Always check prerequisites:
- libpcap installed
- File descriptor limits set
- Elasticsearch running (if using)
- nmap installed (if using)
-
Start with verbose mode:
./scan4all -l small_test.txt -v
-
Test with small target sets first:
- Verify configuration
- Confirm connectivity
- Validate output format
-
Monitor system resources:
- CPU usage
- Memory consumption
- Network bandwidth
- Disk space
-
Keep tools updated:
go install github.com/GhostTroops/scan4all@latest
Most issues can be resolved by checking the installation prerequisites, reviewing configuration files, and enabling verbose logging.