dunno - ;)
authorhackbard <hackbard>
Thu, 19 Dec 2002 03:51:37 +0000 (03:51 +0000)
committerhackbard <hackbard>
Thu, 19 Dec 2002 03:51:37 +0000 (03:51 +0000)
hdw-sniff.c

index ff492f6..8b35e82 100644 (file)
@@ -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)?