On May 28, 2005, at 10:36 AM, Nick Holmes wrote:
Hi All.
Does anyone here have a wrapper script which can send a random MAC to
ifconfig's lladdr parameter?
I've used the 'macchanger' program before (written by Alvaro Lopez
Ortega, found it in the Linux-based "Auditor" LiveCD) and that can
generate a random MAC for the interface. Does anyone here have a
script (Perl or otherwise) which can achieve the same in OpenBSD and
they'd be willing to share?
Many thanks.
$ perl -e 'print rand_hex(), (":" . rand_hex()), for (0..4); sub
rand_hex { return sprintf("%lx", rand(15)) }'
--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net