icwmp/scripts/iwepkeygen
2019-12-06 09:57:02 +01:00

25 lines
597 B
Bash

#!/usr/sbin/bash
# Copyright (C) 2013-2019 iopsys Software Solutions AB
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
usage()
{
echo "Usage: $0 <strength> <passphrase>"
echo "<strength> Indicate the WEP KEY strength to generate. Should be 64 or 128"
echo "<passphrase> Indicate the passphrase used to generate the WEP KEY"
echo "$0 -h display this help"
}
if [ "_$1" = "-h" ]; then
usage;
exit 0;
fi
strength=$1
passphrase=$2
if [ _$strength != "_64" -a _$strength != "_128" ] || [ _$passphrase = "_" ]; then
usage;
exit 0;
fi
/usr/sbin/icwmpd -w "$strength" "$passphrase"