* Kyle Jones <kyle_jones DeleteThis @wonderworks.com>, 2004-04-18 12:23 +0200:
> Andre Berger <andre.berger DeleteThis @web.de> wrote:
> > * Kyle Jones <kyle_jones DeleteThis @wonderworks.com>, 2004-04-09 09:08 +0200:
> > > Is there any way to set a WEP key from the UNIX command
> > > line under Mac OS X? Any way at all except using the GUI?
> >
> > Kyle,
> >
> > there used to be a promising project called "saferWep", by James
> > Moore. It was designed to perform automatic WEP key rotation, but I
> > haven't checked its status in a while so I can't tell if it's still
> > under development:
> > <http://wirerimmed.com/index.php?section=article&album_id=11>
>
> Thanks for the pointer. It turns out that this project is meant
> to set the WEP key in Airport base stations. The docs say that
> the author does not know how to set the WEP key on a Mac client
> without user interaction.
Here's an excerpt from my e-mail conversation with James, but I could
never test it since I haven't had access to my ABS since, for my Linux
box at the time. One would have to adjust this to the Mac OS X paths.
The script changes the WEP key on the client, then restarts the
relevant services. There is no error checking.
#!/bin/sh
# Not really tested, should work with hostap on Debian GNU/Linux 3.0
CHANGEME="/etc/network/interfaces"
WEPKEY="$(java -jar /usr/local/lib/SaferWep/SaferWepClient.jar)"
KEYCMD="wireless_key" # for hostap, change for linux-wlan-ng
cp $CHANGEME $CHANGEME.old
sed -e "s/\(^.*$KEYCMD\ \).*$/\1$WEPKEY/" < $CHANGEME.old > $CHANGEME
/etc/init.d/networking restart
/etc/init.d/pcmcia restart 2> /dev/null
> Poking around further, it appears that the WEP key is asccessible
> via scutil, but it is stored in an encrypted form.
Interesting, how did you get scutil to display this?
> Anyone know what the encryption method is?
My guess would be: Hex.
-Andre<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: set WEP key from command line