首页 > Web开发 > 详细

curl使用技巧

时间:2021-06-15 16:42:27      阅读:18      评论:0      收藏:0      [点我收藏+]

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}"\n"   curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{time_appconnect}"\n"   http://10.20.192.92/ >> 1.log
     date >>1.log
         sleep 2
done

 

2.只要返回码:

curl -g -sL -w "%{http_code}\n" -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

curl使用技巧

原文:https://www.cnblogs.com/gufengchen/p/14885361.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!