]> hackdaworld.org Git - my-code/hdw-sniff.git/commitdiff
enter monitor mode correctly, fixed hop_channel bug (start at channel 0)
authorhackbard <hackbard>
Thu, 16 Sep 2004 17:46:59 +0000 (17:46 +0000)
committerhackbard <hackbard>
Thu, 16 Sep 2004 17:46:59 +0000 (17:46 +0000)
old/hdw-sniff.c

index bd0b8edabee6a367ff58a8951fbd60ab5ab6d104..8bda3dc1de38a4d916236359a40c6b383c51cb63 100644 (file)
@@ -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);