先上脚本,具体内容如下: 1#!/bin/bash 2site=`curl "https://blog.361way.com/sitemap.xml"|grep "<loc>"|sed 's/<loc>http://www.|</loc>//g'` 3cityid="481101 482101 482201 483101 483201 484201 484401 485101 486101" 4for i in $cityid 5do 6 for j in $site 7 do 8curl -G "api.networkbench.com/idc/instantMeasure.do?method=POST&ec=UTF-8&js=1&cityIds=$i&url=$j&type=1&" -e "http://www.networkbench.com/speed/index.htm" >>a.txt 9#url=`sed 's/.*"TASK_NAME":"(.*)","TASK_TRACERT".*/api.networkbench.com/idc/download.do?name=1/g' a.txt ` 10#curl -G $url >> test.html 11sleep 3 12 done 13done sh site.sh >site.log 2>&1 (注:csh中不支持该日志重定向的写法。会报“Ambiguous output redirect”错误。) 因忙与自考,细的就不多说了。无非就是是抓包,curl提交信息。模……
Continue reading