Skip to main content
Glama

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  $ pentest ask --query "scan for SQLi and XSS" \         β”‚
β”‚                --target http://localhost:3000 --consent  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚ Direct Python execution
                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            GEMINI-POWERED AGENT (Python)                 β”‚
β”‚                                                          β”‚
β”‚  Phase 1: PLAN    β†’ LLM selects tools from query        β”‚
β”‚  Phase 2: EXECUTE β†’ Runs tools, collects findings       β”‚
β”‚  Phase 3: REPORT  β†’ LLM generates professional report   β”‚
β”‚                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Session    β”‚  β”‚  Scan Mode   β”‚  β”‚   Tool         β”‚  β”‚
β”‚  β”‚   Manager    β”‚  β”‚  Orchestratorβ”‚  β”‚   Registry     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                          β”‚                               β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚         β–Ό                β–Ό                β–Ό              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚   nmap     β”‚  β”‚   sqlmap   β”‚  β”‚   ffuf         β”‚     β”‚
β”‚  β”‚   nuclei   β”‚  β”‚   dalfox   β”‚  β”‚   nikto        β”‚     β”‚
β”‚  β”‚   sslyze   β”‚  β”‚   commix   β”‚  β”‚   gobuster     β”‚     β”‚
β”‚  β”‚   wafw00f  β”‚  β”‚   arjun    β”‚  β”‚   subfinder    β”‚     β”‚
β”‚  β”‚   ... 30+  β”‚  β”‚   ...      β”‚  β”‚   ...          β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                          β”‚                               β”‚
β”‚                          β–Ό                               β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”‚
β”‚              β”‚    GEMINI API        β”‚                    β”‚
β”‚              β”‚  (Flash Lite)       β”‚                    β”‚
β”‚              β”‚  Triage Β· Analysis  β”‚                    β”‚
β”‚              β”‚  CVSS Β· Reporting   β”‚                    β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ Features

Feature

Description

Natural Language Interface

Ask security questions in plain English β€” AI selects and runs appropriate tools

3 Scan Modes

Quick (5-10 min), Medium (15-30 min), Extensive (45+ min) β€” each with distinct depth and AI analysis

30+ Security Tools

nmap, sqlmap, nuclei, ffuf, dalfox, nikto, wafw00f, subfinder, sslyze, and more

AI-Powered Analysis

Gemini AI (Flash Lite) performs vulnerability triage, CVSS scoring, and generates executive reports

Automated Tool Selection

pentest ask command for LLM-driven tool planning and execution

Session Management

Track, pause, and resume security assessments across multiple targets

OWASP Top 10 Coverage

Systematic scanning mapped to OWASP 2021 categories

Smart Fallbacks

If a professional tool isn't installed, Python-native implementations fill the gap

πŸ“‹ Table of Contents

πŸš€ Quick Start

Prerequisites

1. Clone & Install

git clone https://github.com/yourusername/pentest-ai-cli
cd pentest-ai-cli

# Install dependencies
uv sync

2. Configure Environment

cp .env.example .env

Edit .env and add your Gemini API key:

GEMINI_API_KEY=your_gemini_api_key_here

3. Install Security Tools (Optional)

The server works with Python-native fallbacks, but for professional-grade scanning, install the external tools:

# macOS (Homebrew)
brew install nmap sqlmap

# Install ffuf (Go-based fuzzer)
go install github.com/ffuf/ffuf/v2@latest

# Install nuclei (vulnerability scanner)
go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest

# Install subfinder (subdomain discovery)
go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest

Tip: Run session_init to see which tools are detected on your system.

4. Start Scanning!

pentest ask \
  --query "run a quick security scan" \
  --target https://example.com \
  --consent

🎯 Scan Modes

Quick Mode (5-10 minutes)

Fast triage for immediate risk assessment.

Test

Tool

WAF Detection

wafw00f / custom

DNS Enumeration

dnsrecon / custom

Port Scan (top 20)

nmap / custom

Header Analysis

custom

TLS/SSL Audit

sslyze / custom

Tech Fingerprinting

whatweb / custom

Sensitive File Discovery

ffuf / custom

Medium Mode (15-30 minutes)

Standard penetration test covering OWASP Top 10.

Test

Tool

Everything in Quick

β€”

Port Scan (top 100)

nmap

XSS Scanning

dalfox / custom

SQL Injection

sqlmap

Directory Discovery

ffuf / gobuster

CORS Misconfiguration

corscanner / custom

Path Traversal

custom

Open Redirect

custom

CSRF Checks

custom

Extensive Mode (45+ minutes)

Board-level comprehensive security assessment.

Test

Tool

Everything in Medium

β€”

Port Scan (top 1000)

nmap / masscan

Subdomain Enumeration

subfinder / amass

Advanced Fuzzing

wfuzz / ffuf

SSRF Probing

custom

Secret Scanning

trufflehog

Git Exposure

git-dumper

JWT Analysis

jwt_tool

GraphQL Security

graphql-cop

Command Injection

commix

πŸ”§ Supported Tools

The server integrates 30+ security tools with automatic detection. If a tool isn't installed, Python-native fallbacks ensure the scan still runs.

Tool

Category

Required

nmap

Port scanning

Optional (has fallback)

sqlmap

SQL injection

Optional

ffuf

Fuzzing / file discovery

Optional (has fallback)

nuclei

Vulnerability scanning

Optional

dalfox

XSS scanning

Optional

subfinder

Subdomain discovery

Optional

wafw00f

WAF detection

Optional (has fallback)

sslyze

TLS/SSL audit

Optional (has fallback)

nikto

Web server scanning

Optional

gobuster

Directory brute-forcing

Optional

whatweb

Tech fingerprinting

Optional (has fallback)

wfuzz

Advanced fuzzing

Optional

arjun

Hidden parameter discovery

Optional

testssl

SSL/TLS testing

Optional

masscan

Fast port scanning

Optional

amass

OSINT / subdomain enum

Optional

dnsrecon

DNS enumeration

Optional (has fallback)

theHarvester

Email/domain OSINT

Optional

retire.js

JS library CVE scanning

Optional

trufflehog

Secret detection

Optional

git-dumper

Git repo exposure

Optional

commix

Command injection

Optional

corscanner

CORS misconfiguration

Optional (has fallback)

jwt_tool

JWT analysis

Optional

graphql-cop

GraphQL security

Optional

xsstrike

Advanced XSS

Optional

hydra

Brute-forcing

Optional

shodan

Internet intelligence

Optional

enum4linux-ng

SMB enumeration

Optional

πŸ’¬ Usage Examples

The pentest ask command uses Gemini AI to automatically plan and execute security scans based on natural language queries.

Quick vulnerability scan

pentest ask \
  --query "scan for SQL injection and XSS vulnerabilities" \
  --target http://localhost:3000 \
  --consent

Full OWASP Top 10 audit

pentest ask \
  --query "perform a comprehensive OWASP Top 10 security audit" \
  --target https://example.com \
  --consent

Reconnaissance only

pentest ask \
  --query "enumerate subdomains and check for exposed sensitive files" \
  --target example.com \
  --consent

Custom report path

pentest ask \
  --query "check security headers and TLS configuration" \
  --target https://example.com \
  --consent \
  --output security-audit-2024.md

πŸ“– Full Documentation: See CLI_USAGE_GUIDE.md for detailed usage guide, examples, and troubleshooting.

πŸ“ Project Structure

pentest-ai/
β”œβ”€β”€ pentest_mcp/
β”‚   β”œβ”€β”€ scan_modes.py          # Quick/Medium/Extensive scan orchestration
β”‚   β”œβ”€β”€ agent.py               # Standalone CLI orchestrator
β”‚   β”œβ”€β”€ session.py             # Session state management
β”‚   β”œβ”€β”€ models.py              # Pydantic data models
β”‚   β”œβ”€β”€ config.py              # Environment & settings
β”‚   β”œβ”€β”€ cli.py                 # CLI interface (includes "ask" command)
β”‚   β”œβ”€β”€ cli_ui.py              # Beautiful CLI UI components
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ __init__.py        # Python-native security tools
β”‚   β”‚   β”œβ”€β”€ professional.py    # External tool wrappers (nmap, sqlmap, etc.)
β”‚   β”‚   └── tool_registry.py   # Tool execution and result processing
β”‚   └── utils/
β”‚       └── sanitizer.py       # Input validation & sanitization
β”œβ”€β”€ tests/
β”‚   └── test_system.py         # System tests
β”œβ”€β”€ wordlists/                 # Fuzzing wordlists for ffuf/gobuster
β”œβ”€β”€ reports/                   # Generated scan reports (Markdown)
β”œβ”€β”€ CLI_USAGE_GUIDE.md         # Example prompts and detailed usage guide
β”œβ”€β”€ pyproject.toml             # Project dependencies & metadata
β”œβ”€β”€ Makefile                   # Development shortcuts
β”œβ”€β”€ install_tools.sh           # Security tool installer script
└── .env.example               # Environment variable template

βš™οΈ Configuration

Environment Variables

Variable

Description

Default

GEMINI_API_KEY

Your Gemini API key

Required

GEMINI_MODEL

LLM model for analysis

gemini-flash-lite-latest

GEMINI_MAX_TOKENS

Max response tokens

8192

GEMINI_TEMPERATURE

LLM temperature

0.2

SESSION_DIR

Session storage path

~/.pentest-ai/sessions

LOG_LEVEL

Logging verbosity

INFO

AGENT_MAX_TOOLS

Max tools per pentest ask run

10

AI Analysis Pipeline

Each scan mode uses distinct Gemini AI prompts calibrated to the scan depth:

  • Quick: Concise triage β€” focuses only on critical/high severity findings

  • Medium: OWASP Top 10 analysis with balanced risk assessment and remediation

  • Extensive: Board-level executive summary with exhaustive CVSS-scored findings, compliance mapping, and strategic recommendations

πŸ” Troubleshooting

Read-only file system Error

Reports are saved to <project_root>/reports/. Ensure the project directory is writable.

Gemini API Errors

  • Verify your API key: echo $GEMINI_API_KEY

  • Check rate limits at aistudio.google.com

  • The server continues scanning even if Gemini is unavailable β€” raw tool output is still returned

Tools Not Detected

Install missing tools via Homebrew or your package manager. Python fallbacks cover core functionality even without external tools.

⚠️ Security Notice

This tool is for authorized security testing only.

  • Always obtain explicit written permission before scanning any target

  • Unauthorized testing violates the Computer Fraud and Abuse Act (CFAA), IT Act 2000/2008, and similar laws worldwide

  • The consent_confirmed parameter exists as an ethical safeguard β€” never bypass it

  • Never commit API keys to version control

πŸ“ License

See LICENSE for details.


-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MohitSahoo/MCPToolForWebVulnerabilities-'

If you have feedback or need assistance with the MCP directory API, please join our Discord server