1.客户端指定源端口:
#!/bin/bash
#起始源端口
Pno=39800
for ((i=1;i<=39800;i++)) ;
do
Pno=`expr $Pno + 1`
echo '=======' >> 1.log
echo $Pno >> 1.log
date >> 1.log
curl -o /dev/null --local-port $Pno -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{time_appconnect}"
" curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{time_appconnect}"
" http://10.20.192.92/ >> 1.log
date >>1.log
sleep 2
done
2.只要返回码:
curl -g -sL -w "%{http_code}
" -o error.txt --header "User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" $sendhttp
3.代理转发:
curl -x 10.20.192.92:80 www.baidu.com