> ## 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.

# Quickstart

> Get started with AutoPentestX in minutes. Learn the essential commands and workflows for your first penetration test.

## Your First Scan

This guide will walk you through running your first security assessment with AutoPentestX.

<Warning>
  **CRITICAL**: Only scan systems you own or have explicit written authorization to test. Unauthorized scanning is illegal.
</Warning>

## Quick Start Sequence

<Steps>
  <Step title="Enter the Project Directory">
    Navigate to the AutoPentestX installation:

    ```bash theme={null}
    cd AutoPentestX
    ```
  </Step>

  <Step title="Activate Virtual Environment">
    Activate the Python virtual environment:

    ```bash theme={null}
    source venv/bin/activate
    ```

    You should see `(venv)` in your terminal prompt.
  </Step>

  <Step title="Launch Your First Scan">
    Run a basic scan on localhost (safe for testing):

    ```bash theme={null}
    python3 main.py -t 127.0.0.1 --skip-web --skip-exploit
    ```

    This performs a quick reconnaissance scan without web testing or exploitation.
  </Step>

  <Step title="Review the Results">
    When the scan completes, check the generated report:

    ```bash theme={null}
    # List reports
    ls -lh reports/

    # Open the PDF report
    xdg-open reports/AutoPentestX_Report_*.pdf
    ```
  </Step>
</Steps>

## Command Reference

### Basic Usage

```bash theme={null}
python3 main.py -t <target> [options]
```

### Essential Options

| Option              | Description                        | Example            |
| ------------------- | ---------------------------------- | ------------------ |
| `-t, --target`      | Target IP or domain **(required)** | `-t 192.168.1.100` |
| `-n, --tester-name` | Your name for the report           | `-n "John Doe"`    |
| `--skip-web`        | Skip Nikto and SQLMap scans        | `--skip-web`       |
| `--skip-exploit`    | Skip exploitation phase            | `--skip-exploit`   |
| `--no-safe-mode`    | Disable safety protections         | `--no-safe-mode`   |
| `--help`            | Show help message                  | `--help`           |
| `--version`         | Show version info                  | `--version`        |

## Common Scanning Scenarios

<CodeGroup>
  ```bash Full Assessment theme={null}
  # Complete penetration test with all modules
  python3 main.py -t 192.168.1.100
  ```

  ```bash Quick Recon theme={null}
  # Fast network scan only (5-10 minutes)
  python3 main.py -t 192.168.1.100 --skip-web --skip-exploit
  ```

  ```bash Web Testing theme={null}
  # Network scan + web vulnerabilities (10-20 minutes)
  python3 main.py -t 192.168.1.100 --skip-exploit
  ```

  ```bash Custom Operator theme={null}
  # Set custom tester name in report
  python3 main.py -t 192.168.1.100 -n "Security Auditor"
  ```

  ```bash Using Wrapper Script theme={null}
  # Alternative: use the convenience wrapper
  ./autopentestx.sh 192.168.1.100
  ```
</CodeGroup>

## Scan Modes Explained

### Mode 1: Lightning Strike (5-10 min)

**Use case**: Quick reconnaissance for initial assessment

```bash theme={null}
python3 main.py -t TARGET --skip-web --skip-exploit
```

<Note>
  **Performs**: Port scanning, service detection, OS fingerprinting\
  **Skips**: Web testing, SQL injection, exploitation\
  **Best for**: Rapid network mapping, time-sensitive assessments
</Note>

### Mode 2: Tactical Assault (10-20 min)

**Use case**: Standard vulnerability assessment without exploitation

```bash theme={null}
python3 main.py -t TARGET --skip-exploit
```

<Note>
  **Performs**: Full network scan, Nikto web testing, SQLMap injection testing, CVE lookup\
  **Skips**: Exploit simulation\
  **Best for**: Vulnerability discovery, compliance scanning
</Note>

### Mode 3: Total Assessment (20-30+ min)

**Use case**: Complete penetration test with exploit matching

```bash theme={null}
python3 main.py -t TARGET
```

<Note>
  **Performs**: All scanning + Metasploit exploit matching and RC script generation\
  **Skips**: Nothing (full assessment)\
  **Best for**: Comprehensive security audits, red team exercises
</Note>

## Understanding the Output

AutoPentestX creates multiple outputs during each scan:

### Console Output

The tool displays real-time progress through 7 phases:

```bash theme={null}
╔══════════════════════════════════════════════════════════════════╗
║ [PHASE 1] ▶ Initializing attack sequence...                     ║
╚══════════════════════════════════════════════════════════════════╝
[✓] Mission ID: 1 | Status: ACTIVE

╔══════════════════════════════════════════════════════════════════╗
║ [PHASE 2] ▶ Network reconnaissance in progress...               ║
╚══════════════════════════════════════════════════════════════════╝
```

### Final Summary

When complete, you'll see a mission summary:

```bash theme={null}
╔══════════════════════════════════════════════════════════════════╗
║ [OPERATION SUMMARY]                                              ║
╠══════════════════════════════════════════════════════════════════╣
║ ► Target: 192.168.1.100
║ ► Mission ID: 1
║ ► Duration: 847.23s (14.12 min)
║ ► Open Ports: 5
║ ► Total Vulnerabilities: 12
║ ► Overall Risk Level: HIGH
╚══════════════════════════════════════════════════════════════════╝
```

### Generated Files

<CardGroup cols={2}>
  <Card title="PDF Report" icon="file-pdf">
    **Location**: `reports/AutoPentestX_Report_<timestamp>.pdf`

    Professional report with:

    * Executive summary
    * Vulnerability details
    * Risk assessment
    * Remediation steps
  </Card>

  <Card title="SQLite Database" icon="database">
    **Location**: `database/autopentestx.db`

    Complete scan data:

    * Scan history
    * Port information
    * Vulnerability records
    * Exploit attempts
  </Card>

  <Card title="Execution Logs" icon="file-lines">
    **Location**: `logs/`

    Detailed logs:

    * Scan timestamps
    * Tool output
    * Error messages
    * Debug traces
  </Card>

  <Card title="Exploit Scripts" icon="code">
    **Location**: `exploits/`

    Metasploit RC files:

    * Matched exploits
    * Attack vectors
    * Manual testing scripts
  </Card>
</CardGroup>

## Accessing Report Data

### View PDF Report

```bash theme={null}
# List all reports
ls reports/

# Open latest report (Linux)
xdg-open reports/AutoPentestX_Report_*.pdf
```

### Query Database

```bash theme={null}
# Open database
sqlite3 database/autopentestx.db

# View all scans
SELECT * FROM scans;

# View vulnerabilities from latest scan
SELECT * FROM vulnerabilities WHERE scan_id = 1;

# Exit
.quit
```

### Check Logs

```bash theme={null}
# List log files
ls logs/

# View latest log
tail -f logs/*.log
```

## Example Workflow

Here's a complete operation from start to finish:

<Steps>
  <Step title="Prepare">
    ```bash theme={null}
    cd AutoPentestX
    source venv/bin/activate
    ```
  </Step>

  <Step title="Execute Scan">
    ```bash theme={null}
    python3 main.py -t 192.168.1.100 -n "Security Team"
    ```

    You'll be prompted to confirm authorization:

    ```
    > Do you have authorization to test this target? (yes/no): yes
    ```
  </Step>

  <Step title="Monitor Progress">
    Watch the 7 phases execute:

    * Phase 1: Initialization
    * Phase 2: Network Reconnaissance
    * Phase 3: Vulnerability Analysis
    * Phase 4: CVE Intelligence
    * Phase 5: Risk Assessment
    * Phase 6: Exploit Simulation
    * Phase 7: Report Generation
  </Step>

  <Step title="Review Results">
    ```bash theme={null}
    # Open the PDF report
    xdg-open reports/AutoPentestX_Report_*.pdf

    # Query specific data
    sqlite3 database/autopentestx.db "SELECT * FROM scans;"
    ```
  </Step>

  <Step title="Clean Up">
    ```bash theme={null}
    # Deactivate virtual environment
    deactivate
    ```
  </Step>
</Steps>

## Troubleshooting

### Permission Errors

Many scanning operations require root privileges:

```bash theme={null}
# Run with sudo
sudo python3 main.py -t TARGET
```

<Warning>
  When using sudo, make sure to activate the virtual environment first, or use the full path to the Python interpreter in the venv.
</Warning>

### Virtual Environment Not Activated

If you see module import errors:

```bash theme={null}
# Activate the environment
source venv/bin/activate

# Verify activation (should show venv path)
which python3

# Reinstall if needed
pip install -r requirements.txt
```

### Missing Tools

If Nmap, Nikto, or SQLMap are not found:

```bash theme={null}
# Verify tools are installed
which nmap nikto sqlmap

# Reinstall missing tools
sudo apt-get install nmap nikto sqlmap
```

### Report Generation Failed

If PDF generation fails:

```bash theme={null}
# Upgrade reportlab
pip install --upgrade reportlab pillow

# Verify installation
python3 -c "from reportlab.lib.pagesizes import letter; print('OK')"
```

### Metasploit Errors

If you see Metasploit-related errors:

```bash theme={null}
# Skip exploitation if Metasploit not installed
python3 main.py -t TARGET --skip-exploit
```

## Best Practices

<CardGroup cols={2}>
  <Card title="Before Scanning" icon="clipboard-check">
    ✅ Obtain written authorization\
    ✅ Document the scope\
    ✅ Verify target IP/domain\
    ✅ Read legal disclaimers
  </Card>

  <Card title="During Scanning" icon="gauge-high">
    ✅ Monitor progress\
    ✅ Be aware of network impact\
    ✅ Respect time windows\
    ✅ Keep logs for documentation
  </Card>

  <Card title="After Scanning" icon="file-circle-check">
    ✅ Review PDF report thoroughly\
    ✅ Validate findings\
    ✅ Share with authorized parties only\
    ✅ Follow up on remediation
  </Card>

  <Card title="Security" icon="shield-halved">
    ✅ Store reports securely\
    ✅ Don't share credentials\
    ✅ Use safe mode by default\
    ✅ Report responsibly
  </Card>
</CardGroup>

## Quick Reference Cheatsheet

```bash theme={null}
# ┌──────────────────────────────────────────────────────┐
# │ AutoPentestX Quick Commands                          │
# └──────────────────────────────────────────────────────┘

# Full scan
python3 main.py -t <target>

# Quick recon
python3 main.py -t <target> --skip-web --skip-exploit

# Custom tester name
python3 main.py -t <target> -n "Your Name"

# View reports
ls reports/

# Query database
sqlite3 database/autopentestx.db "SELECT * FROM scans;"

# Help
python3 main.py --help
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Advanced Configuration" icon="sliders">
    Learn about custom scan profiles and advanced options
  </Card>

  <Card title="Interpreting Results" icon="chart-line">
    Understand risk scores, CVSS ratings, and remediation priorities
  </Card>

  <Card title="Metasploit Integration" icon="bomb">
    Use generated RC scripts for manual exploitation testing
  </Card>

  <Card title="CI/CD Integration" icon="code-branch">
    Automate security testing in your development pipeline
  </Card>
</CardGroup>

<Warning>
  **Remember**: AutoPentestX is a powerful tool. Always:

  * Get authorization before testing
  * Use safe mode by default
  * Handle data responsibly
  * Follow responsible disclosure practices
</Warning>
