X-Git-Url: https://www.hackdaworld.org/gitweb/?p=my-code%2Fhdw-sniff.git;a=blobdiff_plain;f=wep.c;h=8686469f528235940fd9d2adf47a10fc8a011242;hp=e2f679978ff89bd261554995ffae81061e49a67e;hb=HEAD;hpb=0ba6d6a2e1dd7a79d87a25c289f5dab4b7e8232d diff --git a/wep.c b/wep.c index e2f6799..8686469 100644 --- a/wep.c +++ b/wep.c @@ -1,19 +1,121 @@ +/* + * + * wep.c - wordlist/bruteforce wep key attack + * + */ + +#include "wep.h" + #include #include #include #include -#define MAX_C 20 +#include + +#include "network.h" +#include "list.h" +#include "event.h" + +int usage(void) { + puts("usage:"); + put(""); + puts("-p "); + puts("-s "); + puts("-f /path/to/flite"); + puts("-w /path/to/wordlist"); + return 1; +} + +int main(int argc,char **argv) { + + /* data */ + t_wep wep; + int i; + time_t time; + char buf[MAX_BUF]; + unsigned char text[MAX_TEXT]; + + /* default values */ + memset(&wep,0,sizeof(t_wep)); + wep.port=PORT; + strncpy(wep.flite,"/usr/bin/flite",MAX_C_FLITE); + strncpy(wep.savefile,"",MAX_C_SF); + strncpy(wep.wordlist,"",MAX_C_WL); + + time(&time); + + /* parse argv */ + for(i=0;i0) - c=read(file_fd,my_buf,MAX_C); - for(i=0;i