Pentest Script Generator logo

Pentest Script Generator

Community
ptn1411
pentest-script-generator

Auto-generate professional pentest scripts and verify scripts from Strix vulnerability reports (vuln-XXXX.md) or raw vulnerability descriptions. Use when given a vuln-XXXX.md file, pasted HTTP request from Burp Suite, or asked to write pentest script, verify script, test script for a vulnerability. Outputs pentest_TYPE_vulnXXXX.py (TC-01..TC-N, cleanup, evidence saving, JSON export) and verify_vulnXXXX.py (exit 0/1/2).

Overview

Publisherptn1411
Repositoryskill
Skill namepentest-script-generator
Stars
275
Forks
133
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ptn1411 on GitHub. Read the source before you install it.

Installation

Install the Pentest Script Generator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ptn1411/skill/tree/main/antigravity-kit/pentest-script-generator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ptn1411/skill.git /tmp/skill
mkdir -p .claude/skills
cp -r /tmp/skill/antigravity-kit/pentest-script-generator .claude/skills/pentest-script-generator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pentest Script Generator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pentest Script Generator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pentest Script Generator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Pentest Script Generator

Generate professional Python pentest scripts from Strix vuln reports or raw vulnerability descriptions.

Language rule: All skill instructions and generated script code use English. Final summary presented to the user must be in Vietnamese.

🔧 Runtime Scripts

ScriptPurposeUsage
scripts/generate.pyGenerate scripts from vuln-XXXX.mdpython scripts/generate.py vuln-0001.md

📋 Reference Files

FilePurpose
references/pentest_template.pyFull pentest script template
references/verify_template.pyVerify script template
references/vuln_types.mdVulnerability type → test pattern mapping

1. Strix vuln-XXXX.md Schema

Parse these fields from the report:

FieldRequiredNotes
**ID:**✅vuln-XXXX → script filename
**Severity:**✅CRITICAL/HIGH/MEDIUM/LOW
**Target:**✅Base URL → DEFAULT_BASE_URL
**Endpoint:**OptionalExtract from Technical Analysis if missing
**Method:**OptionalExtract from PoC if missing
**CWE:**OptionalAdd to script header
**CVSS:**✅Add to script header
PoC poc_script_code✅Always present — primary source for test logic

2. Vulnerability Type Detection

Authorization / Access Control

TypeTrigger KeywordsTC Pattern
BFLAadmin endpoint, non-admin, BFLALow-priv token → admin route
IDOR/BOLAcross-user, user_id param, order idSwap resource ID
Unauth APIunauthenticated, no auth requiredRequest without token
Supabase RLSanon apikey, PostgREST, RLS bypassREST with anon key

Business Logic

TypeTrigger KeywordsTC Pattern
Price Tamperingprice tampering, client-side pricePOST price=1
Payment Bypasspayment bypass, free licenseSkip payment step
Negative Totalnegative total, wallet creditSend negative amount
Rate Limit BypassX-Forwarded-For, IP spoofingRotate header IPs

Injection / XSS

TypeTrigger KeywordsTC Pattern
Stored XSSstored xss, innerHTMLUpload + fetch + verify
DOM XSSDOM-based, url paramPlaywright verify
Reflected XSSreflected xss, POST bodyParam with payload
SQLiSQL injection, remember_tokenSQLi payload in cookie/param

SSRF

TypeTrigger KeywordsTC Pattern
Blind SSRFblind SSRF, OAST, webhookOAST domain callback
SSRF IMDScloud metadata, 169.254http://169.254.169.254/
SSRF Internalinternal network127.0.0.1 variants

Account Takeover

TypeTrigger KeywordsTC Pattern
Password Reset Leakplaintext password in responsePOST forgot → check field
Token Not Revokedtoken valid after logoutLogout → replay old token
Session FixationPHPSESSID not rotatedPre/post login session compare
OTP DisclosedOTP in responsePOST forgot → check OTP field

Information Disclosure

TypeTrigger KeywordsTC Pattern
Source Mapsourcemap, sourcesContentGET .js.map
Laravel DebugLaravel debug, IgnitionGET with Accept: text/html
Vite Dev ServerVite, /@fsGET /@vite/client
Backup Archive.zip, .sql dumpGET /backup.zip

CORS / Session

TypeTrigger KeywordsTC Pattern
CORS Arbitrary Originarbitrary origin, CORSOrigin: evil.com → check ACAO
Cookie Missing Securemissing Secure flagHTTP request → check Set-Cookie

3. Auth Detection

PoC SignalAuth TypeScript Pattern
Bearer eyJ...JWTPOST /login → access_token
apikey= or x-api-keyAPI KeyFrom config/env
Supabase anon keySupabaseFrom JS bundle
PHPSESSID cookiePHP sessionLogin form → cookie
recaptchaToken: ""reCAPTCHA bypassEmpty string
No token neededUnauthenticatedNo header

4. Test Case Structure

Every pentest script must follow this TC structure:

TC-01: Setup / Get auth token (if needed)
TC-02: Baseline — confirm endpoint works normally
TC-03: Core exploit attempt
TC-04: (Optional) Variation / escalation
TC-05: Control — confirm protected endpoint still enforces
TC-NN: Cleanup — delete/cancel created test data

Verdict Logic

HTTP ResponseVerdict
Expected protected (401/403) → got 200 with dataVULNERABLE
Got 401/403 as expectedSAFE
Network/parsing errorERROR
Test skipped (dry-run)SKIPPED

5. Evidence Saving

Every script must save evidence when vulnerabilities are found:

python
def _save_evidence(data: list[dict], vuln_id: str, label: str, output_dir: str = "."):
    from pathlib import Path
    import csv

    ev_dir = Path(output_dir) / "evidence"
    ev_dir.mkdir(parents=True, exist_ok=True)
    ts = datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")

    # JSON
    json_path = ev_dir / f"{vuln_id}_{label}_{ts}.json"
    with open(json_path, "w", encoding="utf-8") as f:
        json.dump(data, f, indent=2, ensure_ascii=False, default=str)

    # CSV (if list of dicts)
    if data and isinstance(data[0], dict):
        csv_path = ev_dir / f"{vuln_id}_{label}_{ts}.csv"
        with open(csv_path, "w", newline="", encoding="utf-8") as f:
            w = csv.DictWriter(f, fieldnames=data[0].keys())
            w.writeheader(); w.writerows(data)

    print(f"  💾 Evidence: {json_path}")

6. File Naming Convention

Vuln TypePrefixOutput Files
BFLAbflapentest_bfla_vuln0001.py
IDORidorpentest_idor_vuln0001.py
Unauth APIunauthpentest_unauth_vuln0001.py
Stored XSSxss_storedpentest_xss_stored_vuln0001.py
DOM XSSxss_dom
Reflected XSSxss_reflected
SSRFssrf
Business Logicbizlogic
Account Takeoverato
CORScors
SQL Injectionsqli
Info Disclosureinfodisclosure
Rate Limitratelimit
Session/Cookiesession
Supabasesupabase
Infrastructureinfra

Save to: vulnerabilities/ subfolder of the project.


7. Verify Script Rules

verify_vulnXXXX.py must be:

  • Minimal: 1–3 HTTP requests max
  • Fast: Complete in < 10 seconds
  • Exit codes: 0 = SAFE, 1 = VULNERABLE, 2 = ERROR
  • No dependencies beyond requests

8. Workflow

1. READ   → Parse vuln-XXXX.md (or description/HTTP request)
2. DETECT → Identify vuln type from keywords
3. AUTH   → Identify auth mechanism from PoC
4. WRITE  → Generate pentest_TYPE_vulnXXXX.py
            - Header with metadata
            - Verdict/TestResult classes
            - TC-01..TC-N methods
            - _save_evidence() helper
            - _summary() and _export() helpers
            - main() with argparse (--base-url, --dry-run, --output-dir)
5. WRITE  → Generate verify_vulnXXXX.py (minimal, exit 0/1/2)
6. REPORT → Present final summary to user IN VIETNAMESE

9. Output Summary (always in Vietnamese)

After generating both files, present to user in Vietnamese:

✅ Đã tạo xong cho vuln-XXXX (<tiêu đề>):

  📄 vulnerabilities/vuln-XXXX.md               (Severity: X, CVSS: Y)
  🐍 vulnerabilities/pentest_TYPE_vulnXXXX.py   (N test cases)
  ⚡ vulnerabilities/verify_vulnXXXX.py          (quick verify, exit 0/1/2)

▶  Cách chạy:
   python vulnerabilities/pentest_TYPE_vulnXXXX.py --base-url https://target.com
   python vulnerabilities/verify_vulnXXXX.py --base-url https://target.com

📋 Tóm tắt:
   - Loại lỗ hổng : <TYPE>
   - Auth mechanism: <auth type>
   - Số test cases : N
   - Cleanup       : ✅ included

Anti-Patterns

❌ Don't✅ Do
Hardcode credentials in scriptUse argparse + env vars
Skip cleanup TCAlways add cleanup as last TC
Claim vuln without HTTP evidenceLog status_code + response preview
Use requests.get without timeoutAlways timeout=15
Skip dry-run modeAlways support --dry-run flag
Generate script without verify scriptAlways generate both

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pentest Script Generator AI skill do?

Auto-generate professional pentest scripts and verify scripts from Strix vulnerability reports (vuln-XXXX.md) or raw vulnerability descriptions. Use when given a vuln-XXXX.md file, pasted HTTP request from Burp Suite, or asked to write pentest script, verify script, test script for a vulnerability. Outputs pentest_TYPE_vulnXXXX.py (TC-01..TC-N, cleanup, evidence saving, JSON export) and verify_vulnXXXX.py (exit 0/1/2).

Why use Pentest Script Generator on TypingMind?

Because you install it once and use it with any model. Pentest Script Generator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pentest Script Generator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ptn1411/skill/tree/main/antigravity-kit/pentest-script-generator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pentest Script Generator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pentest Script Generator?

As many as you like. As long as a model supports skills, you can use Pentest Script Generator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pentest Script Generator AI skill free?

It is published on GitHub by ptn1411. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇