From: hackbard Date: Wed, 20 Nov 2002 14:28:54 +0000 (+0000) Subject: improved snap logging X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=9ddf092558413b5a929e7c6068efa732f68fc24c;p=my-code%2Fhdw-sniff.git improved snap logging --- diff --git a/hdw-sniff.c b/hdw-sniff.c index 32e1661..0259730 100644 --- a/hdw-sniff.c +++ b/hdw-sniff.c @@ -249,20 +249,13 @@ void pcap_process(u_char *info,const struct pcap_pkthdr *pcap_header, else { printf("- crypted packet!\n"); /* print crypted snap - write into file */ - printf("snap: (aa aa 03 00 00 00) "); - for(i=0;i<4;i++) { - printf("%x ",*(snap_hdr->snap-4+i)); - crypted_snap[i]=*(snap_hdr->snap-4+i); + printf("snap: (iv + crypted aa aa 03 00 00 00) "); + for(i=0;i<10;i++) { + printf("%x ",*(snap_hdr->snap+i)); + crypted_snap[i]=*(snap_hdr->snap+i); // if(file_fd>0) // write(file_fd,snap_hdr->snap+i-4,1); } - printf("| "); - for(i=0;i<6;i++) { - printf("%x ",snap_hdr->snap[i]); - crypted_snap[4+i]=snap_hdr->snap[i]; - // if(file_fd>0) - // write(file_fd,snap_hdr->snap+i,1); - } printf("\n"); crypted_snap[10]='\n'; if(file_fd>0) {