Skip to content

Instantly share code, notes, and snippets.

@l-modolo
Created March 24, 2015 09:29
Show Gist options
  • Save l-modolo/f2d9e118fef47d68e668 to your computer and use it in GitHub Desktop.
Save l-modolo/f2d9e118fef47d68e668 to your computer and use it in GitHub Desktop.
scan the network for device
#!/bin/bash
# scan the network for device
# usage: sudo network_scan.sh
arp -a | grep 192 | grep -v 255 | perl -pe 's/\? \((.*)\) at ([^\s]*) on .*/\1 \2/g' | \
awk '{print $1; print $2; system("nmap -O "$1" | grep Running")}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment