glv2 / bruteforce-luks

Try to find the password of a LUKS encrypted volume.
GNU General Public License v3.0
238 stars 34 forks source link

compilation error #7

Closed MikeCockrem closed 7 years ago

MikeCockrem commented 8 years ago

Hi,

Sorry if this is the wrong place for this, I think it should be here. Having trouble compiling this from source,

System: Linux bigbox 2.6.32-642.1.1.el6.x86_64 #1 SMP Tue May 31 21:57:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I did a standard ./autogen ./configure (which was OK) then make throws out an error:

[root@bigbox bruteforce-luks]# make depbase=echo src/bruteforce-luks.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';\ gcc -DPACKAGE_NAME=\"bruteforce_luks\" -DPACKAGE_TARNAME=\"bruteforce_luks\" -DPACKAGE_VE RSION=\"1.2.0\" -DPACKAGE_STRING=\"bruteforce_luks\ 1.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\" bruteforce_luks\" -DVERSION=\"1.2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 - DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAV E_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ERRNO_H=1 -DHAVE_LOCALE_H=1 -DHAVE_MATH_H=1 -DHAVE_SIGNAL_H =1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DHAVE_CALLOC=1 -DHAVE_M ALLOC=1 -DHAVE_REALLOC=1 -DHAVE_FREE=1 -DHAVE_PERROR=1 -DHAVE_PRINTF=1 -DHAVE_FPRINTF=1 -DHAVE_SN PRINTF=1 -DHAVE_FOPEN=1 -DHAVE_FGETC=1 -DHAVE_ATOI=1 -DHAVE_SETLOCALE=1 -DHAVEMBSTOWCS=1 -DHAVE WCSNCPY=1 -DHAVE_WCSTOMBS=1 -DHAVE_GETOPT=1 -DHAVE_SIGNAL=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DH AVE_PTHREAD_H=1 -DHAVE_LIBCRYPTSETUP=1 -DHAVE_LIBCRYPTSETUP_H=1 -I. -g -O2 -MT src/bruteforce -luks.o -MD -MP -MF $depbase.Tpo -c -o src/bruteforce-luks.o src/bruteforce-luks.c &&\ mv -f $depbase.Tpo $depbase.Po In file included from src/bruteforce-luks.c:22: /usr/include/libcryptsetup.h:95: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:164: error: expected specifier-qualifier-list before ‘size_t’ /usr/include/libcryptsetup.h:190: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:256: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:273: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:298: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:300: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:329: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:331: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:348: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:350: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:409: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:428: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:448: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:475: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:477: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:490: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libcryptsetup.h:591: error: expected declaration specifiers or ‘...’ before ‘size_t’ src/bruteforce-luks.c: In function ‘decryption_func_bruteforce’: src/bruteforce-luks.c:138: error: too many arguments to function ‘crypt_activate_by_passphrase’ src/bruteforce-luks.c: In function ‘decryption_func_dictionary’: src/bruteforce-luks.c:264: error: too many arguments to function ‘crypt_activate_by_passphrase’ make: *\ [src/bruteforce-luks.o] Error 1 [root@bigbox bruteforce-luks]#

Can you advise?

Cheers

glv2 commented 8 years ago

The error message looks like the one in issue #3 that was caused by a too old version of the cryptsetup library. Which version is installed on your system?

MikeCockrem commented 8 years ago

Ah, could be... Centos 6 is a bit on the old side

rpm -qa | grep cryptsetup cryptsetup-luks-devel-1.2.0-11.el6.x86_64 cryptsetup-luks-1.2.0-11.el6.x86_64 cryptsetup-reencrypt-libs-1.6.4-2.el6.x86_64 python-cryptsetup-0.0.11-1.el6.x86_64 cryptsetup-reencrypt-1.6.4-2.el6.x86_64 cryptsetup-luks-libs-1.2.0-11.el6.x86_64

glv2 commented 8 years ago

If you can install a more recent version of cryptsetup (>= 1.6.4 I think), the program should compile.

MikeCockrem commented 8 years ago

Tested in a VM with latest debian, resolved the issue. I guess it's just Centos's ancient libraries. Cheers.