Skip to content

Instantly share code, notes, and snippets.

@dan82840
Created January 24, 2018 08:40
Show Gist options
  • Save dan82840/8d114173b02c11c13070539a26edeafc to your computer and use it in GitHub Desktop.
Save dan82840/8d114173b02c11c13070539a26edeafc to your computer and use it in GitHub Desktop.
#!/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