#!/bin/sh#simulate 255 IPhones requesting DHCP# Apple OUI = D8:96:95BASE="d8:96:95:08:96"FROM=$1shiftTO=$2if [ -e $FROM ]; then FROM=1; fiif [ -e $TO ]; then TO=1; fifor i in `seq $FROM $TO`do LSB=`echo "obase=16; $i" | bc` MAC="$BASE:$LSB" HNAME="`uname -n`-fakehost-$i" #CMD="$HOME/bin/dhtest -m $MAC -V -i eth1 -h '$HNAME'" CMD="$HOME/bin/dhtest -m $MAC -i eth1 -h '$HNAME'" echo $CMD $CMD sleep 1doneAnother way, the program dhtest (source code) can be download from https://github.com/saravana815/dhtest.
For example:
git clone https://github.com/saravana815/dhtestcd dhtestmake
No comments:
Post a Comment