Installing MDK3-v6 on Ubuntu 11.10
Hello,
I am trying to install the source code of MDK3 Version 6 (Link) on 11.10, however I am running into a few problems making the file.
Code:
#:~/Downloads/mdk3-v6$ sudo make
[sudo] password for #:
make -C osdep
make[1]: Entering directory `/home/#/Downloads/mdk3-v6/osdep'
Building for Linux
make[2]: Entering directory `/home/#/Downloads/mdk3-v6/osdep'
gcc -g -W -Wall -Wextra -O3 -Wno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk3-v6 -fPIC -I.. -c -o osdep.o osdep.c
gcc -g -W -Wall -Wextra -O3 -Wno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk3-v6 -fPIC -I.. -c -o common.o common.c
gcc -g -W -Wall -Wextra -O3 -Wno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk3-v6 -fPIC -I.. -c -o network.o network.c
gcc -g -W -Wall -Wextra -O3 -Wno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk3-v6 -fPIC -I.. -c -o linux.o linux.c
linux.c: In function ‘is_ndiswrapper’:
linux.c:165:17: warning: variable ‘unused’ set but not used [-Wunused-but-set-variable]
linux.c: In function ‘linux_set_rate’:
linux.c:334:22: warning: variable ‘unused’ set but not used [-Wunused-but-set-variable]
linux.c: In function ‘linux_set_channel’:
linux.c:807:22: warning: variable ‘unused’ set but not used [-Wunused-but-set-variable]
linux.c: In function ‘linux_set_freq’:
linux.c:896:22: warning: variable ‘unused’ set but not used [-Wunused-but-set-variable]
linux.c: In function ‘set_monitor’:
linux.c:1022:22: warning: variable ‘unused’ set but not used [-Wunused-but-set-variable]
linux.c: In function ‘do_linux_open’:
linux.c:1366:12: warning: variable ‘unused_str’ set but not used [-Wunused-but-set-variable]
linux.c:1352:15: warning: variable ‘unused’ set but not used [-Wunused-but-set-variable]
linux.c: In function ‘get_battery_state’:
linux.c:1982:35: warning: variable ‘current’ set but not used [-Wunused-but-set-variable]
gcc -g -W -Wall -Wextra -O3 -Wno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk3-v6 -fPIC -I.. -c -o linux_tap.o linux_tap.c
gcc -g -W -Wall -Wextra -O3 -Wno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk3-v6 -fPIC -I.. -c -o radiotap/radiotap-parser.o radiotap/radiotap-parser.c
ar cru libosdep.a osdep.o common.o network.o linux.o linux_tap.o radiotap/radiotap-parser.o common.o
ranlib libosdep.a
touch .os.Linux
make[2]: Leaving directory `/home/#/Downloads/mdk3-v6/osdep'
make[1]: Leaving directory `/home/#/Downloads/mdk3-v6/osdep'
cc -g -O3 -Wall -Wextra -lpthread mdk3.c osdep/libosdep.a -o mdk3 -Losdep -losdep
mdk3.c: In function ‘read_line_from_file’:
mdk3.c:755:5: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
/usr/include/x86_64-linux-gnu/bits/stdio.h:116:1: note: expected ‘size_t *’ but argument is of type ‘unsigned int *’
mdk3.c:760:2: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
/usr/include/x86_64-linux-gnu/bits/stdio.h:116:1: note: expected ‘size_t *’ but argument is of type ‘unsigned int *’
mdk3.c: In function ‘bruteforce_ssid’:
mdk3.c:809:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mdk3.c:828:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mdk3.c:847:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mdk3.c:866:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mdk3.c:888:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mdk3.c:913:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mdk3.c: In function ‘ssid_brute_sniffer’:
mdk3.c:1512:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
mdk3.c: In function ‘mac_bruteforce_sniffer’:
mdk3.c:1926:9: warning: variable ‘plen’ set but not used [-Wunused-but-set-variable]
mdk3.c: In function ‘eapol_machine’:
mdk3.c:2560:17: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
mdk3.c: In function ‘check_probe’:
mdk3.c:3153:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
mdk3.c: In function ‘mdk_parser’:
mdk3.c:3393:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3409:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3413:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3431:5: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3436:5: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3494:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3535:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3555:9: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3565:15: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3569:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3574:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3602:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3608:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3630:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3636:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3640:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3655:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3663:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3672:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c: In function ‘main’:
mdk3.c:3855:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3862:6: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3868:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3871:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3874:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3877:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3880:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3883:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3886:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3889:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3892:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3895:3: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3902:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3904:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3905:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3906:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3907:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3908:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3909:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3910:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3911:2: warning: format not a string literal and no format arguments [-Wformat-security]
mdk3.c:3912:2: warning: format not a string literal and no format arguments [-Wformat-security]
/tmp/ccjoIFlH.o: In function `init_channel_hopper':
/home/#/Downloads/mdk3-v6/mdk3.c:1269: undefined reference to `pthread_create'
/tmp/ccjoIFlH.o: In function `ssid_brute':
/home/#/Downloads/mdk3-v6/mdk3.c:2282: undefined reference to `pthread_create'
/tmp/ccjoIFlH.o: In function `ssid_brute_real':
/home/#/Downloads/mdk3-v6/mdk3.c:2332: undefined reference to `pthread_create'
/tmp/ccjoIFlH.o: In function `intelligent_auth_dos':
/home/#/Downloads/mdk3-v6/mdk3.c:2702: undefined reference to `pthread_create'
/tmp/ccjoIFlH.o: In function `wids_machine':
/home/#/Downloads/mdk3-v6/mdk3.c:2790: undefined reference to `pthread_create'
/tmp/ccjoIFlH.o:/home/#/Downloads/mdk3-v6/mdk3.c:2868: more undefined references to `pthread_create' follow
collect2: ld returned 1 exit status
make: *** [mdk3] Error 1
#:~/Downloads/mdk3-v6$
I have been searching around and have found that there could be a problem with gcc, which I then tried... (Link) However this did not fix the error.
I checked the forum and found the same problem posted a while back but the problem was never resolved.
Does anyone have any advice on this situation?
Regards,
Morfir
Re: Installing MDK3-v6 on Ubuntu 11.10
Try to change
Code:
LINKFLAGS = -lpthread
→
Code:
LINKFLAGS = -pthread
in Makefile.
Also, see this.