1.CURL批量:
输出(注意那个双引号里加一个单引号引起来,输出单引号,还是那个双引号为匹配,里面单引号原样输出,这点得记住!):
/usr/bin/curl -I 'baidu.com'
/usr/bin/curl -I '360.cn'
/usr/bin/curl -I 'souhu.com'
/usr/bin/curl -I 'sina.com.cn'
for i in $(cat url.txt);do echo /usr/bin/curl -I "''$i'''";done; #双引号里加一个单引号引起来,输出单引号,还是那个双引号为匹配
/usr/bin/curl -I ''baidu.com'''
/usr/bin/curl -I ''360.cn'''
/usr/bin/curl -I ''souhu.com'''
/usr/bin/curl -I ''sina.com.cn'''
Curl命令实战:
;done;
curl: (6) Couldn't resolve host ''baidu.com''
curl: (6) Couldn't resolve host ''360.cn''
curl: (6) Couldn't resolve host ''souhu.com''
curl: (6) Couldn't resolve host ''sina.com.cn''
2.Nc批量:
nc -w 1 -z -v 10.71.182.175 80
nc -w 1 -z -v 192.168.111.43 80
for i in $(cat ip.txt);do nc -w 1 -z -v $i 80;done;
Connection to 10.71.182.175 80 port [tcp/http] succeeded!
Connection to 192.168.111.43 80 port [tcp/http] succeeded!
输出(注意那个双引号里加一个单引号引起来,输出单引号,还是那个双引号为匹配,里面单引号原样输出,这点得记住!):
/usr/bin/curl -I 'baidu.com'
/usr/bin/curl -I '360.cn'
/usr/bin/curl -I 'souhu.com'
/usr/bin/curl -I 'sina.com.cn'
for i in $(cat url.txt);do echo /usr/bin/curl -I "''$i'''";done; #双引号里加一个单引号引起来,输出单引号,还是那个双引号为匹配
/usr/bin/curl -I ''baidu.com'''
/usr/bin/curl -I ''360.cn'''
/usr/bin/curl -I ''souhu.com'''
/usr/bin/curl -I ''sina.com.cn'''
Curl命令实战:
;done;
curl: (6) Couldn't resolve host ''baidu.com''
curl: (6) Couldn't resolve host ''360.cn''
curl: (6) Couldn't resolve host ''souhu.com''
curl: (6) Couldn't resolve host ''sina.com.cn''
2.Nc批量:
nc -w 1 -z -v 10.71.182.175 80
nc -w 1 -z -v 192.168.111.43 80
for i in $(cat ip.txt);do nc -w 1 -z -v $i 80;done;
Connection to 10.71.182.175 80 port [tcp/http] succeeded!
Connection to 192.168.111.43 80 port [tcp/http] succeeded!
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/9918/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2018-9-28 18:25
评论列表