From f905b6fb85301b2114148510d79e2c2f6f1a6760 Mon Sep 17 00:00:00 2001 From: Mikhail Teterin Date: Wed, 5 May 2004 20:24:04 +0000 Subject: Upgrade from 2.6 to 4.0. Declare USE_OPENSSL. Use the OpenSSL's libraries instead of looking for the obsolete libdes. Use OpenSSL's MD4-functions instead of compiling Hydra's own md4.c. Approved by: maintainer --- security/hydra/Makefile | 6 ++++-- security/hydra/distinfo | 4 ++-- security/hydra/files/patch-printf | 16 ++++++++++++++++ security/hydra/files/patch-smbnt | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 security/hydra/files/patch-printf create mode 100644 security/hydra/files/patch-smbnt (limited to 'security/hydra') diff --git a/security/hydra/Makefile b/security/hydra/Makefile index d006184b2a36..d896866d5e9f 100644 --- a/security/hydra/Makefile +++ b/security/hydra/Makefile @@ -7,10 +7,11 @@ # PORTNAME= hydra -PORTVERSION= 2.6 +PORTVERSION= 4.0 CATEGORIES= security MASTER_SITES= http://www.thc.org/releases/ \ ${MASTER_SITE_PACKETSTORM} +EXTRACT_SUFX= -src.tar.gz MASTER_SITE_SUBDIR= groups/thc MAINTAINER= llevier@argosnet.com @@ -20,10 +21,11 @@ NO_LATEST_LINK= yes PLIST_FILES= bin/hydra USE_REINPLACE= yes GNU_CONFIGURE= yes +USE_OPENSSL= yes post-patch: @${REINPLACE_CMD} -e 's|CC = gcc||; \ - s|-O2|${CFLAGS}|' \ + s|-O2|${CFLAGS}|; s|md4\..||g' \ ${WRKSRC}/Makefile.am do-install: diff --git a/security/hydra/distinfo b/security/hydra/distinfo index c6c88c4abde5..642b6115fd44 100644 --- a/security/hydra/distinfo +++ b/security/hydra/distinfo @@ -1,2 +1,2 @@ -MD5 (hydra-2.6.tar.gz) = 293dbc40e9b1ae67cd74a9e5495bd389 -SIZE (hydra-2.6.tar.gz) = 48954 +MD5 (hydra-4.0-src.tar.gz) = 858e0b049fed9dcf06c7c8d052579f69 +SIZE (hydra-4.0-src.tar.gz) = 82558 diff --git a/security/hydra/files/patch-printf b/security/hydra/files/patch-printf new file mode 100644 index 000000000000..dd94734267b5 --- /dev/null +++ b/security/hydra/files/patch-printf @@ -0,0 +1,16 @@ +--- hydra.c Fri Apr 16 11:37:13 2004 ++++ hydra.c Mon May 3 15:43:51 2004 +@@ -215,5 +215,5 @@ + return; + +- printf("[DEBUG] Code: %s Time: %lu\n", string, time(NULL)); ++ printf("[DEBUG] Code: %s Time: %lu\n", string, (long unsigned)time(NULL)); + printf("[DEBUG] Options: mode %d ssl %d restore %d showAttempt %d tasks %d tnp %d tpsal %d exit_found %d miscptr %s service %s\n", + hydra_options.mode, hydra_options.ssl, hydra_options.restore, hydra_options.showAttempt, hydra_options.tasks, +@@ -1608,5 +1608,5 @@ + if ((hydra_brains.todo_all - hydra_brains.sent) / (hydra_brains.sent / (elapsed_status - starttime)) < 150) + status_print = 59; +- printf("[STATUS] %.2f tries/min, %lu tries in %02lu:%02luh, %lu todo in %02lu:%02luh\n", ++ printf("[STATUS] %.2f tries/min, %lu tries in %02d:%02dh, %lu todo in %02lu:%02luh\n", + (1.0 * hydra_brains.sent) / (((elapsed_status - starttime) * 1.0) / 60), hydra_brains.sent, (elapsed_status - starttime) / 3600, + ((elapsed_status - starttime) % 3600) / 60, hydra_brains.todo_all - hydra_brains.sent, diff --git a/security/hydra/files/patch-smbnt b/security/hydra/files/patch-smbnt new file mode 100644 index 000000000000..e59af5aa7e6d --- /dev/null +++ b/security/hydra/files/patch-smbnt @@ -0,0 +1,32 @@ +--- configure Thu Nov 20 10:45:28 2003 ++++ configure Mon May 3 15:14:26 2004 +@@ -26,5 +26,5 @@ + LIBDIRS=`cat /etc/ld.so.conf 2> /dev/null` + PREFIX=`echo "$1"|sed 's/.*--prefix=//'` +-LIBDES="" ++LIBDES=" " + echo + +--- hydra-smbnt.c Fri Dec 12 03:47:16 2003 ++++ hydra-smbnt.c Mon May 3 15:19:09 2004 +@@ -5,6 +5,7 @@ + } + #else +-#include "md4.h" +-#include ++#include ++#include ++#include + + /* +@@ -132,7 +132,7 @@ + unicodePassword[i * 2] = (u_char)pass[i]; + +- MD4Init(&md4Context); +- MD4Update(&md4Context, unicodePassword, mdlen); +- MD4Final(hash, &md4Context); /* Tell MD4 we're done */ ++ MD4_Init(&md4Context); ++ MD4_Update(&md4Context, unicodePassword, mdlen); ++ MD4_Final(hash, &md4Context); /* Tell MD4 we're done */ + } + -- cgit v1.2.3