Skip to content

Instantly share code, notes, and snippets.

@OliPelz
Created December 7, 2019 20:41
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 OliPelz/a9eba6f150fa712944e9c0a174b7ca75 to your computer and use it in GitHub Desktop.
Save OliPelz/a9eba6f150fa712944e9c0a174b7ca75 to your computer and use it in GitHub Desktop.
netstat / ss magic
# https://serverfault.com/questions/576910/how-to-find-full-process-arguments-and-associated-listening-ports
while : ; do ss -nptu | awk 'NR>1 { split($7,p,","); split(p[2],pid,"="); printf "Listen: "$5 " Command: "; system("ps --no-headers -ww -o args p "pid[2]); }'; done | grep curl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment