projects
/
my-code
/
hdw-sniff.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a694777
)
monitor mode 2 , added char dump
author
hackbard
<hackbard>
Wed, 13 Nov 2002 01:46:06 +0000
(
01:46
+0000)
committer
hackbard
<hackbard>
Wed, 13 Nov 2002 01:46:06 +0000
(
01:46
+0000)
hdw-sniff.c
patch
|
blob
|
history
diff --git
a/hdw-sniff.c
b/hdw-sniff.c
index
46892b5
..
1773b99
100644
(file)
--- a/
hdw-sniff.c
+++ b/
hdw-sniff.c
@@
-60,7
+60,7
@@
int main(int argc, char *argv[]) {
if(atoi(argv[2])==1) {
printf("setting to monitor mode\n");
if(strncmp(argv[1],"wlan",4)==0)
if(atoi(argv[2])==1) {
printf("setting to monitor mode\n");
if(strncmp(argv[1],"wlan",4)==0)
- sprintf(sys_call,"iwpriv %s monitor
3
",argv[1]);
+ sprintf(sys_call,"iwpriv %s monitor
2
",argv[1]);
if(strncmp(argv[1],"eth",3)==0)
sprintf(sys_call,"ifconfig %s promisc",argv[1]);
system(sys_call);
if(strncmp(argv[1],"eth",3)==0)
sprintf(sys_call,"ifconfig %s promisc",argv[1]);
system(sys_call);
@@
-216,10
+216,14
@@
void pcap_process(u_char *info,const struct pcap_pkthdr *pcap_header,
ntohs(ip_hdr->protocol));
// printf("chksum: %x\n",ntohs(ip_hdr->ip_sum));
}
ntohs(ip_hdr->protocol));
// printf("chksum: %x\n",ntohs(ip_hdr->ip_sum));
}
- printf("all ethernet dump:\n");
+ printf("all ethernet dump:
(hex)
\n");
for(i=p_o+w_o+e_o;i<pcap_header->caplen;i++)
printf("%x ",*(package+i));
printf("\n");
for(i=p_o+w_o+e_o;i<pcap_header->caplen;i++)
printf("%x ",*(package+i));
printf("\n");
+ printf("all ethernet dump: (char)\n");
+ for(i=p_o+w_o+e_o;i<pcap_header->caplen;i++)
+ printf("%c ",*(package+i));
+ printf("\n");
}
int hop_channel(struct info_struct *info,int foo_fd) {
}
int hop_channel(struct info_struct *info,int foo_fd) {