标题: curl 无限循环发包post (windows 批处理goto) [打印本页]
作者: 依山居 时间: 2015-10-11 05:32 标题: curl 无限循环发包post (windows 批处理goto)
本帖最后由 依山居 于 2015-10-11 05:33 编辑
curl 无限循环发包post (windows 批处理goto)
http://my.oschina.net/ysj/blog/515407
windows 下安装软件包管理器chocolatey,主要是为了用方便安装curl,wget等各种软件。
CMD中输入以下命令安装chocolatey:- c:\@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
复制代码
一行命令安装curl:复制代码
fiddler中有导出会话为各种脚本的,其中第一项就是curl script,存为XX.BAT,打开后得到以下一行命令:- curl -k -i --raw -o 0.dat -X POST -d "keyword=%%E6%%88%%91%%E6%%98%%AF%%E5%%B9%%BF%%E5%%91%%8A7" "http://ourcoders.com/log/sitesearch/" -H "Host: ourcoders.com" -H "Connection: keep-alive" -H "Accept: application/json, text/javascript, */*; q=0.01" -H "Origin: [url]http://ourcoders.com[/url]" -H "X-Requested-With: XMLHttpRequest" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "DNT: 1" -H "Referer: [url]http://ourcoders.com/search/[/url]" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: zh-CN,zh;q=0.8,en;q=0.6" -H "Cookie: PHPSESSID=9dnlvb603u0mrbud7du0m0kjt1; TINY4COCOA_USERID=33982; TINY4COCOA_SESSION=ef9be61c3c5b8b9ed0e76d13a8c804ff"
复制代码
改一下,加上goto就可以实现循环了:- :g
-
- curl -k -i --raw -o 0.dat -X POST -d "keyword=%%E6%%88%%91%%E6%%98%%AF%%E5%%B9%%BF%%E5%%91%%8A7" "http://ourcoders.com/log/sitesearch/" -H "Host: ourcoders.com" -H "Connection: keep-alive" -H "Accept: application/json, text/javascript, */*; q=0.01" -H "Origin: [url]http://ourcoders.com[/url]" -H "X-Requested-With: XMLHttpRequest" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "DNT: 1" -H "Referer: [url]http://ourcoders.com/search/[/url]" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: zh-CN,zh;q=0.8,en;q=0.6" -H "Cookie: PHPSESSID=9dnlvb603u0mrbud7du0m0kjt1; TINY4COCOA_USERID=33982; TINY4COCOA_SESSION=ef9be61c3c5b8b9ed0e76d13a8c804ff"
-
- goto g
复制代码
作者: 我来了 时间: 2016-9-4 13:03
能解决 【得到 百度搜索结果 前10页的链接】我提出的那个问题么?
http://www.bathome.net/thread-41570-1-1.html
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |