Skip to content

Instantly share code, notes, and snippets.

@faizal2007
Created April 26, 2021 23:30
Show Gist options
  • Save faizal2007/c6745452f00767e33d35e05a0918323b to your computer and use it in GitHub Desktop.
Save faizal2007/c6745452f00767e33d35e05a0918323b to your computer and use it in GitHub Desktop.
Check open open
#!/bin/bash
CMD="$(dirname $0)/$(basename $0)"
if [ $# -ne 2 ]; then
echo "${CMD} <ip> <port>"
else
echo > /dev/tcp/$1/$2 && echo "open"
fi
#echo > /dev/tcp/192.168.1.41/9100 && echo "open"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment