From root@tirion.argosnet.com  Sat Apr 10 01:21:42 2004
Return-Path: <root@tirion.argosnet.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E16BE16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 10 Apr 2004 01:21:41 -0700 (PDT)
Received: from tirion.argosnet.com (stbarthelemy-2-82-224-1-141.fbx.proxad.net [82.224.1.141])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A1FB343D46
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 10 Apr 2004 01:21:40 -0700 (PDT)
	(envelope-from root@tirion.argosnet.com)
Received: from tirion.argosnet.com (localhost.argosnet.com [127.0.0.1])
	by tirion.argosnet.com (8.12.9p2/8.12.9) with ESMTP id i3A7qTjF064836
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 10 Apr 2004 09:52:29 +0200 (CEST)
	(envelope-from root@tirion.argosnet.com)
Received: (from root@localhost)
	by tirion.argosnet.com (8.12.9p2/8.12.9/Submit) id i3A7gLae064350;
	Sat, 10 Apr 2004 09:42:21 +0200 (CEST)
	(envelope-from root)
Message-Id: <200404100742.i3A7gLae064350@tirion.argosnet.com>
Date: Sat, 10 Apr 2004 09:42:21 +0200 (CEST)
From: Laurent LEVIER <llevier@argosnet.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Hydra 3.1 port upgrade
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         65395
>Category:       ports
>Synopsis:       Hydra 3.1 port upgrade
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 10 01:30:22 PDT 2004
>Closed-Date:    Wed May 05 13:26:19 PDT 2004
>Last-Modified:  Wed May 05 13:26:19 PDT 2004
>Originator:     Laurent LEVIER
>Release:        FreeBSD 4.9-RELEASE-p4 i386
>Organization:
none
>Environment:
System: FreeBSD tirion.argosnet.com 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4 #0: Sun Mar 21 18:24:38 CET 2004 root@tirion.argosnet.com:/usr/obj/usr/src/sys/TIRION i386


	
>Description:
	
>How-To-Repeat:
	
>Fix:

	

--- hydra-3.1.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	hydra
#	hydra/files
#	hydra/files/patch-hydra-smbnt
#	hydra/Makefile
#	hydra/distinfo
#	hydra/pkg-descr
#
echo c - hydra
mkdir -p hydra > /dev/null 2>&1
echo c - hydra/files
mkdir -p hydra/files > /dev/null 2>&1
echo x - hydra/files/patch-hydra-smbnt
sed 's/^X//' >hydra/files/patch-hydra-smbnt << 'END-of-hydra/files/patch-hydra-smbnt'
X--- hydra-smbnt.c.orig	Sat Apr 10 09:35:10 2004
X+++ hydra-smbnt.c	Sat Apr 10 09:35:22 2004
X@@ -267,6 +267,7 @@
X   };
X 
X   char rbuf[400];
X+  int i = 0;
X 
X   memset(rbuf, 0, 400);
X 
X@@ -278,7 +279,6 @@
X 
X   /* find the primary domain/workgroup name */
X   memset(workgroup, 0, 16);
X-  int i = 0;
X   while ((rbuf[81+i*2] != 0) && (i<16)) {
X     workgroup[i] = rbuf[81+i*2];
X     i++;
END-of-hydra/files/patch-hydra-smbnt
echo x - hydra/Makefile
sed 's/^X//' >hydra/Makefile << 'END-of-hydra/Makefile'
X# ex:ts=8
X# Ports collection makefile for:  hydra
X# Date created:			  Tue Oct 08, 2002
X# Whom:				  Laurent LEVIER (llevier@argosnet.com)
X#
X# $FreeBSD: ports/security/hydra/Makefile,v 3.1 2004/04/08 22:19:42 cy Exp $
X#
X
XPORTNAME=	hydra
XPORTVERSION=	3.1
XPORTREVISION=	1
XCATEGORIES=	security
XMASTER_SITES=	http://www.thc.org/releases/ \
X		${MASTER_SITE_PACKETSTORM}
XMASTER_SITE_SUBDIR=	groups/thc
X
XMAINTAINER=	llevier@argosnet.com
XCOMMENT=	Brute force attack utility working on multiple network services
X
XNO_LATEST_LINK=	yes
XPLIST_FILES=	bin/hydra
XUSE_REINPLACE=	yes
XGNU_CONFIGURE=	yes
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|CC = gcc||; \
X		s|-O2|${CFLAGS}|' \
X		${WRKSRC}/Makefile.am
X
Xdo-install:
X	@${INSTALL_PROGRAM} ${WRKSRC}/hydra ${PREFIX}/bin
X
X.include <bsd.port.mk>
END-of-hydra/Makefile
echo x - hydra/distinfo
sed 's/^X//' >hydra/distinfo << 'END-of-hydra/distinfo'
XMD5 (hydra-3.1.tar.gz) = c2b9beb20e9234967b399b7f80252677
END-of-hydra/distinfo
echo x - hydra/pkg-descr
sed 's/^X//' >hydra/pkg-descr << 'END-of-hydra/pkg-descr'
XHydra is a parallized login hacker utility. Hydra can brute force attack on 
XFTP, POP3, IMAP, Telnet, HTTP Auth, NNTP, VNC, ICQ, Socks5, PCNFS and more 
Xservices within SSL support. This port is provided as a standalone program to
Xavoid installing a full Nessus scanner system.
X
XNEWS: Hydra is now included in Nessus!
X
XWWW: http://www.thc.org/releases.php
END-of-hydra/pkg-descr
exit
--- hydra-3.1.shar ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: arved 
State-Changed-When: Tue Apr 20 02:58:41 PDT 2004 
State-Changed-Why:  
Please submit updates in diff format as described in the porters handbook. 
PORTREVISION should be resetted after a version upgrade. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=65395 

From: Mikhail Teterin <mi+mx@aldan.algebra.com>
To: freebsd-gnats-submit@FreeBSD.org, llevier@argosnet.com
Cc:  
Subject: Re: ports/65395: Hydra 3.1 port upgrade
Date: Mon, 3 May 2004 15:59:47 -0400

 --Boundary-00=_zSqlAmBgpX+VFZT
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Hi, Laurent!
 
 I intent to commit the patch below, which will upgrade the port
 to the freshly released 4.0.
 
 In addition, I plan to add the two attached patches to the port's
 files-directory, so that the smbnt-cracking is always enabled
 using OpenSSL instead of libdes and fixing some printf-formating
 discrepancies.b
 
 Please, respond promptly if you have any considerations. Thanks!
 
 Yours,
 
 	-mi
 
 cvs server: Diffing .
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/security/hydra/Makefile,v
 retrieving revision 1.8
 diff -U2 -r1.8 Makefile
 --- Makefile	28 Mar 2004 17:35:46 -0000	1.8
 +++ Makefile	3 May 2004 19:55:53 -0000
 @@ -8,8 +8,9 @@
  
  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
  
 @@ -24,5 +25,5 @@
  post-patch:
  	@${REINPLACE_CMD} -e 's|CC = gcc||; \
 -		s|-O2|${CFLAGS}|' \
 +		s|-O2|${CFLAGS}|; s|md4\..||g' \
  		${WRKSRC}/Makefile.am
  
 Index: distinfo
 ===================================================================
 RCS file: /home/ncvs/ports/security/hydra/distinfo,v
 retrieving revision 1.2
 diff -U2 -r1.2 distinfo
 --- distinfo	28 Mar 2004 17:35:46 -0000	1.2
 +++ distinfo	3 May 2004 19:55:53 -0000
 @@ -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
 
 
 --Boundary-00=_zSqlAmBgpX+VFZT
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="patch-smbnt"
 Content-Transfer-Encoding: 7bit
 Content-Description: Use OpenSSL's DES_* and MD4_* functions
 Content-Disposition: attachment;
 	filename="patch-smbnt"
 
 --- 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 <des.h>
 +#include <openssl/md4.h>
 +#include <openssl/des.h>
 +#include <openssl/des_old.h>
  
  /*
 @@ -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 */
    }
  
 
 --Boundary-00=_zSqlAmBgpX+VFZT
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="patch-printf"
 Content-Transfer-Encoding: 7bit
 Content-Description: fix printf-related warnings
 Content-Disposition: attachment;
 	filename="patch-printf"
 
 --- 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,
 
 --Boundary-00=_zSqlAmBgpX+VFZT--

From: Mikhail Teterin <mi+kde@aldan.algebra.com>
To: Laurent LEVIER <llevier@argosnet.com>
Cc: Mikhail Teterin <mi+mx@aldan.algebra.com>,
	freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/65395: Hydra 3.1 port upgrade
Date: Tue, 4 May 2004 05:01:20 -0400

 On Tuesday 04 May 2004 01:44 am, Laurent LEVIER wrote:
 
 = >In addition, I plan to add the two attached patches to the port's
 = >files-directory, so that the smbnt-cracking is always enabled using
 = >OpenSSL instead of libdes
 
 = I did not checked the difference between using OpenSSL and libdes.
 = Does it bring something?
 
 There is no libdes.so on -current nor on modern -stable.
 OpenSSL provides its own compatible implementation (see comment in
 /usr/include/openssl/des_old.h). Hydra links with OpenSSL anyway --
 there is no need to drag in -ldes even if available. Same applies to md4
 -- there is no need to compile Hydra's own md4.c -- FreeBSD has its own
 (two!) implementations -- in -lcrypto (OpenSSL) and in -lmd. Hydra's
 d3des.c is, probably, redundant too, but getting rid of it seems a
 little more involved.
 
 = I'll respond about each point on end of this week maximum, after I
 = created my own 4.0 port to validate your patches. Is it acceptable?
 
 Certainly. Thanks for a prompt response!
 
 	-mi
 
State-Changed-From-To: feedback->closed 
State-Changed-By: mi 
State-Changed-When: Wed May 5 13:25:24 PDT 2004 
State-Changed-Why:  
The port is now upgraded to version 4.0 (with maintainer's approval). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=65395 
>Unformatted:
