Overview
AutoPentestX generates detailed logs for every scan, capturing all operations, errors, and diagnostic information. Logs are essential for debugging, audit trails, and understanding scan behavior.Log Locations
All logs are stored in thelogs/ directory with timestamped filenames:
autopentestx_{YYYYMMDD}_{HHMMSS}.log
Log Levels
AutoPentestX uses standard logging levels to categorize messages:Log Structure
Logs follow a structured format with clear phase separation:Scan Phases in Logs
Phase 1: Initialization
Phase 1: Initialization
- Database connection status
- Table creation
- Scan ID assignment
Phase 2: Network Scanning
Phase 2: Network Scanning
- OS detection results
- Port discovery progress
- Service enumeration
- Scan duration
Phase 3: Vulnerability Scanning
Phase 3: Vulnerability Scanning
- Vulnerability detection
- Web scanner (Nikto) output
- SQL injection testing results
Phase 4: CVE Database Lookup
Phase 4: CVE Database Lookup
- CVE search queries
- Matched CVE identifiers
- CVSS scores and severity
Phase 5: Risk Assessment
Phase 5: Risk Assessment
- Per-port risk scores
- Critical findings
- Overall risk calculation
Phase 6: Exploitation Assessment
Phase 6: Exploitation Assessment
- Exploit matching results
- Safe mode confirmations
- RC script generation
- Simulation status
Phase 7: Report Generation
Phase 7: Report Generation
- PDF section generation
- File save location
- Report file size
Viewing Logs
Real-Time Monitoring
Post-Scan Analysis
Common Log Messages
Success Messages
Warning Messages
Error Messages
Debugging with Logs
Connection Issues
Search for connection problems:Missing Dependencies
Identify missing tools:Database Errors
Track database issues:Performance Analysis
Extract timing information:Log Rotation
Logs accumulate over time. Implement rotation to manage disk space:Manual Cleanup
Automated Rotation Script
Consider setting up a cron job to run log rotation weekly or monthly depending on scan frequency.
Log Analysis Tools
Extract Scan Summary
Count Vulnerabilities
Generate Activity Report
Best Practices
- Review Logs After Each Scan: Check for errors or warnings
- Archive Important Scans: Save logs for compliance/audit purposes
- Monitor Disk Space: Logs can grow large over time
- Use Log Levels: Pay attention to
[✗]and[!]symbols - Correlate with Database: Use Scan ID to match logs with database entries
Troubleshooting Common Issues
No logs being generated
No logs being generated
Possible causes:
- Logs directory doesn’t exist
- Insufficient permissions
Logs show permission denied errors
Logs show permission denied errors
Cause: Insufficient file system permissionsSolution:
Cannot find specific log file
Cannot find specific log file
Cause: Timestamp mismatch or incorrect directorySolution:
Logs consuming too much disk space
Logs consuming too much disk space
Cause: Long-running scans or no log rotationSolution:
Integration with External Tools
Send to Syslog
Parse with Python
Export to JSON
Related Resources
- PDF Reports - Understand report generation logs
- Database Queries - Correlate logs with database entries
- Troubleshooting - Common error solutions