X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fhdw-sniff.git;a=blobdiff_plain;f=wep.c;fp=wep.c;h=8686469f528235940fd9d2adf47a10fc8a011242;hp=886ac379bce6725643ba44add9f9911121dc161d;hb=aac4f0a3f47f66a35722e564a2e57c20cc8a70ee;hpb=99dd3ea262fb1f209ff341f51a97a6783150629b diff --git a/wep.c b/wep.c index 886ac37..8686469 100644 --- a/wep.c +++ b/wep.c @@ -1,25 +1,121 @@ /* * - * wep.c - bruteforce wep key + * 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