vanhauser-thc / thc-hydra

hydra
GNU Affero General Public License v3.0
9.75k stars 2.03k forks source link

Hydra fails to install #142

Closed DeadPackets closed 8 years ago

DeadPackets commented 8 years ago

Im trying to update Hydra to the newest version, and this is what happens when I run ./configure --de ebug Starting hydra auto configuration ...

`
Detected 64 Bit Linux OS

Checking for zlib (libz.so, zlib.h) ...
                                        ... found
Checking for openssl (libssl, libcrypto, ssl.h, sha.h) ...
DEBUG: SSL_LIB= include /etc/ld.so.conf.d/i386-linux-gnu_GL.conf /etc/ld.so.conf.d/libintelopencl.conf /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf /opt/intel/opencl /usr/lib/i386-linux-gnu/mesa /usr/lib/x86_64-linux-gnu/mesa /usr/lib/x86_64-linux-gnu/mesa-egl /usr/lib/x86_64-linux-gnu/mir/clientplatform/mesa /usr/lib/x86_64-linux-gnu/mir/platformgraphics/mesa /lib64 /usr/lib64 /usr/local/lib64 /opt/local/lib64 /lib /usr/lib /usr/local/lib /opt/local/lib /usr/local/ssl /usr/local/ssl/lib
DEBUG: SSL_INC=/usr/include /usr/local/include /opt/include /opt/local/include /usr/local/ssl/include
DEBUG: SSL_PATH=/usr/local/ssl/lib/libssl
DEBUG: CRYPTO_PATH=/usr/local/ssl/lib/libcrypto
DEBUG: SSL_INC=/usr/include/openssl/ssl.h
                                                       ... found
Checking for idn (libidn.so) ...
DEBUG: IDN_PATH=/libidn
DEBUG: IDN_IPATH=/stringprep.h
DEBUG: PR29_IPATH=/pr29.h
                             ... NOT found, unicode logins and passwords will not be supported
Checking for curses (libcurses.so / term.h) ...
DEBUG: CURSES_PATH=/libcurses
DEBUG: CURSES_IPATH=/term.h
                                            ... NOT found, color output disabled
Checking for pcre (libpcre.so, pcre.h) ...
DEBUG: PCRE_PATH=/libpcre
DEBUG: PCRE_IPATH=/pcre.h
                                       ... NOT found, server response checks will be less reliable
Checking for Postgres (libpq.so, libpq-fe.h) ...
DEBUG: POSTGRES_PATH=/usr/lib/libpq
DEBUG: POSTGRES_IPATH=/usr/include/postgresql/libpq-fe.h
                                             ... found
Checking for SVN (libsvn_client-1 libapr-1.so libaprutil-1.so) ...
DEBUG: SVN_PATH=/libsvn_client-1
DEBUG: APR_PATH=/libapr
DEBUG: SVN_IPATH=/usr/include/apr-1.0/
DEBUG: APR_IPATH=/usr/include/apr-1.0/
                                                               ... NOT found, module svn disabled
Checking for firebird (libfbclient.so) ...
DEBUG: FIREBIRD_PATH=/libfbclient
DEBUG: FIREBIRD_IPATH=/ibase.h
                                       ... NOT found, module firebird disabled
Checking for MYSQL client (libmysqlclient.so, math.h) ...
DEBUG: MYSQL_PATH=/libmysqlclient
DEBUG: MYSQL_IPATH=/mysql.h
                                                      ... NOT found, module Mysql will not support version > 4.x
Checking for AFP (libafpclient.so) ...
DEBUG: AFP_PATH=/libafpclient
DEBUG: AFP_IPATH=/afp.h
                                   ... NOT found, module Apple Filing Protocol disabled - Apple sucks anyway
Checking for NCP (libncp.so / nwcalls.h) ...
DEBUG: NCP_PATH=/libncp
DEBUG: NCP_IPATH=/ncp/nwcalls.h
                                         ... NOT found, module NCP disabled
Checking for SAP/R3 (librfc/saprfc.h) ...
DEBUG: SAPR3_PATH=include/librfc
DEBUG: SAPR3_IPATH=/saprfc.h
                                      ... NOT found, module sapr3 disabled
Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp
Checking for libssh (libssh/libssh.h) ...
DEBUG: SSH_PATH=/libssh
DEBUG: SSH_IPATH=/usr/include/libssh/libssh.h
                                      ... NOT found, module ssh disabled
Get it from http://www.libssh.org
Checking for Oracle (libocci.so libclntsh.so / oci.h and libaio.so) ...
DEBUG: ORACLE_LIB= include /etc/ld.so.conf.d/i386-linux-gnu_GL.conf /etc/ld.so.conf.d/libintelopencl.conf /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf /etc/ld.so.conf.d/x86_64-linux-gnu_mirclientplatform.conf /etc/ld.so.conf.d/x86_64-linux-gnu_mirplatformgraphics.conf /opt/intel/opencl /usr/lib/i386-linux-gnu/mesa /usr/lib/x86_64-linux-gnu/mesa /usr/lib/x86_64-linux-gnu/mesa-egl /usr/lib/x86_64-linux-gnu/mir/clientplatform/mesa /usr/lib/x86_64-linux-gnu/mir/platformgraphics/mesa /lib64 /usr/lib64 /usr/local/lib64 /opt/local/lib64 /lib /usr/lib /usr/local/lib /opt/local/lib
DEBUG: ORACLE_INC=/usr/include /usr/local/include /opt/include /opt/local/include
DEBUG: ORACLE_PATH=/libocci
DEBUG: ORACLE_PATH=/libaio
DEBUG: ORACLE_IPATH=/oci.h
                                                                    ... NOT found, module Oracle disabled
Get basic and sdk package from http://www.oracle.com/technetwork/database/features/instant-client/index.html
Checking for GUI req's (pkg-config, gtk+-2.0) ...
                                              ... found
Checking for Android specialities ...
                                  ... rindex() found
                                  ... RSA_generate_key() found
Checking for secure compile option support in gcc ...
                                                  Compiling... yes
                                                  Linking... yes

Hydra will be installed into .../bin of: /usr/local
  (change this by running ./configure --prefix=path)

DEBUG: XDEFINES= -DLIBOPENSSL -DLIBPOSTGRES -DHAVE_ZLIB -DHAVE_MATH_H
DEBUG: XLIBS= -lz -lssl -lpq -lcrypto
DEBUG: XLIBPATHS=-L/usr/lib -L/usr/local/lib -L/lib -L/usr/local/ssl/lib -L/usr/lib
DEBUG: XIPATHS= -I/usr/include/postgresql
DEBUG: PREFIX=/usr/local
DEBUG: XHYDRA_SUPPORT=xhydra
DEBUG: STRIP=strip
Writing Makefile.in ...
now type "make"

`

And when I check all these directories for those files, I find them. But hydra cant see them.

And when I run "make" I get this error:

gcc -I. -O3 -pie -fPIE -fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wl,-z,now -Wl,-z,relro -lm    -o hydra  hydra.c hydra-vnc.o hydra-pcnfs.o hydra-rexec.o hydra-nntp.o hydra-socks5.o hydra-telnet.o hydra-cisco.o hydra-http.o hydra-ftp.o hydra-imap.o hydra-pop3.o hydra-smb.o hydra-icq.o hydra-cisco-enable.o hydra-ldap.o hydra-mysql.o hydra-mssql.o hydra-xmpp.o hydra-http-proxy-urlenum.o hydra-snmp.o hydra-cvs.o hydra-smtp.o hydra-smtp-enum.o hydra-sapr3.o hydra-ssh.o hydra-sshkey.o hydra-teamspeak.o hydra-postgres.o hydra-rsh.o hydra-rlogin.o hydra-oracle-listener.o hydra-svn.o hydra-pcanywhere.o hydra-sip.o hydra-oracle-sid.o hydra-oracle.o hydra-vmauthd.o hydra-asterisk.o hydra-firebird.o hydra-afp.o hydra-ncp.o hydra-http-proxy.o hydra-http-form.o hydra-irc.o hydra-redis.o hydra-rdp.o hydra-s7-300.c crc32.o d3des.o bfg.o ntlm.o sasl.o hmacmd5.o hydra-mod.o hydra-rtsp.o hydra-time.o -lm -lz -lssl -lpq -lcrypto -L/usr/lib -L/usr/local/lib -L/lib -L/usr/local/ssl/lib -L/usr/lib -I/usr/include/postgresql -DLIBOPENSSL -DLIBPOSTGRES -DHAVE_ZLIB -DHAVE_MATH_H
hydra.c: In function ‘main’:
hydra.c:3960:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘int’ [-Wformat=]
         printf("[BUG] %lu + %lu < %lu\n", hydra_brains.todo_all, total_redo_count, hydra_brains.sent);
         ^
/usr/bin/ld: /usr/local/ssl/lib/libssl.a(s23_clnt.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libssl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [hydra] Error 1

I installed the previous versions of Hydra without issue, why is this happening now? Am I missing something?

vanhauser-thc commented 8 years ago

that is not error that is in error - it is your system.

you have a x64 compiler and the libraries you are compiling against are 32bit. If you have the right libraries somewhere, change the -L in the Makefile as first entry

DeadPackets commented 8 years ago

Alright, will try and I'll let you know

DeadPackets commented 8 years ago

Is there a way to install hydra or compile it on a x64 Ubuntu system without breaking everything? Even the -m32 flag doesnt work since it cant find its libraries

DeadPackets commented 8 years ago

I have resolved the installation issue by compiling hydra in 32 bit. Thank you.

anonberry commented 2 years ago

I was trying to install Hydra on termux but after typing './configure --de' this is what I got Starting hydra auto configuration ... Detected 32 Bit Linux OS

Checking for zlib (libz/zlib.h) ... ... zlib not found, gzip support disabled Checking for openssl (libssl/libcrypto/ssl.h/sha.h) ... ... NOT found, SSL support disabled Get it from http://www.openssl.org Checking for gcrypt (libgcrypt/gpg-error.h) ... ... gcrypt not found, radmin2 module disabled Checking for idn (libidn) ... ... NOT found, unicode logins and passwords will not be supported Checking for curses (libcurses/term.h) ... ... NOT found, color output disabled Checking for pcre (libpcre/pcre.h) ... ... NOT found, server response checks will be less reliable Checking for Postgres (libpq/libpq-fe.h) ... ... NOT found, module postgres disabled Checking for SVN (libsvn_client-1/libapr-1/libaprutil-1) ... ... NOT found, module svn disabled Checking for firebird (libfbclient) ... ... NOT found, module firebird disabled Checking for MYSQL client (libmysqlclient/math.h) ... ... math.h not found, module Mysql disabled Checking for AFP (libafpclient) ... ... NOT found, module Apple Filing Protocol disabled - Apple sucks anyway Checking for NCP (libncp/nwcalls.h) ... ... NOT found, module NCP disabled Checking for SAP/R3 (librfc/saprfc.h) ... ... NOT found, module sapr3 disabled Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp Checking for libssh (libssh/libssh.h) ... ... NOT found, module ssh disabled Get it from http://www.libssh.org Checking for Oracle (libocci/libclntsh/oci.h/libaio/liboci) ... ... NOT found, module Oracle disabled Get basic and sdk package from http://www.oracle.com/technetwork/database/features/instant-client/index.html Checking for Memcached (libmemcached/memcached.h) ... ... NOT found, module memcached disabled Checking for Freerdp3 (libfreerdp3/freerdp.h/libwinpr3/winpr.h) ... ... NOT found, checking for freerdp2 module next... Checking for Freerdp2 (libfreerdp2/freerdp.h/libwinpr2/winpr.h) ... ... NOT found, module rdp disabled Checking for Mongodb (libmongoc-1.0/mongoc.h/libbson-1.0/bson.h) ... ... NOT found, module mongodb disabled Checking for smbclient (libsmbclient/libsmbclient.h) ... ... NOT found, module smb2 disabled Checking for GUI req's (pkg-config/gtk+-2.0) ... ... NOT found, optional anyway Checking for Android specialities ... ... strrchr() found Checking for secure compile option support in gcc ... Compiling... yes Linking... yes Checking for --allow-multiple-definition linker option ... yes

Hydra will be installed into .../bin of: /usr/local (change this by running ./configure --prefix=path)

Writing Makefile.in ... now type "make"

And after typing "make" there's an error cc -I. -O3 -g -fcommon -pie -fPIE -fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wl,-z,now -Wl,-z,relro -Wl,--allow-multiple-definition -g -c hydra-http-form.c clang-13: warning: -Wl,-z,now: 'linker' input unused [-Wunused-command-line-argument] clang-13: warning: -Wl,-z,relro: 'linker' input unused [-Wunused-command-line-argument] clang-13: warning: -Wl,--allow-multiple-definition: 'linker' input unused [-Wunused-command-line-argument] clang-13: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument] hydra-http-form.c:262:5: error: non-void function 'add_header' should return a value [-Wreturn-type] return; ^ hydra-http-form.c:349:71: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat] hydra_report(stderr, "[ERROR] Out of memory (hdrrepv %lu)\n", strlen(new_value) + 1);


                                                             %u
1 warning and 1 error generated.
make: *** [Makefile:80: hydra-http-form.o] Error 1
itsukiminami2 commented 2 years ago

Go to line 262 in the file hydra-http-form.c and replace the empty return statement with - "return 0;"