V1.2.4 新增已用端口号&服务查询

This commit is contained in:
Hyy2001X 2021-05-01 14:07:20 +08:00
parent cf1327cbea
commit c3e97e50ac
1 changed files with 8 additions and 1 deletions

View File

@ -3,7 +3,7 @@
# AutoBuild Module by Hyy2001 # AutoBuild Module by Hyy2001
# AutoBuild_Tools for Openwrt # AutoBuild_Tools for Openwrt
Version=V1.2.3 Version=V1.2.4
AutoBuild_Tools() { AutoBuild_Tools() {
while : while :
@ -15,6 +15,7 @@ do
echo "2. Samba 一键共享" echo "2. Samba 一键共享"
echo "3. 软件包安装" echo "3. 软件包安装"
echo "4. 查找文件(夹)" echo "4. 查找文件(夹)"
echo "5. 端口占用列表"
echo "u. 固件更新" echo "u. 固件更新"
echo -e "\nx. 更新脚本" echo -e "\nx. 更新脚本"
echo -e "q. 退出\n" echo -e "q. 退出\n"
@ -79,6 +80,12 @@ do
PKG_Finder ${_Type} ${_Path} ${_Name} PKG_Finder ${_Type} ${_Path} ${_Name}
Enter Enter
;; ;;
5)
clear
echo -e "端口 服务名称\n"
netstat -tanp | egrep ":::[0-9].+|0.0.0.0:[0-9]+|127.0.0.1:[0-9]+" | awk '{print $4"\t "$7}' | sed -r 's/:::/\1/' | sed -r 's/0.0.0.0:/\1/' | sed -r 's/127.0.0.1:/\1/'| sed -r 's/[0-9]+.\//\1/' | sort | uniq
Enter
;;
esac esac
done done
} }