This tool is for authorized security testing only. Use it only against systems you own, or for which you hold explicit written permission to test.
Unauthorized access to computer systems is a criminal offence in most jurisdictions. Being publicly reachable on the internet is not permission. You are solely responsible for obtaining valid authorization and for complying with all applicable laws, contracts, NDAs, and bug bounty program rules.
Provided as is, without warranty of any kind. The author accepts no liability for any damage, loss, or legal consequence arising from use or misuse of this tool.
By using this software you accept the full Disclaimer and Acceptable Use Policy. If you do not agree, do not use it.
Local enumeration + AI-assisted security review for pentesters and bug bounty hunters. Runs on localhost:3000 only — no remote server, no telemetry.
Takes cURL commands, Burp XML exports, HAR files, JS source, or raw HTTP and produces:
- Endpoints, parameters, subdomains, paths
- S3 bucket and cloud resource discovery (AWS / Azure / GCP / Heroku / Vercel / Netlify / Cloudflare / DigitalOcean)
- Hidden / internal URL flagging
- Potential vulnerability sinks (parameter-name and code-pattern based)
- Secret / credential scanning (AWS, GitHub, Slack, Stripe, Twilio, JWT, private keys, DB connection strings, ...)
- GraphQL endpoint + introspection + batching detection
- CORS misconfiguration detection (response-header analysis)
- JWT decoding + alg-confusion / claim-tampering hints
- JS source review snippets (auth flows, weak crypto, dangerous DOM sinks, deserialization, postMessage, etc.)
- Diff against a saved baseline (track attack-surface drift / retesting)
Then optionally sends sanitized findings to Claude for deep review covering:
- OWASP Web Top 10 (2021)
- OWASP API Security Top 10 (2023)
- OWASP LLM Top 10 (2025) — when LLM features are present
- High-confidence CVE / known-vuln matching
- JS source code review
- Bug bounty submission angles + draft titles
-
Domain attribution — every endpoint now carries its host. Output reads
https://api.target.com/api/v1/users (from regex:burp)instead of just/api/v1/users. No more back-referencing the source request manually. -
Aggressive 3-layer JS extraction — replaces the v6.1 string-only matcher.
-
Layer A: explicit HTTP-call patterns —
fetch, allaxios.*methods includingaxios.create({baseURL}), jQuery$.ajax,XMLHttpRequest.open,useFetch,useSWR,ky,got, genericapiUrl/API_BASEconfig keys. -
Layer B: template literals with same-file constant resolution —
fetch(\${API_BASE}/users/${id}`)whereAPI_BASEis defined in the same file gets resolved to the actual URL. Unknown placeholders are kept as{var}` markers for visibility. -
Layer C: bracket-balanced object extraction —
const ROUTES = { getUsers: '/api/v1/users', ... }is fully walked. Catches route maps in config objects that pure regex misses.
-
Layer A: explicit HTTP-call patterns —
-
Logic-based endpoint expansion — pattern-based candidate generation per target type (web / API / mobile / GraphQL / cloud). For every
/api/v1/usersyou give it, you get/api/v1/users/{id},/me,/search,/export,/import,/count,/bulk,/admin/api/v1/users,/api/v2/users,/api/v3/users, etc. Auth-signal-aware (adds/oauth/token,/.well-known/jwks.jsonwhen JWT or auth endpoints detected). GraphQL-signal-aware. Cloud target type adds/actuator/*,/swagger.json,/_next/data/,/.git/config,/server-status, etc. -
Deep JSON URL extraction — recursive walker for nested JSON bodies. Pulls URLs and paths from any depth, including HATEOAS
_links.self.href, OIDC discovery (jwks_uri,token_endpoint,authorization_endpoint), pagination (next,nextPageToken,nextLink), webhooks, callbacks, redirects. Recognizes 40+ URL-named keys plus value-shape detection (https://,s3://,wss://,mongodb://, etc.). -
AI endpoint predictor — separate
/api/predict-endpointsroute. Sends confirmed endpoints + detected hosts + tech-stack hints + target types to Claude with a focused predictor prompt. Returns confidence-tiered Markdown (HIGH / MEDIUM / BRUTEFORCE / CLOUD / GRAPHQL) where every prediction must cite the observed pattern that justifies it. Separate from the main AI analysis call so you control the cost.
- Custom instructions for AI analysis — collapsible textarea in the AI panel (max 2000 chars) that injects tester-specific guidance into every AI call. 11 built-in templates ("focus on IDOR", "stack: laravel", "compliance: pci-dss + hipaa", "output in Hindi", etc.) loadable via dropdown. Custom instructions:
- Are sanitized before sending (matches the findings-sanitization treatment)
- Are included in the cache key so different instructions don't collide on cached results
- Have a precedence rule in the system prompt: they can narrow focus / add stack context / change tone, but cannot disable safety tags, bypass scope guard, or request actual exploitation execution
- Endpoints panel now has three tabs: confirmed / inferred / ai-predicted, each with its own count.
- New "hosts" result section listing all distinct hosts attributed across the scan.
- New "deep json url extraction" section showing what was found in nested JSON bodies (with key path and kind).
- New "graphql operations in js" section listing
gql\...`` tagged-template operations found in JS source. - Target-type checkboxes on the input panel (web / api / mobile / graphql / cloud) drive expansion rules.
- Optional "JS source URL" field — supplying it gives proper host attribution for uploaded JS files.
- Custom instructions textarea with live character counter and template dropdown.
- "predict endpoints (ai)" button alongside the existing "send to claude" button.
- The legacy
endpointsstring list is still emitted alongside the newendpoint_recordsstructured list — exporters (Burp XML, Nuclei templates, wordlists, Markdown report) keep working without changes. - All v6.1 detectors and routes are unchanged.
- Cache key format changed (now includes custom_instructions). After upgrading, first AI call will be a cold call regardless of whether you used the same prompts in v6.1. This is intentional — you don't want to accidentally serve a v6.1-prompt result for a v6.2 scan.
- Fixed broken Claude model name (
claude-opus-4-20250805didn't exist → 404). Nowclaude-haiku-4-5default withclaude-sonnet-4-6andclaude-opus-4-7selectable. - Anthropic SDK pin updated from
0.7.0(years stale) to>=0.40.0. prompts.pyis now actually imported and wired up — was dead code in v6.0.DeduplicationEngineis actually used now (caches AI results).- Subdomain detection uses
tldextract(proper public-suffix-list aware) — fixes multi-level TLDs and stops false-positives on filenames likejquery.min.js. - S3 bucket regex allows dots and validates length (3–63 chars).
- JSON body parser uses
JSONDecoder.raw_decode()(no greedy\{.*\}match), with recursion-depth limit. - Endpoint patterns have word boundaries.
HiddenURLDetectorkeyword list deduplicated.
- Self-XSS in the UI eliminated — frontend uses
textContent/createElementexclusively, neverinnerHTML. - CSRF token on all state-changing routes.
- Strict Content-Security-Policy, plus
X-Frame-Options: DENY,nosniff,Referrer-Policy: no-referrer,Permissions-Policy. MAX_CONTENT_LENGTH = 50 MB(DoS via huge body).- JSON parser depth-limited to 50 levels.
ANTHROPIC_API_KEYenv-var support so the key never touches the form/POST body.
- Vulnerability "detections" reframed as potential sinks with
LOW/MEDIUM/HIGHseverity and explicitnext_stepguidance — no fakeCRITICALflags or invented bounty estimates. - Code-pattern detector added (innerHTML, eval, dangerouslySetInnerHTML, weak crypto, etc.).
- Secret scanning — AWS, GCP, GitHub (
ghp_/gho_/ghu_/ghs_/ghr_), Slack, Stripe, Twilio, SendGrid, Mailgun, JWTs, private keys, DB connection strings. - GraphQL detection — endpoints, introspection queries, batching, mutations, subscriptions.
- CORS misconfiguration —
*+ credentials, null-origin, origin reflection, dev-origin leakage, permissive methods. - JWT analyzer — decode header/payload, flag
alg=none, alg-confusion hints, missingexp, admin-ish claims. - HAR file support — Chrome DevTools / Firefox / Charles export. Synthesizes raw-HTTP shape so all detectors work.
- Burp XML export — push discovered endpoints back into Burp Site Map / Repeater.
- Nuclei template generation — auto-builds basic discovery templates (zipped) plus a specific
graphql-introspectiontemplate when applicable. - Markdown report export — clean report with summary tables, OWASP coverage, AI section, submission scaffold.
- Wordlist generation —
paths.txt,segments.txt,parameters.txt,subdomains.txt,endpoints.txtfor ffuf/wfuzz/dirsearch. - Diff mode — save current scan as baseline, diff next scan against it (find new endpoints, removed surface, etc.).
- Three-tier model routing with dropdown. Default is Haiku (~5× cheaper than Sonnet, ~75× cheaper than Opus). Sonnet for balanced. Opus 4.7 your call when depth matters.
- Prompt caching — the methodology system prompt is marked
cache_control: ephemeral, giving 90% input-token discount on repeat calls inside the cache window. - Local result cache — SHA-256 hash of canonicalized findings + mode + model is stored in SQLite. Repeat runs return cached result instantly. Force-refresh checkbox to override.
- Token-aware truncation —
AI_TRUNCATIONbudgets inconfig.pykeep payload sane on giant scans (50 endpoints, 50 params, 30 subdomains, etc.). - Cost preview button — shows estimated USD before you call.
- Sanitization —
Authorization,Cookie, JWT bodies, AWS/GH/Slack/Stripe tokens redacted before findings leave your machine.
cd pentest_analyzer_v6.2
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtSet your Claude API key (preferred — never travels in form data):
export ANTHROPIC_API_KEY="sk-ant-..."Or paste it in the UI when running. Env var takes precedence.
python3 app.pyOpen http://127.0.0.1:3000. The app binds localhost only and runs with debug=False.
- Paste cURL commands, raw HTTP, or JS source into the textarea — or click Upload to load a Burp XML, HAR, or
.jsfile. Format auto-detected. - Click analyze — local enumeration runs first, results appear in the right panel.
- (Optional) Pick a model and mode, click preview cost to see the bill, then send to claude for AI deep review.
- Use the export buttons to get Burp XML / Nuclei zip / Markdown / wordlists.
- save as baseline stores the current scan in browser local storage; diff vs baseline compares the next scan against it.
- Combined — full review across OWASP Web/API/LLM Top 10, secrets, CORS, JWT, etc.
- JS source review — focused review of code snippets pulled from JS files.
- LLM review — OWASP LLM Top 10 framing (use when you see /chat, /completion, /agent, OpenAI/Anthropic SDK calls, etc.).
- Bug bounty — submission strategy: top issues, draft titles, repro steps, expected payout tier.
Using prompt caching + small typical payload (~5k input tokens after truncation, ~2k output tokens):
| Model | Fresh cost | Cached cost (after first call) |
|---|---|---|
| Haiku 4.5 | ~$0.015 | ~$0.013 |
| Sonnet 4.6 | ~$0.045 | ~$0.040 |
| Opus 4.7 | ~$0.225 | ~$0.200 |
Numbers shift with payload size — the cost preview button shows the actual estimate for your current findings.
- Localhost-only — server binds
127.0.0.1, no remote access. - No telemetry — only outbound network call is to
api.anthropic.com(when you click AI analysis). - Findings sanitization —
Authorization/Cookieheaders, JWT bodies, AWS/GH/Slack/Stripe tokens redacted before sending to Claude. Subdomains, endpoints, parameter names are sent (this is the target's surface, fair game in pentest scope). - Result cache — SQLite file
pentest_cache.dbin working directory. Contains AI responses keyed by hashed findings. Delete the file to wipe. - API key handling — preferred via
ANTHROPIC_API_KEYenv var. UI fallback is supported but key is POSTed to local backend then forwarded to Anthropic. Set the env var when you can.
python3 -m pytest tests/ -vapp.py Main Flask app, routes
config.py Constants, regex patterns, model pricing
prompts.py Claude prompts (system + user templates per mode)
detectors/ Local enumeration logic (basic, vuln_sinks, secrets,
graphql, cors, jwt, js_review)
parsers/ Burp XML, HAR, cURL parsers
ai/ Claude client, sanitizer, cost estimator
exporters/ Burp/Nuclei/Markdown/Wordlist/Diff exporters
cache/ SQLite-backed AI result cache
templates/index.html UI page (Jinja-rendered, CSP-compliant)
static/css/style.css Styles
static/js/app.js Frontend logic (no innerHTML)
tests/ pytest unit tests
Built by Hasan Ali (@hackatwo) — Application Security Engineer and penetration tester.
Issues and pull requests are welcome. For security concerns with this tool itself, please open a GitHub issue.
Authorized use only. Use this tool solely against systems you own or have explicit written permission to test. Verbal or implied permission is not sufficient. Public reachability is not permission.
The tool performs heuristic analysis: it produces false positives and misses real issues. Findings are advisory and require manual verification. Do not rely on its output for compliance, audit, or contractual purposes.
The optional AI review sends data to the Anthropic API using your own API key. Automated redaction of credentials is applied but is best-effort and not guaranteed. Do not submit material you are not authorized to disclose to a third party — if in doubt, run local-only and leave AI analysis disabled.
Provided as is, without warranty of any kind. The author accepts no liability for any damage, loss, or legal consequence arising from use or misuse.
Full terms: DISCLAIMER.md — read this before use.
Released under the MIT License. The MIT License governs copyright permissions only; it does not authorize unlawful use. See DISCLAIMER.md for acceptable use terms.