Skip to content

Instantly share code, notes, and snippets.

@royharoush
Last active December 9, 2018 08:05
Show Gist options
  • Save royharoush/47441b4e14a0b53c730a3594de4508fe to your computer and use it in GitHub Desktop.
Save royharoush/47441b4e14a0b53c730a3594de4508fe to your computer and use it in GitHub Desktop.
get most commonly used ports from nmap
cat /usr/share/nmap/nmap-services | grep -i tcp| sort -k 3 -n -r | awk '{print $2}' | cut -d"/" -f1 | head -500
cat /usr/share/nmap/nmap-services | grep -i tcp| sort -k 3 -n -r | awk '{print $2}' | cut -d"/" -f1 | head -500 > ports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment