Created
September 17, 2014 02:04
-
-
Save Red5d/a879c57ad087ab081e92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Scan network range (replace with yours) for MAC addresses, compare with previous scan, and report differences with PushBullet. | |
# Requires pushbullet bash script from https://github.com/Red5d/pushbullet-bash | |
touch prev-macs.txt | |
sudo nmap -sP -n 192.168.1.1/24 | grep "MAC Address" | sort > macs.txt | |
if [ $(diff macs.txt prev-macs.txt) ];then | |
pushbullet push all note "New network devices: $(diff macs.txt prev-macs.txt)" | |
fi | |
mv macs.txt prev-macs.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment