Open bornhorstj opened 4 years ago
Skip ss and netstat entirely:
if grep -q '00000000:04D2 [0:]* 0A ' /proc/net/tcp*; then
listening_port=true
echo "[*] Listening on port 1234 (ipv4 or ipv6)"
fi
if grep ':04D2 ' /proc/net/tcp* | grep -v ' 00000000*:0000 0A'; then
echo "[*] Active connection on port 1234 (ipv4 or ipv6)"
fi
Explanation:
netstat missing
you might want to update to us SS -ano if netstat is missing