16.9. 使用 Curl 将参数传递给 Shellhook 脚本
使用 curl 将参数传递给 shellhook 脚本。
流程
使用
curl
执行 shellhook 脚本时,以以下格式创建 HTTP 标头:"X-Shellhook-Arg-1: VALUE" "X-Shellhook-Arg-2: VALUE"
"X-Shellhook-Arg-1: VALUE" "X-Shellhook-Arg-2: VALUE"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
示例
curl -sX POST -H 'Content-Type: text/plain' \ -H "X-Shellhook-Arg-1: Version 1.0" \ -H "X-Shellhook-Arg-2: My Content View" \ --data "" https://capsule.example.com:9090/shellhook/My_Script
# curl -sX POST -H 'Content-Type: text/plain' \
-H "X-Shellhook-Arg-1: Version 1.0" \
-H "X-Shellhook-Arg-2: My Content View" \
--data "" https://capsule.example.com:9090/shellhook/My_Script