1、Sh_批量检测端口号
#!/bin/bash
#
#********************************************************************
#Author: zhuzikang
#QQ: 985848343
#Date: 2021-08-24
#FileName: check_port.sh
#URL: zhuzikang.cn
#Description: The test script
#Copyright (C): 2021 All rights reserved
#********************************************************************
cat ip.txt|while read line
do
/usr/bin/nc -w 1 -z $line > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo telnet $line ok
sleep 1
else
echo telnet $line fail
fi
done

浙公网安备 33010602011771号