Saturday, April 17, 2010

Script for generating a random MAC address

MACADDR="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"; echo $MACADDR


One line shell script to generate a random MAC address starting
with "52:54:". This can be changed to anything by editing the script.

0 comments:

Post a Comment