X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fhdw-sniff.git;a=blobdiff_plain;f=hdw-sniff.c;h=8b35e82fb451388ff124767104b9957cacd9f141;hp=ff492f6a7ea6f8e9d3566754dba6f05468f82e62;hb=326723124c4b55eccaa297c1636f9d345255d7bd;hpb=3242f8111d2b9c342edb91797ca895be7996400a diff --git a/hdw-sniff.c b/hdw-sniff.c index ff492f6..8b35e82 100644 --- a/hdw-sniff.c +++ b/hdw-sniff.c @@ -185,6 +185,7 @@ void pcap_process(u_char *info,const struct pcap_pkthdr *pcap_header, /* frame type */ /* management */ if(!(w_hdr->frame_ctl & 0x0c)) { + tmp_buf1[0]='\0'; tmp_buf2[0]='\0'; if((w_hdr->frame_ctl & IEEE802_11_STYPE_ASSOC_REQ)>0) strcpy(tmp_buf,"association request"); else if((w_hdr->frame_ctl & IEEE802_11_STYPE_ASSOC_RESP)>0) @@ -217,10 +218,12 @@ void pcap_process(u_char *info,const struct pcap_pkthdr *pcap_header, strcpy(tmp_buf,"deauthentification"); else strcpy(tmp_buf,"impossible situation \%) - go mail the author."); } - else strcpy(tmp_buf,"control & data frame type not supported yet"); - /* print out frame type */ + else strcpy(tmp_buf,"control or data frame type"); + printf("=> %s\n",tmp_buf); - printf(" %s%s\n",tmp_buf1,tmp_buf2); + if(strlen(tmp_buf1)>0 & strlen(tmp_buf2)>0) printf(" %s%s\n", + tmp_buf1, + tmp_buf2); printf("duration/id: 0x%x\n",w_hdr->duration_id); printf("version check ... %s\n", ((w_hdr->frame_ctl & IEEE802_11_FCTL_VERS)==0x00)?