mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-09-08 13:46:33 +00:00
~增加对ss命令的兼容以替代netstat命令
This commit is contained in:
@@ -592,10 +592,17 @@ testcommand() {
|
||||
2)
|
||||
line_break
|
||||
echo "==========================================================="
|
||||
netstat -ntulp | grep 53
|
||||
if ckcmd netstat;then
|
||||
netstat -ntulp | grep 53
|
||||
elif ckcmd ss;then
|
||||
ss -ntulp | grep 53
|
||||
else
|
||||
echo -e "Neither net-tools nor iproute2 is installed. Please install one of these packages and try again."
|
||||
fi
|
||||
echo
|
||||
echo -e "$TOOLS_NETSTAT_HINT"
|
||||
echo "==========================================================="
|
||||
sleep 2
|
||||
;;
|
||||
3)
|
||||
line_break
|
||||
|
||||
Reference in New Issue
Block a user