Skip to main content
AutoPentestX provides several command-line options to customize the penetration testing process. This page documents every available flag with defaults and usage examples.

Required Arguments

Target Specification

string
required
Target IP address or domain name to perform penetration testing againstFormat: IPv4 address or fully qualified domain name (FQDN)Examples:

Optional Arguments

Tester Name

string
default:"AutoPentestX Team"
Name of the penetration tester to include in generated reportsThis value appears in:
  • PDF report headers
  • Database scan records
  • Executive summaries
Examples:
With custom tester name:
PDF Report Output:

Safe Mode Control

boolean
default:"false"
Disable safe mode protections (NOT RECOMMENDED)Default Behavior: Safe mode is ENABLED by defaultSafe Mode Protections:
  • Confirmation prompt before scanning
  • Rate limiting on aggressive scans
  • Prevents accidental destructive operations
  • Legal warning displays
Usage:
Use --no-safe-mode with extreme caution!Disabling safe mode:
  • Removes confirmation prompts
  • Increases risk of unauthorized scanning
  • May violate compliance requirements
  • Could lead to legal issues
Only disable safe mode when:
  • Running in fully automated CI/CD pipelines
  • Testing in isolated lab environments
  • You have comprehensive authorization

Web Scanning Control

boolean
default:"false"
Skip web vulnerability scanning modules (Nikto and SQLMap)Skipped Modules:
  • Nikto web server scanner
  • SQLMap SQL injection testing
  • Web application fingerprinting
  • CMS vulnerability detection
Use Cases:
  • Target has no web services
  • Time-constrained assessments
  • Network infrastructure focus
  • Web testing handled separately
Usage:
Time Savings: 5-10 minutes per scan
When to use --skip-web:Good scenarios:
  • Network devices (routers, switches, firewalls)
  • Database servers without web interfaces
  • Quick reconnaissance sweeps
  • IoT devices without HTTP services
Avoid when:
  • Target runs web applications
  • Testing web servers or APIs
  • Comprehensive assessments required
  • Unknown service landscape

Exploitation Control

boolean
default:"false"
Skip exploitation assessment and Metasploit RC script generationSkipped Functionality:
  • CVE exploitability analysis
  • Metasploit module matching
  • RC script generation for manual exploitation
  • Risk-based exploit prioritization
Use Cases:
  • Read-only security assessments
  • Compliance scans
  • Initial reconnaissance
  • Vulnerability enumeration only
Usage:
Time Savings: 2-5 minutes per scan
Important: Even with --skip-exploit, AutoPentestX still:
  • Performs CVE lookups
  • Calculates risk scores
  • Identifies vulnerabilities
  • Generates comprehensive reports
Only the exploitation assessment phase is skipped.

Version Information

boolean
Display AutoPentestX version number and exitUsage:
Output:

Help Display

boolean
Show help message with all available options and exitUsage:

Option Combinations

Speed-Optimized Scanning

Customized Testing Scenarios

Rationale:
  • Network devices rarely run web applications
  • Exploitation may disrupt network operations
  • Focus on configuration and service hardening

Advanced Usage Patterns

Automated Scanning

Automation Considerations:
  • Use --no-safe-mode to bypass interactive prompts
  • Implement proper authorization checks
  • Add logging and error handling
  • Consider rate limiting between scans
  • Ensure sufficient disk space for reports

CI/CD Integration

Wrapper Script with Options

The autopentestx.sh wrapper script accepts the same options:
Wrapper Script Benefits:
  • Automatic virtual environment handling
  • Enhanced logging to logs/ directory
  • Legal warning display
  • Exit code handling
  • Timestamped log files

Option Summary Table

Environment Variables

AutoPentestX does not currently support environment variable configuration. All options must be specified via command-line flags.
Feature Request: If you need environment variable support for CI/CD integration, please open an issue on the GitHub repository.

Error Handling

Missing Required Argument

Error:

Invalid Option

Error:

Conflicting Options

There are no conflicting options in AutoPentestX. All flags can be combined freely.

Best Practices

  • Always use -n flag for audit trail documentation
  • Start with --skip-exploit in production environments
  • Use --skip-web for non-HTTP services
  • Keep safe mode enabled unless automating
  • Review --help output before complex scans
  • Document authorization for each target

Examples

Real-world command examples

Target Specification

How to specify scan targets

Safe Mode

Understand safety mechanisms

Automation

CI/CD and scripting integration