From 4cc87752584c08d1267cc389142777db5faba302 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Tue, 08 Jul 2003 23:58:40 +0000 Subject: silly 128 bit wep keygen. --- (limited to 'development') diff --git a/development/wepgen/wepgen.c b/development/wepgen/wepgen.c new file mode 100644 index 0000000..42aca2f --- a/dev/null +++ b/development/wepgen/wepgen.c @@ -0,0 +1,27 @@ +/* + Simple program to emulate the "text" mode of supplying WEP keys. + The procedure only uses the ASCII codes of the characters as WEP + key bits (13 characters produces 104 bits as needed by 128-bit + WEP). Such keys of course do not have much entropy, but that is + a choice for the installation to make. +*/ +#include + +int main(int argc, char** argv) +{ + int a=0,l; + char* c=argv[1]; + if ( argc != 3 || !*c ) { + fprintf(stderr, "Usage: %s textkey [length]\n",argv[0]); + exit(1); + } + l = atoi(argv[2]); + while (l) { + if ( !*c ) c=argv[1]; + printf("%02x",*c); + c++; + if ( --l ) + printf(":"); + } + printf("\n"); +} -- cgit v0.9.0.2