Command Line Reference
AutoPentestX supports several flags to customize scan behavior:Help Command
Available Flags
string
required
Target IP address or domain name to scan
string
default:"AutoPentestX Team"
Name of the penetration tester (appears in PDF report)
boolean
default:"false"
Disable safe mode (NOT RECOMMENDED - removes exploitation safeguards)
boolean
default:"false"
Skip web vulnerability scanning with Nikto and SQLMap
boolean
default:"false"
Skip exploitation assessment and Metasploit script generation
boolean
Display AutoPentestX version information
Performance Optimization Modes
Choose the right scan mode based on your time constraints and objectives:- Lightning Strike
- Tactical Assault
- Total Annihilation
Reconnaissance Only (5-10 minutes)
Skip web and exploitation phases for rapid port discovery:- ✅ Nmap port scanning
- ✅ Service version detection
- ✅ OS fingerprinting
- ✅ CVE lookup
- ❌ Nikto web scanning
- ❌ SQLMap injection testing
- ❌ Exploit matching
- Initial reconnaissance
- Network inventory
- Quick security checks
- CI/CD pipeline integration
- Port and service list
- CVE intelligence
- Lightweight PDF report
Real-World Scenarios
Scenario 1: Web Application Pentest
You’re testing a web application on port 8080:- Include your team name in the report (
-n) - Focus on web vulnerabilities (default includes Nikto/SQLMap)
- Skip exploitation since you’re only doing vulnerability discovery (
--skip-exploit)
Scenario 2: Quick Infrastructure Audit
You need to audit 10 servers in 1 hour:- Skip time-consuming web scans (
--skip-web) - Skip exploitation assessment (
--skip-exploit) - Get port inventory and CVE data only
Scenario 3: Lab CTF Challenge
You’re playing a Capture The Flag competition:- Run full scan to find all attack vectors
- Generate Metasploit RC scripts for manual exploitation
- Get comprehensive vulnerability list
Scenario 4: Pre-Deployment Security Check
Validate a new server before production deployment:- Full vulnerability scan including web services
- Skip exploitation since this is a pre-prod check
- Generate report for compliance documentation
Safe Mode vs No-Safe-Mode
Safe Mode (Default)
- ✅ Identifies exploitable vulnerabilities
- ✅ Generates Metasploit RC scripts
- ✅ Simulates exploitation attempts
- ❌ Does NOT execute actual exploits
- ❌ Does NOT modify target system
No-Safe-Mode
- ⚠️ Could execute actual exploits
- ⚠️ Might crash services
- ⚠️ Could damage target systems
- ⚠️ Requires explicit authorization
modules/exploit_engine.py:125-132:
Combining Multiple Flags
Advanced Database Queries
Access detailed scan data from the SQLite database:View All Scans
Find High-Risk Ports
List All Vulnerabilities
Exploitation Attempts
Export to JSON
Performance Tips
Speed Up Scans
-
Skip Unnecessary Phases
- Use
--skip-webif not testing web applications - Use
--skip-exploitif only doing vulnerability discovery
- Use
-
Scan During Off-Hours
- Less network congestion
- Lower risk of service disruption
-
Use Local DNS
- Scan by IP address instead of domain when possible
- Reduces DNS lookup overhead
-
Run with Sudo
- Enables faster SYN scans in Nmap
- Improves OS detection accuracy
Parallel Scanning
Scan multiple targets simultaneously:Interrupt and Resume
Gracefully Stop a Scan
PressCtrl+C to interrupt:
- Mark status as ‘interrupted’ in database
- Save all data collected so far
- Close connections cleanly
Check Interrupted Scans
AutoPentestX does not currently support resuming interrupted scans. You must restart from the beginning.
Automation and Integration
Scheduled Scans
Set up a cron job for weekly scans:CI/CD Integration
Add to your pipeline for continuous security testing:.gitlab-ci.yml
Next Steps
Web Vulnerabilities
Deep dive into Nikto and SQLMap findings
Exploitation
Learn about Metasploit integration and exploit simulation