Skip to content

Instantly share code, notes, and snippets.

@TomaszKlosinski
Forked from adige/check_open_ports
Created November 30, 2023 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TomaszKlosinski/a322dfa7458a9b4b6130354073abdf2d to your computer and use it in GitHub Desktop.
Save TomaszKlosinski/a322dfa7458a9b4b6130354073abdf2d 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