Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gowtham-Darkseid/AutoPentestX/llms.txt
Use this file to discover all available pages before exploring further.
Installation Errors
Virtual Environment Not Found
Error Message:bash: venv/bin/activate: No such file or directory
Cause: The virtual environment was not created during installation or was deleted.Solution:Recreate the virtual environment
Reinstall dependencies
pip install -r requirements.txt
Always activate the virtual environment before running AutoPentestX to ensure all dependencies are available.
Error Message:ModuleNotFoundError: No module named 'nmap'
ImportError: No module named 'reportlab'
Cause: Python dependencies were not installed or the virtual environment is not activated.Solution:# Activate virtual environment first
source venv/bin/activate
# Reinstall all requirements
pip install -r requirements.txt
Never install packages globally with sudo pip. Always use the virtual environment to avoid system-wide conflicts.
Installation Script Fails
Error Message:E: Unable to locate package nmap
E: Package 'nikto' has no installation candidate
Cause: Package lists are outdated or repository issues.Solution:Install packages manually
sudo apt-get install -y python3 python3-pip python3-venv nmap nikto sqlmap git curl wget
Rerun installation script
Runtime Errors
Error Message:[✗] Invalid target: 192.168.1.100
socket.gaierror: [Errno -2] Name or service not known
Cause: Target IP/domain cannot be resolved or is unreachable.Solution:Verify network connectivity
Check DNS resolution (for domains)
nslookup example.com
dig example.com
Verify target format
Make sure you’re using a valid IP address or domain:
- Valid:
192.168.1.100, example.com, 10.0.0.1
- Invalid:
192.168.1.1000, example .com, http://example.com
Check firewall rules
# Check if your firewall is blocking outbound connections
sudo ufw status
sudo iptables -L
Ensure you have network access to the target and that no firewall is blocking your scans.
Symptoms:
- Scan completes but shows 0 open ports
- All ports appear filtered or closed
- PDF report has minimal information
Possible Causes:
- Target has no open ports (unlikely)
- Firewall is blocking scan traffic
- Insufficient permissions (no sudo)
- Network restrictions
Solutions:# Many scan techniques require root privileges
sudo python3 main.py -t 192.168.1.100
Start with a quick scan on localhost (127.0.0.1) to verify AutoPentestX is working correctly before scanning remote targets.
Error Message:[✗] Report generation failed
ImportError: cannot import name 'ImageReader' from 'PIL'
ReportLabError: Unable to generate PDF
Cause: PDF generation libraries are corrupted or missing dependencies.Solution:Reinstall PDF libraries
pip install --upgrade reportlab pillow
Install system dependencies
sudo apt-get install -y libjpeg-dev zlib1g-dev
Verify installation
python3 -c "from reportlab.lib.pagesizes import letter; print('ReportLab OK')"
python3 -c "from PIL import Image; print('Pillow OK')"
Check reports directory
# Ensure reports directory exists and is writable
ls -la reports/
chmod 755 reports/
Even if report generation fails, scan data is still saved to the SQLite database in database/autopentestx.db.
Error Message:sqlite3.OperationalError: unable to open database file
sqlite3.DatabaseError: database disk image is malformed
Solutions:# Fix database directory permissions
mkdir -p database
chmod 755 database/
Keyboard Interrupt Handling
When pressing Ctrl+C during a scan:Expected Behavior:[!] MISSION ABORT - Operator initiated shutdown
The scan will gracefully terminate and mark the status as “interrupted” in the database.If AutoPentestX hangs:Force terminate
Press Ctrl+C multiple times or use:# In another terminal
pkill -f "python3 main.py"
Check for zombie processes
ps aux | grep -E "nmap|nikto|sqlmap"
# Kill any remaining processes
sudo pkill nmap
sudo pkill nikto
sudo pkill sqlmap
Some subprocesses (Nmap, Nikto, SQLMap) may continue running even after terminating AutoPentestX. Always verify they’re stopped.
Error Message:nmap.nmap.PortScannerError: 'nmap program was not found in path'
Solution:# Install Nmap
sudo apt-get install nmap
# Verify installation
which nmap
nmap --version
Nmap is required for all network scanning operations. AutoPentestX cannot function without it.
Error Message:FileNotFoundError: [Errno 2] No such file or directory: 'nikto'
nikto: command not found
Solution:# Install Nikto
sudo apt-get install nikto
# Alternative: Install from GitHub
git clone https://github.com/sullo/nikto.git
cd nikto/program
./nikto.pl -h
Workaround:# Skip web scanning if Nikto is not available
python3 main.py -t 192.168.1.100 --skip-web
Error Message:sqlmap: command not found
Solution:# Install SQLMap
sudo apt-get install sqlmap
# Or download latest version
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git
Skip SQL injection testing:python3 main.py -t 192.168.1.100 --skip-web
Symptoms: Scan runs for 30+ minutesSolutions:# Nikto and SQLMap are time-intensive
python3 main.py -t 192.168.1.100 --skip-web
# Reduces scan time by 10-15 minutes
Use --skip-web --skip-exploit for quick reconnaissance, then run a full scan later if needed.
Getting Help
If your issue is not listed here:
- Check the logs:
ls -lh logs/ and examine recent log files
- Review scan database:
sqlite3 database/autopentestx.db "SELECT * FROM scans ORDER BY id DESC LIMIT 5;"
- Test components individually: Run Nmap, Nikto, and SQLMap manually to isolate the issue
- Consult other troubleshooting pages:
Still Need Help?
Open an issue on GitHub with your error logs and system information