#!/bin/sh
#Copywrite (C) 2001 Xam of the wi2600.org group
#
#v0.1, released on aug-14-2001
#
#v0.2, released on jan-17-2002 with a linux version 
#from aberaham. 
#
#Concept by Xam
#Code ideas by TheChump and Atropos, thanks!
#mail xam@wi2600.org if desired
#Tested on: 
#
# BSD 5-CURRENT, 4.4-RELEASE, and 4.4-STABLE
# with linksys WPC11, Lucent Silver, Gold, 
# and old Bronze, Cisco Aironet 342 and 352 
# This will probably work with other cards, but
# some os's have wacky versions of Jot that
# don't like the arguments we pass to it. Like 
# the version that appeared in OpenBSD 2.7. So, 
# you'll need to toy with it. <g>

#Enjoy!

#Reading arguments for stuff:

interface="$1";

if test "$#" -ne "1";
then
  	echo "Try this: $0 <interface>";
	exit;
else


wicontrol -i $interface -n "";
sleep .5;
wicontrol -i $interface -s "";
sleep .5;
wicontrol -i $interface -q "";

echo "Hit CTRL-C to break (Ctrl^C)";

while true
do
        addy=`jot -r -w "%0.2x" -s : 6 0 255`;
        echo $addy;

        sleep .5;

        wicontrol -i $interface -m $addy;
done
fi;
