patch-Makefile 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. $OpenBSD: patch-Makefile,v 1.1 2017/02/28 12:47:56 benoit Exp $
  2. --- Makefile.orig Fri Jan 27 17:19:18 2017
  3. +++ Makefile Fri Jan 27 18:39:51 2017
  4. @@ -1,5 +1,90 @@
  5. -all:
  6. - @echo Error: you must run "./configure" first
  7. +CC=gcc
  8. +STRIP=strip
  9. +XDEFINES= -DHAVE_MYSQL_MYSQL_H -DLIBOPENSSL -DLIBNCURSES -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE -DLIBMYSQLCLIENT -DLIBPOSTGRES -DLIBSSH -DHAVE_ZLIB -DHAVE_MATH_H
  10. +XLIBS= -lz -lcurses -lssl -lidn -lpcre -lmysqlclient -lpq -lssh -lcrypto
  11. +XLIBPATHS=-L/usr/lib -L/usr/local/lib -L/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/lib
  12. +XIPATHS= -I/usr/local/include/mysql -I/usr/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/postgresql -I/usr/local/include -I/usr/local/include
  13. +PREFIX=/usr/local
  14. +XHYDRA_SUPPORT=xhydra
  15. +STRIP=strip
  16. +HYDRA_LOGO=
  17. +PWI_LOGO=
  18. +SEC=-pie -fPIE -fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
  19. +
  20. +#
  21. +# Makefile for Hydra - (c) 2001-2017 by van Hauser / THC <vh@thc.org>
  22. +#
  23. +OPTS=-I. -O3
  24. +# -Wall -g -pedantic
  25. +LIBS=-lm
  26. +BINDIR = /bin
  27. +MANDIR ?= /man/man1/
  28. +DATADIR ?= /etc
  29. +DESTDIR ?=
  30. +
  31. +SRC = hydra-vnc.c hydra-pcnfs.c hydra-rexec.c hydra-nntp.c hydra-socks5.c \
  32. + hydra-telnet.c hydra-cisco.c hydra-http.c hydra-ftp.c hydra-imap.c \
  33. + hydra-pop3.c hydra-smb.c hydra-icq.c hydra-cisco-enable.c hydra-ldap.c \
  34. + hydra-mysql.c hydra-mssql.c hydra-xmpp.c hydra-http-proxy-urlenum.c \
  35. + hydra-snmp.c hydra-cvs.c hydra-smtp.c hydra-smtp-enum.c hydra-sapr3.c hydra-ssh.c \
  36. + hydra-sshkey.c hydra-teamspeak.c hydra-postgres.c hydra-rsh.c hydra-rlogin.c \
  37. + hydra-oracle-listener.c hydra-svn.c hydra-pcanywhere.c hydra-sip.c \
  38. + hydra-oracle.c hydra-vmauthd.c hydra-asterisk.c hydra-firebird.c hydra-afp.c hydra-ncp.c \
  39. + hydra-oracle-sid.c hydra-http-proxy.c hydra-http-form.c hydra-irc.c \
  40. + hydra-rdp.c hydra-s7-300.c hydra-redis.c hydra-adam6500.c \
  41. + crc32.c d3des.c bfg.c ntlm.c sasl.c hmacmd5.c hydra-mod.c hydra-rtsp.c hydra-time.c hydra-rpcap.c
  42. +OBJ = hydra-vnc.o hydra-pcnfs.o hydra-rexec.o hydra-nntp.o hydra-socks5.o \
  43. + hydra-telnet.o hydra-cisco.o hydra-http.o hydra-ftp.o hydra-imap.o \
  44. + hydra-pop3.o hydra-smb.o hydra-icq.o hydra-cisco-enable.o hydra-ldap.o \
  45. + hydra-mysql.o hydra-mssql.o hydra-xmpp.o hydra-http-proxy-urlenum.o \
  46. + hydra-snmp.o hydra-cvs.o hydra-smtp.o hydra-smtp-enum.o hydra-sapr3.o hydra-ssh.o \
  47. + hydra-sshkey.o hydra-teamspeak.o hydra-postgres.o hydra-rsh.o hydra-rlogin.o \
  48. + hydra-oracle-listener.o hydra-svn.o hydra-pcanywhere.o hydra-sip.o \
  49. + hydra-oracle-sid.o hydra-oracle.o hydra-vmauthd.o hydra-asterisk.o hydra-firebird.o hydra-afp.o hydra-ncp.o \
  50. + hydra-http-proxy.o hydra-http-form.o hydra-irc.o hydra-redis.o \
  51. + hydra-rdp.o hydra-s7-300.c hydra-adam6500.o \
  52. + crc32.o d3des.o bfg.o ntlm.o sasl.o hmacmd5.o hydra-mod.o hydra-rtsp.o hydra-time.o hydra-rpcap.o
  53. +BINS = hydra pw-inspector
  54. +
  55. +EXTRA_DIST = README README.arm README.palm CHANGES TODO INSTALL LICENSE \
  56. + hydra-mod.h hydra.h crc32.h d3des.h
  57. +
  58. +all: pw-inspector hydra $(XHYDRA_SUPPORT)
  59. + @echo
  60. + @echo Now type "make install"
  61. +
  62. +hydra: hydra.c $(OBJ)
  63. + $(CC) $(OPTS) $(SEC) $(LIBS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o hydra $(HYDRA_LOGO) hydra.c $(OBJ) $(LIBS) $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
  64. + @echo
  65. + @echo If men could get pregnant, abortion would be a sacrament
  66. + @echo
  67. +
  68. +xhydra:
  69. + -cd hydra-gtk && sh ./make_xhydra.sh
  70. +
  71. +pw-inspector: pw-inspector.c
  72. + -$(CC) $(OPTS) $(SEC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o pw-inspector $(PWI_LOGO) pw-inspector.c
  73. +
  74. +.c.o:
  75. + $(CC) $(OPTS) $(SEC) $(CFLAGS) $(CPPFLAGS) -c $< $(XDEFINES) $(XIPATHS)
  76. +
  77. +strip: all
  78. + strip $(BINS)
  79. + -echo OK > /dev/null && test -x xhydra && strip xhydra || echo OK > /dev/null
  80. +
  81. +install: strip
  82. + -mkdir -p $(DESTDIR)$(PREFIX)$(BINDIR)
  83. + cp -f hydra-wizard.sh $(BINS) $(DESTDIR)$(PREFIX)$(BINDIR) && cd $(DESTDIR)$(PREFIX)$(BINDIR) && chmod 755 hydra-wizard.sh $(BINS)
  84. + -echo OK > /dev/null && test -x xhydra && cp xhydra $(DESTDIR)$(PREFIX)$(BINDIR) && cd $(DESTDIR)$(PREFIX)$(BINDIR) && chmod 755 xhydra || echo OK > /dev/null
  85. + -sed -e "s|^INSTALLDIR=.*|INSTALLDIR="$(PREFIX)"|" dpl4hydra.sh | sed -e "s|^LOCATION=.*|LOCATION="$(DATADIR)"|" > $(DESTDIR)$(PREFIX)$(BINDIR)/dpl4hydra.sh
  86. + -chmod 755 $(DESTDIR)$(PREFIX)$(BINDIR)/dpl4hydra.sh
  87. + -mkdir -p $(DESTDIR)$(PREFIX)$(DATADIR)
  88. + -cp -f *.csv $(DESTDIR)$(PREFIX)$(DATADIR)
  89. + -mkdir -p $(DESTDIR)$(PREFIX)$(MANDIR)
  90. + -cp -f hydra.1 xhydra.1 pw-inspector.1 $(DESTDIR)$(PREFIX)$(MANDIR)
  91. +
  92. clean:
  93. + rm -rf xhydra pw-inspector hydra *.o core *.core *.stackdump *~ Makefile.in Makefile dev_rfc hydra.restore arm/*.ipk arm/ipkg/usr/bin/* hydra-gtk/src/*.o hydra-gtk/src/xhydra hydra-gtk/stamp-h hydra-gtk/config.status hydra-gtk/errors hydra-gtk/config.log hydra-gtk/src/.deps hydra-gtk/src/Makefile hydra-gtk/Makefile
  94. cp -f Makefile.orig Makefile
  95. +