Skip to main content
Take your penetration testing to the next level with advanced scanning techniques, custom configurations, and performance optimization strategies.

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:

Reconnaissance Only (5-10 minutes)

Skip web and exploitation phases for rapid port discovery:
What Runs:
  • ✅ Nmap port scanning
  • ✅ Service version detection
  • ✅ OS fingerprinting
  • ✅ CVE lookup
  • ❌ Nikto web scanning
  • ❌ SQLMap injection testing
  • ❌ Exploit matching
Best For:
  • Initial reconnaissance
  • Network inventory
  • Quick security checks
  • CI/CD pipeline integration
Output:
  • 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:
Why These Flags:
  • 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:
Why These Flags:
  • 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:
Why These Flags:
  • 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:
Why These Flags:
  • 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

Never disable safe mode unless you fully understand the consequences and have explicit authorization.

Safe Mode (Default)

Behavior:
  • ✅ Identifies exploitable vulnerabilities
  • ✅ Generates Metasploit RC scripts
  • ✅ Simulates exploitation attempts
  • ❌ Does NOT execute actual exploits
  • ❌ Does NOT modify target system
Use Case: Educational, vulnerability discovery, report generation

No-Safe-Mode

Currently Blocked for Safety: Even with --no-safe-mode, exploitation is disabled to prevent accidental system damage. This feature is for advanced users in controlled lab environments only.
Intended Behavior (if enabled):
  • ⚠️ Could execute actual exploits
  • ⚠️ Might crash services
  • ⚠️ Could damage target systems
  • ⚠️ Requires explicit authorization
Source Code Reference: From 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

Network Speed Impact: Scan duration heavily depends on network latency and target responsiveness. Local network scans are significantly faster than internet-based scans.

Speed Up Scans

  1. Skip Unnecessary Phases
    • Use --skip-web if not testing web applications
    • Use --skip-exploit if only doing vulnerability discovery
  2. Scan During Off-Hours
    • Less network congestion
    • Lower risk of service disruption
  3. Use Local DNS
    • Scan by IP address instead of domain when possible
    • Reduces DNS lookup overhead
  4. 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

Press Ctrl+C to interrupt:
The scan will:
  • 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