Created
January 24, 2018 08:40
-
-
Save dan82840/8d114173b02c11c13070539a26edeafc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
# | |
# Apple OUI = D8:96:95 | |
BASE="d8:96:95:08:97" | |
FROM=$1 | |
TO=$2 | |
if [ -e $FROM ]; then FROM=1; fi | |
if [ -e $TO ]; then TO=1; fi | |
for i in $(seq $FROM $TO); do | |
LSB=$(echo "obase=16; $i" | bc) | |
MAC="$BASE:$LSB" | |
HNAME="`uname -n`-fakehost-$i" | |
#CMD="./dhtest -m $MAC -V -i eth1 -h '$HNAME'" | |
CMD="./dhtest -m $MAC -i eth1 -h '$HNAME'" | |
echo $CMD | |
eval $CMD | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment