source: branches/contrib/debian/rootfs/files/all/bin/genwepkey.sh @ 707

Last change on this file since 707 was 707, checked in by ehem, 5 years ago

Drag in changes to trunk

Coordination is interesting to deal with. Drag in changes that were done
on trunk.

  • Property svn:executable set to *
File size: 467 bytes
Line 
1#!/bin/sh
2#
3# Amain <amain@debwrt.net>
4
5echo -n "Enter WEP key 64bit=5 chars, 128bit=13 chars> "
6read key
7echo $key
8
9( ! [ ${#key} -eq 5 ] && ! [ ${#key} -eq 13 ] ) && echo "key must be exactly 5 or 13 characters" && exit 1
10
11[ ${#key} -eq 5 ] && bits="64"
12[ ${#key} -eq 13 ] && bits="128" 
13
14echo "WEP key length: ${#key} characters"
15echo "WEP key bits  : $bits"
16echo "WEP key hex   : "`echo -n $key | hexdump -e "${#key}/1 \"%02x\" \"\n\"" | cut -d ':' -f 1-${#key}`
Note: See TracBrowser for help on using the repository browser.