summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2011-07-20 15:34:38 +0000
committerJeroen Roovers <jer@gentoo.org>2011-07-20 15:34:38 +0000
commite55c5f7a50eb162c7bef2b61698d1f3b37ee2d42 (patch)
treef7c665513dc7535a70963d30faf6af4f3497c37b /net-analyzer/hydra
parentrespect compile flags (bug #375739) (diff)
downloadgentoo-2-e55c5f7a50eb162c7bef2b61698d1f3b37ee2d42.tar.gz
gentoo-2-e55c5f7a50eb162c7bef2b61698d1f3b37ee2d42.tar.bz2
gentoo-2-e55c5f7a50eb162c7bef2b61698d1f3b37ee2d42.zip
Add upstream patch.
(Portage version: 2.2.0_alpha46/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/hydra')
-rw-r--r--net-analyzer/hydra/ChangeLog8
-rw-r--r--net-analyzer/hydra/files/hydra-6.5-fix.diff30
-rw-r--r--net-analyzer/hydra/hydra-6.5-r1.ebuild84
3 files changed, 121 insertions, 1 deletions
diff --git a/net-analyzer/hydra/ChangeLog b/net-analyzer/hydra/ChangeLog
index b58c3dc7717b..1340793eb27e 100644
--- a/net-analyzer/hydra/ChangeLog
+++ b/net-analyzer/hydra/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-analyzer/hydra
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hydra/ChangeLog,v 1.58 2011/07/20 15:01:01 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hydra/ChangeLog,v 1.59 2011/07/20 15:34:37 jer Exp $
+
+*hydra-6.5-r1 (20 Jul 2011)
+
+ 20 Jul 2011; Jeroen Roovers <jer@gentoo.org> +hydra-6.5-r1.ebuild,
+ +files/hydra-6.5-fix.diff:
+ Add upstream patch.
*hydra-6.5 (20 Jul 2011)
diff --git a/net-analyzer/hydra/files/hydra-6.5-fix.diff b/net-analyzer/hydra/files/hydra-6.5-fix.diff
new file mode 100644
index 000000000000..5e887ebb5103
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-6.5-fix.diff
@@ -0,0 +1,30 @@
+http://www.thc.org/thc-hydra/hydra-6.5-fix.diff
+
+--- hydra-http-form.c 2011-07-15 12:17:01.707621600 +0200
++++ hydra-http-form.c 2011-07-15 16:59:21.044146200 +0200
+@@ -323,13 +323,13 @@
+
+ if (strcmp(type, "POST") == 0) {
+ sprintf(buffer,
+- "POST %.600s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Mozilla/4.0 (Hydra)\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: %d\r\n%s%s\r\n%s",
++ "POST %.600s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Mozilla/5.0 (Hydra)\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: %d\r\n%s%s\r\n%s",
+ url, webtarget, (int) strlen(upd3variables), header, userheader, upd3variables);
+ if (hydra_send(s, buffer, strlen(buffer), 0) < 0) {
+ return 1;
+ }
+ } else {
+- sprintf(buffer, "GET http://%.600s?%s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Mozilla/4.0 (Hydra)\r\n%s%s\r\n", url, upd3variables, webtarget, header, userheader);
++ sprintf(buffer, "GET %.600s?%s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Mozilla/5.0 (Hydra)\r\n%s%s\r\n", url, upd3variables, webtarget, header, userheader);
+ if (hydra_send(s, buffer, strlen(buffer), 0) < 0) {
+ return 1;
+ }
+--- hydra.c 2011-07-15 12:17:01.737623300 +0200
++++ hydra.c 2011-07-15 16:52:39.029152300 +0200
+@@ -1757,7 +1757,6 @@
+ url = strtok(bufferurl, ":");
+ variables = strtok(NULL, ":");
+ cond = strtok(NULL, ":");
+- optional1 = strtok(NULL, ":");
+ if (strstr(variables, "^USER^") == NULL && strstr(variables, "^PASS^") == NULL) {
+ fprintf(stderr, "ERROR: the variables argument needs at least the strings ^USER^ or ^PASS^: %s\n", variables);
+ exit(-1);
diff --git a/net-analyzer/hydra/hydra-6.5-r1.ebuild b/net-analyzer/hydra/hydra-6.5-r1.ebuild
new file mode 100644
index 000000000000..3aee4afb0801
--- /dev/null
+++ b/net-analyzer/hydra/hydra-6.5-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/hydra/hydra-6.5-r1.ebuild,v 1.1 2011/07/20 15:34:37 jer Exp $
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Advanced parallized login hacker"
+HOMEPAGE="http://www.thc.org/thc-hydra/"
+SRC_URI="http://freeworld.thc.org/releases/${P}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gtk ssl"
+
+DEPEND="
+ dev-libs/openssl
+ gtk? ( x11-libs/gtk+:2 )
+ ssl? ( >=net-libs/libssh-0.4.0 )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P}-src
+
+src_prepare() {
+ # None of the settings in Makefile.unix are useful to us
+ : > Makefile.unix
+
+ epatch "${FILESDIR}"/${PN}-6.5-fix.diff
+
+ sed -i \
+ -e 's:-O2:$(CPPFLAGS) $(CFLAGS):g' \
+ -e 's:|| echo.*$::' \
+ -e '/\t-$(CC)/s:-::' \
+ -e '/ -o /s:$(OPTS) $(LIBS):$(OPTS) $(LDFLAGS):g' \
+ Makefile.am || die "sed failed"
+}
+
+src_configure() {
+ # Note: despite the naming convention, the top level script is not an
+ # autoconf-based script.
+ ./configure \
+ --prefix=/usr \
+ $(use gtk && echo --disable-xhydra) \
+ || die "configure failed"
+
+ sed -i \
+ -e '/^XDEFINES=/s:=.*:=:' \
+ -e '/^XLIBS=/s:=.*:=-lcrypto:' \
+ -e '/^XLIBPATHS/s:=.*:=:' \
+ -e '/^XIPATHS=/s:=.*:=:' \
+ Makefile || die "pruning vars"
+
+ if use ssl ; then
+ sed -i \
+ -e '/^XDEFINES=/s:=:=-DLIBOPENSSLNEW -DLIBSSH:' \
+ -e '/^XLIBS=/s:$: -lssl -lssh:' \
+ Makefile || die "adding ssl"
+ fi
+
+ if use gtk ; then
+ cd hydra-gtk && \
+ econf || die "econf failed"
+ fi
+}
+
+src_compile() {
+ tc-export CC
+ emake
+ if use gtk ; then
+ cd hydra-gtk && \
+ emake
+ fi
+}
+
+src_install() {
+ dobin hydra pw-inspector
+ if use gtk ; then
+ dobin hydra-gtk/src/xhydra
+ fi
+ dodoc CHANGES README TODO
+}