I found a small perl script that generates a wep key from a passphrase.

#!/usr/bin/perl
# Perl script to convert a passphrase to a WEP key.
# By Aki Mimoto
use strict;

@ARGV or die "Usage: $0 passphrase\n";
print generate_key( @ARGV ), "\n";

sub generate_key {
# --------------------------------------------------
        require Digest::MD5;
        return substr Digest::MD5::md5_hex( substr( shift() x 64, 0, 64
) ), 0, 26;
}

I saved the script as /usr/bin/wep and added the following to my
ifcfg-wlan0:

WIRELESS_ENC_KEY=`/usr/bin/wep passphrase`

Works perfectly.

This is with a Belkin 54G pc-card using ndiswrapper btw...

Cheers,

John...

On Fri, 2004-07-16 at 14:47, Kevin Saenz wrote:
> I think the problem is accepting strings, and I couldn't be stuffed 
> getting it to work.
> 
> >On Fri, 2004-07-16 at 13:44, Kevin Saenz wrote:
> >  
> >
> >>1. you can't use WEP. (Really who in their right mind would use it 
> >>anyways) IPSec kicks arse.
> >>    
> >>
> >
> >ndiswrapper supports WEP on my Broadcom card, so I'm not sure that
> >you're pointing the finger at the right party.
> >
> >  
> >

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to