Cross-Site Request Forgery (CSRF) Proof-of-Concept generator in a single index.php file.
Rebuilt with a modern dark glassmorphism UI by 0xfndlabs.
⚠️ For authorized security testing only. Use it on targets you own or have written authorization to test. Misuse outside that context is illegal and the user's responsibility.
- Dynamic Request Builder — add/remove fields, file fields, and custom headers rows without limit.
- Method:
POST,GET,PUT,PATCH,DELETE. - Content-Type:
multipart/form-data,application/x-www-form-urlencoded,application/json. - Two PoC modes (auto-selected):
- Classic form — plain HTML
form(auto-submit capable), most reliable for cross-origin CSRF because it is not restricted by CORS. - Fetch/FormData — used automatically when custom headers exist, Content-Type is
JSON, or the method isPUT/PATCH/DELETE; sends cookies viacredentials: include.
- Classic form — plain HTML
- Options:
- Auto-submit on load (no file)
- Auto-submit when file is selected (onchange)
- Open in: new tab / same tab (classic form)
- Result: PoC opens in a new tab automatically (via AJAX, no reload), plus Download .html, Copy HTML, and HTML Source buttons.
- Input security: all output is
htmlspecialchars-escaped, URL validated ashttp/httpsonly, method/enctype/target whitelisted (free of XSS & open redirect).
Requirements: PHP ≥ 7 (with built-in filter & json extensions).
# via PHP built-in server
php -S 0.0.0.0:8080
# then open
# http://localhost:8080Or drop index.php into any PHP hosting / web root.
- Fill in URL Target (must be
http(s)://). - Pick the Method and Content-Type.
- Add Fields — body/query parameters (name + value).
- Add Upload Fields — file field names matching the target (e.g.
file,Filedata,file[]). - Optionally set Custom Headers, and toggle auto-submit behavior.
- Click Generate PoC.
Generate PoC ──▶ (AJAX, no reload) ──▶ new tab with the PoC
│
└─ auto-submit ON? ──▶ confirm first before the tab fires
If the browser blocks the popup, use the "Open in new tab" button in the result card (a real click is allowed by the browser), or Download .html to save it.
| Scenario | Method | Content-Type | Fields | Upload Fields |
|---|---|---|---|---|
| File upload + token | POST | multipart | token=abc123 |
file |
| Login form | POST | urlencoded | user, pass |
– |
| Fetch-like XHR (token etc.) | POST | json | {"name":"x"} |
– |
| Query API | GET | urlencoded | q=foo |
– |
| REST + custom header | PUT | json | data |
– |
| Part | Description |
|---|---|
valid_url() |
Validates http/https scheme; rejects javascript: etc. |
po_classic() |
Classic form PoC generator. |
po_fetch() |
Fetch/FormData PoC generator. |
poc_style() |
Glassmorphism theme for generated PoC pages. |
AJAX ajax=1 |
Server responds with JSON {ok, poc, method, enctype, auto, autoChange}. |
| Sanitization | htmlspecialchars(..., ENT_QUOTES) on every echoed user input. |
- Origin/Referer cannot be set — those are forbidden headers in browsers.
- Cross-origin fetch requires CORS; classic form mode does not.
- File inputs cannot be pre-filled — users must select the file (browser security policy); use auto-submit when file is selected.
- File field names must match the target parameter (e.g. PHP
$_FILES['file']⇄ fieldfile).
- PHP (no dependencies/Composer) — logic & PoC generation.
- Pure CSS (no Bootstrap/jQuery) — glassmorphism, responsive.
- Vanilla JS — dynamic builder & AJAX generation.
Developed by 0xfndlabs.