shell小技巧:用curl批量验证代理IP是否可用

  • A+
所属分类:shell学习笔记
本文信息本文由方法SEO顾问发表于2014-08-0110:39:10,共 3085 字,转载请注明:shell小技巧:用curl批量验证代理IP是否可用_【方法SEO顾问】

我们做SEO的有时候有一些奇怪的需求,比如批量查2000个词的排名什么的,如果同一个IP查的话,百度很容易屏蔽我们,这时候我们就需要一些代理IP来配合我们工作,那我们如何搞到一些可用的代理IP呢?

思路

1、用proxyfire(没听说过的自己百度一下)批量扫一批代理IP

2、筛选出中国地区的代理IP

3、用shell下的curl命令批量用代理IP去访问百度,把其中能正常访问的IP记下来

4、过滤出状态码200的IP即为可用的代理IP

5、awk出这些可用代理IP,生成ip-good.txt

以下是shell代码

cat ip.txt|while read line;do curl -x $line www.baidu.com -m 5 --connect-timeout 5 -o /dev/null -s -w "$line "%{http_code}"\n";done>ip2.txt

awk '{if($2==200)print $1}'>ip-good.txt

效果如下图:

curl批量验证代理IP是否可用

分享一些可用的代理IP

122.72.99.2:80
222.83.14.145:3128
116.236.216.116:8080
202.98.123.126:8080
114.80.136.112:7780
112.5.254.172:80
122.72.99.3:80
122.72.99.8:80
202.171.253.111:80
123.103.23.106:18080
123.103.23.106:11882
123.103.23.106:13708
123.103.23.106:10332
123.103.23.106:18508
123.103.23.106:29786
218.92.227.165:29786
123.103.23.106:14087
218.92.227.165:16385
218.92.227.165:12640
123.103.23.106:34534
123.103.23.106:18888
218.92.227.165:24524
218.92.227.165:18943
123.103.23.106:10064
218.92.227.165:21571
123.103.23.106:13895
123.103.23.106:11375
123.103.23.106:34535
123.103.23.106:11322
218.92.227.165:10030
123.103.23.106:15881
218.92.227.165:14856
218.92.227.165:23684
123.103.23.106:13091
218.92.227.165:20771
123.103.23.106:15880
218.92.227.165:18378
123.103.23.106:34783
123.103.23.106:30601
123.103.23.106:13441
123.103.23.106:20400
218.92.227.165:16107
218.92.227.165:15238
218.92.227.165:18256
218.92.227.165:14432
222.42.1.132:18000
219.76.64.27:8080
221.209.235.74:80
218.28.112.114:809
222.85.1.123:8118
60.191.39.252:80
210.13.100.87:8080
222.74.6.10:8000
202.114.6.37:9001
210.75.14.157:80
221.176.14.72:80
125.39.66.66:80
210.14.152.91:8080
222.74.6.48:8000
222.87.129.30:80
61.150.76.205:808
210.14.152.92:8080
58.251.78.71:8088
211.151.13.22:81
202.108.50.75:80
211.151.50.179:81
210.14.152.92:80
221.5.69.51:80
202.98.123.126:8080
192.83.186.151:80
211.162.39.98:80
211.152.50.70:80
218.5.74.174:80
60.210.18.11:80
210.14.152.91:88
60.18.147.109:8085
219.76.64.28:8080
60.221.253.204:80
59.46.72.245:8080
221.180.131.229:80
221.130.124.91:8123
222.240.175.79:8580
61.155.169.11:808
222.74.6.32:8000
60.217.33.164:8080
221.183.16.219:80
121.12.255.214:8086
202.99.213.83:80
210.47.32.162:8080
60.194.14.144:82
202.103.150.70:8088
121.10.120.135:8001
125.227.240.212:8080
218.9.69.2:8080
124.161.94.8:80
59.127.231.155:8080
210.14.152.91:80
61.234.123.64:8080
61.167.49.188:8080
218.205.195.61:808
218.65.132.38:80
211.151.59.251:80
61.235.249.165:80
203.80.144.4:80
222.87.129.29:80
124.193.25.251:8080
218.240.156.82:80
218.108.168.68:82
125.39.66.152:80
210.14.152.92:88
61.135.153.22:80
218.108.168.68:80
222.186.12.5:10001
59.127.113.92:80
60.221.252.107:80
222.65.255.142:8080
221.7.145.39:18186
210.14.138.102:8080
58.248.22.41:808
202.108.22.5:80
218.27.136.169:8085
121.12.255.212:8085
219.239.172.223:8080
121.12.255.212:8086
210.14.138.94:8080
203.198.139.139:80
125.76.234.58:8080
61.50.245.163:8000
221.178.118.226:8123
202.109.163.75:8085
61.136.60.58:6015
218.204.120.37:8123
121.12.255.214:8085
222.174.27.166:8080
218.204.102.26:8123
61.174.9.96:8080
61.136.60.79:6015
221.2.33.109:8585
124.202.247.210:8080
221.182.101.171:8123
221.178.77.244:8123
218.27.136.164:8081
221.180.147.30:81
218.76.217.138:8080
222.58.108.9:80
221.180.131.228:80
61.93.246.50:8080
221.180.131.230:80

  • 版权声明:除非注明,本博客均为北京SEO方法的原创文章,转载或引用请以超链接形式标明本文地址,否则会在SEO圈内公开此种不尊重版权的行为,谢谢合作!本文地址:https://seofangfa.com/shell/curl-proxy-ip.html
  • 转载请注明:shell小技巧:用curl批量验证代理IP是否可用_ 【方法SEO顾问】

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: