Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

set WEP key from command line

 
   Macintosh computer (Home) -> System RSS
Next:  Cmd-H in MT-NW  
Author Message
Kyle Jones

External


Since: Jun 12, 2004
Posts: 231



(Msg. 1) Posted: Fri Apr 09, 2004 1:58 am
Post subject: set WEP key from command line
Archived from groups: comp>sys>mac>system, others (more info?)

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?

 >> Stay informed about: set WEP key from command line 
Back to top
Login to vote
Andre Berger

External


Since: Dec 16, 2003
Posts: 425



(Msg. 2) Posted: Fri Apr 09, 2004 12:30 pm
Post subject: Re: set WEP key from command line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

* Kyle Jones <kyle_jones.RemoveThis@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>

Here's from what James explained to me about saferWep:

<blockquote>

The two main pieces of the system are the master and client. The
master is run from cron and the client is run on the desktop. Both
pieces use .properties files for their configuration and they both
need to go into /usr/local/etc. The master needs the shared secret,
the base station IP, and the base station password. The client just
needs the shared secret.

When you run the master it connects to the ABS using the same
mechanism as Apple's Airport Admin utility and sets a new network
password. There's a description of the password creation scheme
inside of the readme.

The client uses the same scheme to tell you what today's password is.

</blockquote>

-Andre<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: set WEP key from command line 
Back to top
Login to vote
Kyle Jones

External


Since: Jun 12, 2004
Posts: 231



(Msg. 3) Posted: Sun Apr 18, 2004 3:27 am
Post subject: Re: set WEP key from command line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.

Poking around further, it appears that the WEP key is asccessible
via scutil, but it is stored in an encrypted form. Anyone know
what the encryption method is?<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: set WEP key from command line 
Back to top
Login to vote
Andre Berger

External


Since: Dec 16, 2003
Posts: 425



(Msg. 4) Posted: Sun Apr 18, 2004 3:43 pm
Post subject: Re: set WEP key from command line [Login to view extended thread Info.]
Archived from groups: comp>sys>mac>system (more info?)

* 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 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> System All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]