This commit is contained in:
Luk Lu
2023-03-08 08:47:12 +08:00
parent 2d38dc0b68
commit e79356b310
12 changed files with 20 additions and 26 deletions

14
portscan.sh Normal file
View File

@@ -0,0 +1,14 @@
if [ "$1" ]
then
PORT=$1
else
echo "=== 需要查看的端口号:"
read -p ">>> " PORT
fi
if [[ "$(uname)" = "Darwin" ]]
then
lsof -i tcp:$PORT
else
netstat -tunlp | grep $PORT
fi