9 while [ $COUNT -lt $TIMES ]
11 #RAND=$[`shuf -i $RAND_START-$RAND_END -n 1`]
12 #RAND="$(awk 'BEGIN{srand();print int(rand()*60)}')"
13 # This one works well to generate a random number between 0-999 on OpenWrt
14 RAND=$(head -30 /dev/urandom | tr -dc "0123456789" | head -c3)
16 tcpreplay -i eth1 -q "$FILE_TO_INJECT"
17 echo "Delay for $FILE_TO_INJECT: $(($RAND%240)) seconds"
19 COUNT=`expr $COUNT + 1`