shell命令调用http接口构造测试数据
1、通过浏览器访问目标网页,构造一条数据,f12查看接口发送数据。
2、在一台联网的linux服务器上创建一个myshell.sh文件,将请求头、请求体数据拷贝至该文件,整理一下数据,然后添加shell命令。
for((i=0;i<5;i++))
do
curl -H "accept: application/json, text/plain, */*" \
-H "accept-encoding: gzip, deflate, br" \
-H "accept-language: zh-CN,zh;q=0.9" \
-H "content-type: application/json;charset=UTF-8" \
-H "cookie: token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsIm1ldGhvZCI1cODF36AA9836BE480A452C18641ED709CB" \
-H "origin: https://172.25.52.233:58443" \
-H "referer: https://172.25.52.233:58443/enterprise-apps/" \
-H "sec-ch-ua: 'Google Chrome';v='95', 'Chromium';v='95', ';Not A Brand';v='99'" \
-H "sec-ch-ua-mobile: ?0" \
-H 'sec-ch-ua-platform: "Windows"' \
-H "sec-fetch-