Skip to content

Instantly share code, notes, and snippets.

@goncalor
Created March 21, 2019 00:16
Show Gist options
  • Save goncalor/f2222e24f7c862c02c460496ac5ac584 to your computer and use it in GitHub Desktop.
Save goncalor/f2222e24f7c862c02c460496ac5ac584 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
n=${1:-10}
grep /tcp /usr/share/nmap/nmap-services | sort -rk3 | cut -f2 | grep -Po '\d+' | head -n $n | tr '\n' ','
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment