Skip to content

Instantly share code, notes, and snippets.

@eni23
Created March 21, 2013 10:41
Show Gist options
  • Save eni23/5212149 to your computer and use it in GitHub Desktop.
Save eni23/5212149 to your computer and use it in GitHub Desktop.
script to resolve an mac-addr to an ip ./mac-to-ip.sh 00:00:00:00:00 192.168.1.0/24
#!/bin/bash
# achtung, admins finden das gar nicht cool
MACADDRESS=$1
NETWORK=$2
sudo ip neigh flush all > /dev/null;
sudo fping -c 1 -g -q $NETWORK 2> /dev/null;
sudo arp -n | grep $MACADDRESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment