Skip to content

Instantly share code, notes, and snippets.

@tuantmb
Created January 3, 2019 01:16
Show Gist options
  • Save tuantmb/e64bdd6b20f2441bcfd4cd1e711bdc81 to your computer and use it in GitHub Desktop.
Save tuantmb/e64bdd6b20f2441bcfd4cd1e711bdc81 to your computer and use it in GitHub Desktop.
Nmap script to scan network and output with format IP, Mac, Vendor
nmap -sP 192.168.0.0/24 | grep -v "Host" | tail -n +3 | tr '\n' ' ' | sed 's|Nmap|\nNmap|g' | grep "MAC Address" | cut -d " " -f5,8-15 | grep ^[0-9].*
# the last grep to avoid invalid format (valid format is beginning with an IP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment