Skip to content

Instantly share code, notes, and snippets.

@adige
Created January 13, 2016 08:35
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adige/2bbfee9fe897a3c83604 to your computer and use it in GitHub Desktop.
Save adige/2bbfee9fe897a3c83604 to your computer and use it in GitHub Desktop.
Check open ports without netstat or lsof
declare -a array=($(tail -n +2 /proc/net/tcp | cut -d":" -f"3"|cut -d" " -f"1")) && for port in ${array[@]}; do echo $((0x$port)); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment