ports/58164: Fix security/hydra build on -CURRENT

Samy Al Bahra samy at kerneled.com
Fri Oct 17 13:30:05 UTC 2003


>Number:         58164
>Category:       ports
>Synopsis:       Fix security/hydra build on -CURRENT
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 17 06:30:03 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Samy Al Bahra
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Kerneled 
>Environment:


System: FreeBSD beastie.freebsd.local 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Aug 20 18:35:24 AST 2003     samy at beastie.freebsd.local:/usr/src/sys/i386/compile/KERNELED i386  


>Description:


Multi-string literals are depreciated on 5.X.
(gcc 3.X). Hydra's usage disallows it from building
on -CURRENT systems.	


>How-To-Repeat:


Build on a 5.X box.


>Fix:


diff -ruN hydra/Makefile /tmp/hydra/Makefile
--- hydra/Makefile	Fri Oct 17 16:13:23 2003
+++ /tmp/hydra/Makefile	Fri Oct 17 16:25:46 2003
@@ -20,10 +20,6 @@
 
 GNU_CONFIGURE=	yes
 
-.if ${OSVERSION} >= 501000
-BROKEN=		"Does not compile"
-.endif
-
 .if !target(post-install) && (${PORTNAME} == "hydra")
 post-install:
 	@${STRIP_CMD} ${PREFIX}/bin/hydra
diff -ruN hydra/files/patch-hydra.c /tmp/hydra/files/patch-hydra.c
--- hydra/files/patch-hydra.c	Thu Jan  1 03:00:00 1970
+++ /tmp/hydra/files/patch-hydra.c	Fri Oct 17 16:26:38 2003
@@ -0,0 +1,56 @@
+--- hydra.c.orig	Fri Oct 17 16:25:46 2003
++++ hydra.c	Fri Oct 17 16:25:46 2003
+@@ -55,33 +55,30 @@
+ static pid_t pids[MAXTASKS];
+ 
+ void help() {
+-    printf("%s %s (c) 2002 by %s %s
+-Syntax:  %s [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-o FILE] [-t TASKS] [-g TASKS] [-w TIME] [-f] [-e ns] [-s PORT] [-S] server service [OPT]\n",
++    printf("%s %s (c) 2002 by %s %s\n"\
++"Syntax:  %s [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-o FILE] [-t TASKS] [-g TASKS] [-w TIME] [-f] [-e ns] [-s PORT] [-S] server service [OPT]\n",
+ PROGRAM,VERSION,AUTHOR,EMAIL,prg);
+ printf("\nOptions:");
+ #ifdef HYDRA_SSL
+-printf("
+-    -S        connect via SSL");
++printf("\n    -S        connect via SSL");
+ #endif
+-printf("
+-    -s PORT   if the service is on a different default port, define it here
+-    -l LOGIN or -L FILE login with LOGIN name, or load several logins from FILE
+-    -p PASS  or -P FILE try password PASS, or load several passwords from FILE
+-    -e ns     additional checks, \"n\" for null password, \"s\" try login as pass
+-    -C FILE   colon seperated \"login:pass\" format, instead of -L/-P option
+-    -o FILE   write found login/password pairs to FILE instead of stdout
+-    -f        exit after the first found login/password pair
+-    -t TASKS  run TASKS number of connects in parallel (default: %d)
+-    -g TASKS  start TASKS number per second until -t TASKS are reached
+-    -w TIME   in seconds, defines the max wait reply time (default: %d)
+-    server    the target server
+-    service   the service to crack. Supported protocols: [%s]
+-    OPT       some service modules need additional input, put it here
+-
+-%s is a tool to guess valid login/password pairs on a target server.
+-You can always find the newest version at %s
+-Use this tool only for legal purposes!
+-",TASKS,WAITTIME,SERVICES,PROGRAM,RESSOURCE);
++printf("\n"\
++"    -s PORT   if the service is on a different default port, define it here\n"\
++"    -l LOGIN or -L FILE login with LOGIN name, or load several logins from FILE\n"\
++"    -p PASS  or -P FILE try password PASS, or load several passwords from FILE\n"\
++"    -e ns     additional checks, \"n\" for null password, \"s\" try login as pass\n"\
++"    -C FILE   colon seperated \"login:pass\" format, instead of -L/-P option\n"\
++"    -o FILE   write found login/password pairs to FILE instead of stdout\n"\
++"    -f        exit after the first found login/password pair\n"\
++"    -t TASKS  run TASKS number of connects in parallel (default: %d)\n"\
++"    -g TASKS  start TASKS number per second until -t TASKS are reached\n"\
++"    -w TIME   in seconds, defines the max wait reply time (default: %d)\n"\
++"    server    the target server\n"\
++"    service   the service to crack. Supported protocols: [%s]\n"\
++"    OPT       some service modules need additional input, put it here\n\n"\
++"%s is a tool to guess valid login/password pairs on a target server.\n"\
++"You can always find the newest version at %s\n"\
++"Use this tool only for legal purposes!\n",TASKS,WAITTIME,SERVICES,PROGRAM,RESSOURCE);
+     exit(-1);
+ }
+ 



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list