From: hackbard Date: Thu, 16 Sep 2004 17:46:59 +0000 (+0000) Subject: enter monitor mode correctly, fixed hop_channel bug (start at channel 0) X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e5f1cd9c4bf4d5c06a8a1bdb168e8ddda9a2593;p=my-code%2Fhdw-sniff.git enter monitor mode correctly, fixed hop_channel bug (start at channel 0) --- diff --git a/old/hdw-sniff.c b/old/hdw-sniff.c index bd0b8ed..8bda3dc 100644 --- a/old/hdw-sniff.c +++ b/old/hdw-sniff.c @@ -68,7 +68,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) - sprintf(sys_call,"iwpriv %s monitor 3",argv[1]); + sprintf(sys_call,"iwconfig %s mode monitor",argv[1]); if(strncmp(argv[1],"eth",3)==0) sprintf(sys_call,"ifconfig %s promisc",argv[1]); system(sys_call); @@ -97,6 +97,7 @@ int main(int argc, char *argv[]) { my_info_struct.ssid_list->next=NULL; // strcpy(my_info_struct.ssid_list->ssid,"test"); strcpy(my_info_struct.dev,argv[1]); + my_info_struct.channel=1; /* prepare for select */ pcap_fd=pcap_fileno(pcap_handle);