From: hackbard Date: Fri, 10 Jun 2005 14:45:45 +0000 (+0000) Subject: added flite support for new beacon frames X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ede1086cab0258aad9ac4706350d3b461adb44f;p=my-code%2Fhdw-sniff.git added flite support for new beacon frames --- diff --git a/parse.c b/parse.c index f18ba98..7eac803 100644 --- a/parse.c +++ b/parse.c @@ -46,12 +46,15 @@ void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,cons t_beacon_fb *beacon_fb; int ret; char string[MESSAGE_MAX]; + char sc[MAX_SYSCALL_CHARS]; + unsigned char new; info=(t_info *)ptr; info->count++; memset(&new_sta,0,sizeof(t_sta)); + new=0; if(info->dump_fd!=0) { ret=write(info->dump_fd,pcap_header,sizeof(struct pcap_pkthdr)); @@ -80,6 +83,7 @@ void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,cons if((ret==L_EMPTY_LIST)|(ret==L_NO_SUCH_ELEMENT)) { list_add_element(&(info->sniffed_sta),&new_sta,sizeof(t_sta)); sta=(t_sta *)info->sniffed_sta.current->data; + new=1; } else sta=(t_sta *)info->sniffed_sta.current->data; // fill in stuff ... @@ -95,6 +99,10 @@ void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,cons (i==ADDR_LEN-1)?'.':':'); string[22+3*ADDR_LEN+1]=0; display_console(info,string); + if(new) { + snprintf(sc,MAX_SYSCALL_CHARS,"flite 'new ssid: %s'",sta->ssid); + system(sc); + } } }