19.7. 使用 curl 将参数传递给 shellhook 脚本
使用 curl 将参数传递给 shellhook 脚本。
流程
使用
curl执行 shellhook 脚本时,以以下格式创建 HTTP 标头:"X-Shellhook-Arg-1: VALUE" "X-Shellhook-Arg-2: VALUE"
Example
$ curl \
--data "" \
--header "Content-Type: text/plain" \
--header "X-Shellhook-Arg-1: Version 1.0" \
--header "X-Shellhook-Arg-2: My content view" \
--request POST \
--show-error \
--silent \
https://capsule.example.com:9090/shellhook/My_Script