* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/
@ 2020-01-26 16:43 Jeroen Roovers
0 siblings, 0 replies; 6+ messages in thread
From: Jeroen Roovers @ 2020-01-26 16:43 UTC (permalink / raw
To: gentoo-commits
commit: 95c1ff070c3d3a67d6e14734cf7f4f28b641b382
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 16:42:16 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 16:43:48 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95c1ff07
net-analyzer/hydra: Fix -fno-common issues
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Bug: https://bugs.gentoo.org/706416
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../hydra/files/hydra-9.0-fcommon-gtk.patch | 79 ++++
.../hydra/files/hydra-9.0-fcommon-http.patch | 27 ++
.../hydra/files/hydra-9.0-fcommon-mod.patch | 63 +++
.../hydra/files/hydra-9.0-fcommon-mods.patch | 496 +++++++++++++++++++++
.../hydra/files/hydra-9.0-unneeded-buf.patch | 60 +++
net-analyzer/hydra/files/hydra-9.0-vnc.patch | 11 +
.../hydra/files/hydra-9999999-fcommon-http.patch | 27 ++
.../{hydra-9999999.ebuild => hydra-9.0-r1.ebuild} | 39 +-
net-analyzer/hydra/hydra-9999999.ebuild | 30 +-
9 files changed, 806 insertions(+), 26 deletions(-)
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch
new file mode 100644
index 00000000000..02ebab64e41
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch
@@ -0,0 +1,79 @@
+--- a/hydra-gtk/src/callbacks.c
++++ b/hydra-gtk/src/callbacks.c
+@@ -66,7 +66,7 @@ int hydra_get_options(char *options[]) {
+ gchar *tmp;
+ GString *a;
+
+- options[0] = HYDRA_BIN;
++ options[0] = hydra_bin;
+
+ /* get the port */
+ widget = lookup_widget(GTK_WIDGET(wndMain), "spnPort");
+@@ -599,7 +599,7 @@ int *popen_re_unbuffered(char *command) {
+
+ (void) hydra_get_options(options);
+
+- execv(HYDRA_BIN, options);
++ execv(hydra_bin, options);
+
+ g_warning("%s %i: popen_rw_unbuffered: execv() returned", __FILE__, __LINE__);
+
+--- a/hydra-gtk/src/main.c
++++ b/hydra-gtk/src/main.c
+@@ -17,12 +17,12 @@
+ char *hydra_path1 = "./hydra";
+ char *hydra_path2 = "/usr/local/bin/hydra";
+ char *hydra_path3 = "/usr/bin/hydra";
+-
++char *hydra_bin;
++GtkWidget *wndMain;
++guint message_id;
+
+ int main(int argc, char *argv[]) {
+- extern GtkWidget *wndMain;
+ int i;
+- extern guint message_id;
+ GtkWidget *output;
+ GtkTextBuffer *outputbuf;
+
+@@ -35,22 +35,22 @@ int main(int argc, char *argv[]) {
+ message_id = 0;
+
+ /* locate the hydra binary */
+- HYDRA_BIN = NULL;
++ hydra_bin = NULL;
+ for (i = 0; i < argc - 1; i++) {
+ if (!strcmp(argv[i], "--hydra-path")) {
+- HYDRA_BIN = argv[i + 1];
++ hydra_bin = argv[i + 1];
+ break;
+ }
+ }
+
+- if ((HYDRA_BIN != NULL) && (g_file_test(HYDRA_BIN, G_FILE_TEST_IS_EXECUTABLE))) {
++ if ((hydra_bin != NULL) && (g_file_test(hydra_bin, G_FILE_TEST_IS_EXECUTABLE))) {
+ /* just for obfuscation *g* */
+ } else if (g_file_test(hydra_path1, G_FILE_TEST_IS_EXECUTABLE)) {
+- HYDRA_BIN = hydra_path1;
++ hydra_bin = hydra_path1;
+ } else if (g_file_test(hydra_path2, G_FILE_TEST_IS_EXECUTABLE)) {
+- HYDRA_BIN = hydra_path2;
++ hydra_bin = hydra_path2;
+ } else if (g_file_test(hydra_path3, G_FILE_TEST_IS_EXECUTABLE)) {
+- HYDRA_BIN = hydra_path3;
++ hydra_bin = hydra_path3;
+ } else {
+ g_error("Please tell me where hydra is, use --hydra-path\n");
+ return -1;
+--- a/hydra-gtk/src/support.h
++++ b/hydra-gtk/src/support.h
+@@ -40,6 +40,6 @@ GdkPixbuf *create_pixbuf(const gchar * filename);
+ void glade_set_atk_action_description(AtkAction * action, const gchar * action_name, const gchar * description);
+
+
+-GtkWidget *wndMain;
+-char *HYDRA_BIN;
+-guint message_id;
++extern GtkWidget *wndMain;
++extern char *hydra_bin;
++extern guint message_id;
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch
new file mode 100644
index 00000000000..35b45e07161
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch
@@ -0,0 +1,27 @@
+--- a/hydra-http.c
++++ b/hydra-http.c
+@@ -5,7 +5,7 @@
+ char *webtarget = NULL;
+ char *slash = "/";
+ char *http_buf = NULL;
+-int32_t webport, freemischttp = 0;
++int32_t freemischttp = 0;
+ int32_t http_auth_mechanism = AUTH_UNASSIGNED;
+
+ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *type, ptr_header_node ptr_head) {
+@@ -22,6 +22,7 @@ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, cha
+ char *ptr, *fooptr;
+ int32_t complete_line = 0, buffer_size;
+ char tmpreplybuf[1024] = "", *tmpreplybufptr;
++ int32_t webport;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -291,6 +292,7 @@ void service_http(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
+ int32_t myport = PORT_HTTP, mysslport = PORT_HTTP_SSL;
+ char *ptr, *ptr2;
+ ptr_header_node ptr_head = NULL;
++ int32_t webport;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch
new file mode 100644
index 00000000000..e16a4157b24
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch
@@ -0,0 +1,63 @@
+--- a/hydra-mod.c
++++ b/hydra-mod.c
+@@ -48,6 +48,19 @@ char ipstring[64];
+ uint32_t colored_output = 1;
+ char quiet = 0;
+ int32_t old_ssl = 0;
++int32_t debug;
++char *proxy_authentication[MAX_PROXY_COUNT];
++int32_t proxy_count;
++char proxy_string_ip[MAX_PROXY_COUNT][36];
++char proxy_string_type[MAX_PROXY_COUNT][10];
++int32_t proxy_string_port[MAX_PROXY_COUNT];
++int32_t selected_proxy;
++int32_t verbose;
++int32_t waittime;
++int32_t use_proxy;
++int32_t port;
++char *cmdlinetarget;
++int32_t found;
+
+ #ifdef LIBOPENSSL
+ SSL *ssl = NULL;
+--- a/hydra-mod.h
++++ b/hydra-mod.h
+@@ -49,23 +49,23 @@ extern int32_t hydra_memsearch(char *haystack, int32_t hlen, char *needle, int32
+ extern char *hydra_strrep(char *string, char *oldpiece, char *newpiece);
+
+ #ifdef HAVE_PCRE
+-int32_t hydra_string_match(char *str, const char *regex);
++extern int32_t hydra_string_match(char *str, const char *regex);
+ #endif
+-char *hydra_string_replace(const char *string, const char *substr, const char *replacement);
++extern char *hydra_string_replace(const char *string, const char *substr, const char *replacement);
+
+-int32_t debug;
+-int32_t verbose;
+-int32_t waittime;
+-int32_t port;
+-int32_t found;
+-int32_t proxy_count;
+-int32_t use_proxy;
+-int32_t selected_proxy;
+-char proxy_string_ip[MAX_PROXY_COUNT][36];
+-int32_t proxy_string_port[MAX_PROXY_COUNT];
+-char proxy_string_type[MAX_PROXY_COUNT][10];
+-char *proxy_authentication[MAX_PROXY_COUNT];
+-char *cmdlinetarget;
++extern int32_t debug;
++extern int32_t verbose;
++extern int32_t waittime;
++extern int32_t port;
++extern int32_t found;
++extern int32_t proxy_count;
++extern int32_t use_proxy;
++extern int32_t selected_proxy;
++extern char proxy_string_ip[MAX_PROXY_COUNT][36];
++extern int32_t proxy_string_port[MAX_PROXY_COUNT];
++extern char proxy_string_type[MAX_PROXY_COUNT][10];
++extern char *proxy_authentication[MAX_PROXY_COUNT];
++extern char *cmdlinetarget;
+
+ typedef int32_t BOOL;
+
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch
new file mode 100644
index 00000000000..9d63aa93a41
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch
@@ -0,0 +1,496 @@
+--- a/hydra-asterisk.c
++++ b/hydra-asterisk.c
+@@ -9,11 +9,11 @@
+
+ extern char *HYDRA_EXIT;
+
+-char *buf;
+-
+ int32_t start_asterisk(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "\"\"";
+ char *login, *pass, buffer[1024];
++ char *buf;
++
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -65,6 +65,7 @@ int32_t start_asterisk(int32_t s, char *ip, int32_t port, unsigned char options,
+ void service_asterisk(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
+ int32_t run = 1, next_run = 1, sock = -1;
+ int32_t myport = PORT_ASTERISK, mysslport = PORT_ASTERISK_SSL;
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-cisco-enable.c
++++ b/hydra-cisco-enable.c
+@@ -1,11 +1,11 @@
+ #include "hydra-mod.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_cisco_enable(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+ char *pass, buffer[300];
++ char *buf;
+
+ if (strlen(pass = hydra_get_next_password()) == 0)
+ pass = empty;
+@@ -63,6 +63,7 @@ void service_cisco_enable(char *ip, int32_t sp, unsigned char options, char *mis
+ int32_t myport = PORT_TELNET, mysslport = PORT_TELNET_SSL;
+ char buffer[300];
+ char *login;
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-cisco.c
++++ b/hydra-cisco.c
+@@ -5,11 +5,11 @@
+ #endif
+
+ extern char *HYDRA_EXIT;
+-char *buf = NULL;
+
+ int32_t start_cisco(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+ char *pass, buffer[300];
++ char *buf = NULL;
+
+ if (strlen(pass = hydra_get_next_password()) == 0)
+ pass = empty;
+--- a/hydra-cvs.c
++++ b/hydra-cvs.c
+@@ -3,7 +3,6 @@
+ extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec);
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_cvs(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+@@ -37,6 +36,7 @@ int32_t start_cvs(int32_t s, char *ip, int32_t port, unsigned char options, char
+ 0, 121, 117, 104, 101, 100, 69, 73, 99, 63, 94, 93, 39, 37, 61, 48,
+ 58, 113, 32, 90, 44, 98, 60, 51, 33, 97, 62
+ };
++ char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+--- a/hydra-ftp.c
++++ b/hydra-ftp.c
+@@ -1,11 +1,11 @@
+ #include "hydra-mod.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "\"\"";
+ char *login, *pass, buffer[510];
++ char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -77,6 +77,7 @@ int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char
+ void service_ftp_core(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname, int32_t tls) {
+ int32_t run = 1, next_run = 1, sock = -1;
+ int32_t myport = PORT_FTP, mysslport = PORT_FTP_SSL;
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-http-form.c
++++ b/hydra-http-form.c
+@@ -53,7 +53,6 @@ Added fail or success condition, getting cookies, and allow 5 redirections by da
+ #include "sasl.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ char *cond;
+ extern int32_t http_auth_mechanism;
+
+@@ -579,6 +578,7 @@ return -1 if no response from server
+ */
+ int32_t analyze_server_response(int32_t s) {
+ int32_t runs = 0;
++ char *buf;
+
+ redirected_flag = 0;
+ auth_flag = 0;
+--- a/hydra-http-proxy-urlenum.c
++++ b/hydra-http-proxy-urlenum.c
+@@ -2,7 +2,6 @@
+ #include "sasl.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ static int32_t http_proxy_auth_mechanism = AUTH_ERROR;
+
+ int32_t start_http_proxy_urlenum(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *hostname) {
+@@ -12,6 +11,7 @@ int32_t start_http_proxy_urlenum(int32_t s, char *ip, int32_t port, unsigned cha
+ char *header = ""; /* XXX TODO */
+ char *ptr;
+ int32_t auth = 0;
++ char *buf;
+
+ login = hydra_get_next_login();
+ if (login == NULL || strlen(login) == 0 || strstr(login, "://") == NULL) {
+--- a/hydra-imap.c
++++ b/hydra-imap.c
+@@ -2,7 +2,6 @@
+ #include "sasl.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ int32_t counter;
+
+ int32_t imap_auth_mechanism = AUTH_CLEAR;
+@@ -42,6 +41,7 @@ char *imap_read_server_capacity(int32_t sock) {
+ int32_t start_imap(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+ char *login, *pass, buffer[500], buffer2[500], *fooptr;
++ char *buf = NULL;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -357,6 +357,7 @@ void service_imap(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
+ int32_t run = 1, next_run = 1, sock = -1;
+ int32_t myport = PORT_IMAP, mysslport = PORT_IMAP_SSL, disable_tls = 1;
+ char *buffer1 = "1 CAPABILITY\r\n";
++ char *buf = NULL;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-ldap.c
++++ b/hydra-ldap.c
+@@ -3,8 +3,6 @@
+
+ extern char *HYDRA_EXIT;
+
+-unsigned char *buf;
+-int32_t counter;
+ int32_t tls_required = 0;
+
+ int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *hostname, char version, int32_t auth_method) {
+@@ -13,6 +11,8 @@ int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, cha
+ unsigned char buffer[512];
+ int32_t length = 0;
+ int32_t ldap_auth_mechanism = auth_method;
++ unsigned char *buf;
++ int32_t counter;
+
+ /*
+ The LDAP "simple" method has three modes of operation:
+@@ -354,6 +354,8 @@ int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, cha
+ void service_ldap(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname, char version, int32_t auth_method) {
+ int32_t run = 1, next_run = 1, sock = -1;
+ int32_t myport = PORT_LDAP, mysslport = PORT_LDAP_SSL;
++ unsigned char *buf;
++ int32_t counter;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-mongodb.c
++++ b/hydra-mongodb.c
+@@ -17,7 +17,6 @@ void dummy_mongodb() {
+ extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec);
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ #define DEFAULT_DB "admin"
+
+@@ -31,6 +30,7 @@ int is_error_msg(char *msg) {
+ }
+
+ int require_auth(int32_t sock) {
++ char *buf;
+ unsigned char m_hdr[] =
+ "\x3f\x00\x00\x00" //messageLength (63)
+ "\x00\x00\x00\x41" //requestID
+--- a/hydra-mssql.c
++++ b/hydra-mssql.c
+@@ -3,7 +3,6 @@
+ #define MSLEN 30
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ unsigned char p_hdr[] =
+ "\x02\x00\x02\x00\x00\x00\x02\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00";
+@@ -52,6 +51,7 @@ int32_t start_mssql(int32_t s, char *ip, int32_t port, unsigned char options, ch
+ char ms_pass[MSLEN + 1];
+ unsigned char len_login, len_pass;
+ int32_t ret = -1;
++ char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+--- a/hydra-nntp.c
++++ b/hydra-nntp.c
+@@ -13,7 +13,6 @@ RFC 4643: Network News Transfer Protocol (NNTP) Extension for Authentication
+ int32_t nntp_auth_mechanism = AUTH_CLEAR;
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ char *nntp_read_server_capacity(int32_t sock) {
+ char *ptr = NULL;
+@@ -51,6 +50,7 @@ int32_t start_nntp(int32_t s, char *ip, int32_t port, unsigned char options, cha
+ char *empty = "\"\"";
+ char *login, *pass, buffer[500], buffer2[500], *fooptr;
+ int32_t i = 1;
++ char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -270,6 +270,7 @@ void service_nntp(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
+ int32_t i = 0, run = 1, next_run = 1, sock = -1;
+ int32_t myport = PORT_NNTP, mysslport = PORT_NNTP_SSL, disable_tls = 0;
+ char *buffer1 = "CAPABILITIES\r\n";
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-oracle-listener.c
++++ b/hydra-oracle-listener.c
+@@ -22,8 +22,6 @@ void dummy_oracle_listener() {
+ #define HASHSIZE 17
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+-unsigned char *hash;
+ int32_t sid_mechanism = AUTH_PLAIN;
+
+ int32_t initial_permutation(unsigned char **result, char *p_str, int32_t *sz) {
+@@ -143,6 +141,7 @@ int32_t ora_hash_password(char *pass) {
+ unsigned char *desresult;
+ unsigned char *result;
+ char buff[strlen(pass) + 5];
++ unsigned char *hash;
+
+ memset(buff, 0, sizeof(buff));
+
+@@ -192,6 +191,8 @@ int32_t start_oracle_listener(int32_t s, char *ip, int32_t port, unsigned char o
+ char connect_string[200];
+ char buffer2[260];
+ int32_t siz = 0;
++ char *buf;
++ unsigned char *hash;
+
+ memset(connect_string, 0, sizeof(connect_string));
+ memset(buffer2, 0, sizeof(buffer2));
+--- a/hydra-oracle-sid.c
++++ b/hydra-oracle-sid.c
+@@ -19,7 +19,6 @@ void dummy_oracle_sid() {
+ #define HASHSIZE 16
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ unsigned char *hash;
+
+
+@@ -40,6 +39,7 @@ int32_t start_oracle_sid(int32_t s, char *ip, int32_t port, unsigned char option
+ char connect_string[200];
+ char buffer2[260];
+ int32_t siz = 0;
++ char *buf;
+
+ memset(connect_string, 0, sizeof(connect_string));
+ memset(buffer2, 0, sizeof(buffer2));
+--- a/hydra-pcnfs.c
++++ b/hydra-pcnfs.c
+@@ -3,7 +3,6 @@
+ /* pcnfs stuff copied from prout.c */
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ #define LEN_HDR_RPC 24
+ #define LEN_AUTH_UNIX 72+12
+@@ -37,6 +36,7 @@ int32_t start_pcnfs(int32_t s, char *ip, int32_t port, unsigned char options, ch
+ char *empty = "";
+ char *login, *pass, buffer[LEN_HDR_RPC + LEN_AUTH_UNIX + LEN_HDR_PCN_AUTH];
+ char *ptr, *pkt = buffer;
++ char *buf;
+
+ unsigned long *authp;
+ struct timeval tv;
+--- a/hydra-pop3.c
++++ b/hydra-pop3.c
+@@ -13,7 +13,6 @@ typedef struct pool_str {
+ } pool;
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ char apop_challenge[300] = "";
+ pool *plist = NULL, *p = NULL;
+
+@@ -120,6 +119,7 @@ STLS
+ int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "\"\"";
+ char *login, *pass, buffer[500], buffer2[500], *fooptr;
++ char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -416,6 +416,7 @@ int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, cha
+ void service_pop3(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
+ int32_t run = 1, next_run = 1, sock = -1;
+ char *ptr = NULL;
++ char *buf;
+
+ //extract data from the pool, ip is the key
+ if (plist == NULL)
+@@ -520,6 +521,7 @@ int32_t service_pop3_init(char *ip, int32_t sp, unsigned char options, char *mis
+ char *capa_str = "CAPA\r\n";
+ char *quit_str = "QUIT\r\n";
+ pool p;
++ char *buf;
+
+ p.pop3_auth_mechanism = AUTH_CLEAR;
+ p.disable_tls = 1;
+--- a/hydra-redis.c
++++ b/hydra-redis.c
+@@ -1,11 +1,11 @@
+ #include "hydra-mod.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_redis(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *pass, buffer[510];
+ char *empty = "";
++ char *buf;
+
+ if (strlen(pass = hydra_get_next_password()) == 0)
+ pass = empty;
+@@ -134,6 +134,7 @@ int32_t service_redis_init(char *ip, int32_t sp, unsigned char options, char *mi
+ int32_t sock = -1;
+ int32_t myport = PORT_REDIS, mysslport = PORT_REDIS_SSL;
+ char buffer[] = "*1\r\n$4\r\nping\r\n";
++ char *buf;
+
+ hydra_register_socket(sp);
+ if ((options & OPTION_SSL) == 0) {
+--- a/hydra-smtp-enum.c
++++ b/hydra-smtp-enum.c
+@@ -14,7 +14,6 @@ passwd will be used as the domain name
+ #include "hydra-mod.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ char *err = NULL;
+ int32_t tosent = 0;
+
+@@ -27,6 +26,7 @@ int32_t smtp_enum_cmd = VRFY;
+ int32_t start_smtp_enum(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+ char *login, *pass, buffer[500];
++ char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -154,6 +154,7 @@ void service_smtp_enum(char *ip, int32_t sp, unsigned char options, char *miscpt
+ int32_t run = 1, next_run = 1, sock = -1, i = 0;
+ int32_t myport = PORT_SMTP, mysslport = PORT_SMTP_SSL;
+ char *buffer = "HELO hydra\r\n";
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-socks5.c
++++ b/hydra-socks5.c
+@@ -10,7 +10,6 @@ This module enable bruteforcing for socks5, only following types are supported:
+ */
+
+ extern char *HYDRA_EXIT;
+-unsigned char *buf;
+
+ int32_t fail_cnt;
+
+@@ -18,6 +17,7 @@ int32_t start_socks5(int32_t s, char *ip, int32_t port, unsigned char options, c
+ char *empty = "";
+ char *login, *pass, buffer[300];
+ int32_t pport, fud = 0;
++ unsigned char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+--- a/hydra-telnet.c
++++ b/hydra-telnet.c
+@@ -2,13 +2,13 @@
+ #include <arpa/telnet.h>
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ int32_t no_line_mode;
+
+ int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+ char *login, *pass, buffer[300];
+ int32_t i = 0;
++ char *buf;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -99,6 +99,7 @@ int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, c
+ void service_telnet(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
+ int32_t run = 1, next_run = 1, sock = -1, fck;
+ int32_t myport = PORT_TELNET, mysslport = PORT_TELNET_SSL;
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-vmauthd.c
++++ b/hydra-vmauthd.c
+@@ -8,11 +8,11 @@
+
+ extern char *HYDRA_EXIT;
+
+-char *buf;
+-
+ int32_t start_vmauthd(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "\"\"";
+ char *login, *pass, buffer[300];
++ char *buf;
++
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -68,6 +68,7 @@ int32_t start_vmauthd(int32_t s, char *ip, int32_t port, unsigned char options,
+ void service_vmauthd(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
+ int32_t run = 1, next_run = 1, sock = -1;
+ int32_t myport = PORT_VMAUTHD, mysslport = PORT_VMAUTHD_SSL;
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
+--- a/hydra-vnc.c
++++ b/hydra-vnc.c
+@@ -19,7 +19,6 @@ int32_t vnc_client_version = RFB33;
+ int32_t failed_auth = 0;
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ /*
+ * Encrypt CHALLENGESIZE bytes in memory using a password.
+@@ -48,6 +47,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char
+ char *empty = "";
+ char *pass;
+ unsigned char buf2[CHALLENGESIZE + 4];
++ char *buf;
+
+ if (strlen(pass = hydra_get_next_password()) == 0)
+ pass = empty;
+@@ -148,6 +148,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char
+ void service_vnc(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
+ int32_t run = 1, next_run = 1, sock = -1;
+ int32_t myport = PORT_VNC, mysslport = PORT_VNC_SSL;
++ char *buf;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
diff --git a/net-analyzer/hydra/files/hydra-9.0-unneeded-buf.patch b/net-analyzer/hydra/files/hydra-9.0-unneeded-buf.patch
new file mode 100644
index 00000000000..0055257b04a
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.0-unneeded-buf.patch
@@ -0,0 +1,60 @@
+--- a/hydra-irc.c
++++ b/hydra-irc.c
+@@ -7,7 +7,6 @@ RFC 1459: Internet Relay Chat Protocol
+ */
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ char buffer[300] = "";
+ int32_t myport = PORT_IRC, mysslport = PORT_IRC_SSL;
+
+--- a/hydra-rexec.c
++++ b/hydra-rexec.c
+@@ -5,7 +5,6 @@
+ #define COMMAND "/bin/ls /"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_rexec(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+--- a/hydra-rlogin.c
++++ b/hydra-rlogin.c
+@@ -12,7 +12,6 @@ no memleaks found on 110425
+ #define TERM "vt100/9600"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_rlogin(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+--- a/hydra-rsh.c
++++ b/hydra-rsh.c
+@@ -11,7 +11,6 @@ no memleaks found on 110425
+ */
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_rsh(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
+--- a/hydra-rtsp.c
++++ b/hydra-rtsp.c
+@@ -12,7 +12,6 @@
+ #include "sasl.h"
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+ char packet[500];
+ char packet2[500];
+
+--- a/hydra-teamspeak.c
++++ b/hydra-teamspeak.c
+@@ -36,7 +36,6 @@ struct team_speak {
+ extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec);
+
+ extern char *HYDRA_EXIT;
+-char *buf;
+
+ int32_t start_teamspeak(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
+ char *empty = "";
diff --git a/net-analyzer/hydra/files/hydra-9.0-vnc.patch b/net-analyzer/hydra/files/hydra-9.0-vnc.patch
new file mode 100644
index 00000000000..69c933ee838
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.0-vnc.patch
@@ -0,0 +1,11 @@
+--- a/hydra-vnc.c
++++ b/hydra-vnc.c
+@@ -75,7 +75,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char
+ //supported security type
+ switch (buf2[3]) {
+ case 0x0:
+- hydra_report(stderr, "[ERROR] VNC server told us to quit %c\n", buf[3]);
++ hydra_report(stderr, "[ERROR] VNC server told us to quit %c\n", buf2[3]);
+ hydra_child_exit(0);
+ break;
+ case 0x1:
diff --git a/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch b/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch
new file mode 100644
index 00000000000..eea0c3bc3ae
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch
@@ -0,0 +1,27 @@
+--- a/hydra-http.c
++++ b/hydra-http.c
+@@ -12,7 +12,7 @@ char *http_buf = NULL;
+ static char end_condition[END_CONDITION_MAX_LEN];
+ int end_condition_type=-1;
+
+-int32_t webport, freemischttp = 0;
++int32_t freemischttp = 0;
+ int32_t http_auth_mechanism = AUTH_UNASSIGNED;
+
+ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *type, ptr_header_node ptr_head) {
+@@ -22,6 +22,7 @@ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, cha
+ char *ptr, *fooptr;
+ int32_t complete_line = 0, buffer_size;
+ char tmpreplybuf[1024] = "", *tmpreplybufptr;
++ int32_t webport;
+
+ if (strlen(login = hydra_get_next_login()) == 0)
+ login = empty;
+@@ -291,6 +292,7 @@ void service_http(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
+ int32_t myport = PORT_HTTP, mysslport = PORT_HTTP_SSL;
+ char *ptr, *ptr2;
+ ptr_header_node ptr_head = NULL;
++ int32_t webport;
+
+ hydra_register_socket(sp);
+ if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9.0-r1.ebuild
similarity index 66%
copy from net-analyzer/hydra/hydra-9999999.ebuild
copy to net-analyzer/hydra/hydra-9.0-r1.ebuild
index 9ef6f73c7ec..c7b1e8aa733 100644
--- a/net-analyzer/hydra/hydra-9999999.ebuild
+++ b/net-analyzer/hydra/hydra-9.0-r1.ebuild
@@ -1,16 +1,16 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit git-r3 toolchain-funcs
+inherit toolchain-funcs
DESCRIPTION="Parallelized network login hacker"
HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
-EGIT_REPO_URI="https://github.com/vanhauser-thc/thc-hydra"
+SRC_URI="https://github.com/vanhauser-thc/thc-hydra/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~ppc ~x86"
IUSE="
debug firebird gcrypt gtk idn libressl memcached mongodb mysql ncp ncurses
oracle pcre postgres rdp libssh subversion zlib
@@ -45,6 +45,15 @@ DEPEND="
${RDEPEND}
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.0-fcommon-gtk.patch
+ "${FILESDIR}"/${PN}-9.0-fcommon-http.patch
+ "${FILESDIR}"/${PN}-9.0-fcommon-mod.patch
+ "${FILESDIR}"/${PN}-9.0-fcommon-mods.patch
+ "${FILESDIR}"/${PN}-9.0-unneeded-buf.patch
+ "${FILESDIR}"/${PN}-9.0-vnc.patch
+)
+S=${WORKDIR}/thc-${P}
src_prepare() {
default
@@ -81,21 +90,21 @@ src_configure() {
hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD'
hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT'
- hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H'
- hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH'
- hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED'
- hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON'
+ hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H'
+ hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH'
+ hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED'
+ hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON'
hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT'
hydra_sed ncp '-lncp' '' '-DLIBNCP'
- hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
- hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE'
- hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
+ hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
+ hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE'
+ hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE'
- hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2'
+ hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2'
# TODO: https://bugs.gentoo.org/686148
- #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
+ #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN'
- hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
+ hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
sh configure \
$(use gtk || echo --disable-xhydra) \
@@ -118,5 +127,5 @@ src_compile() {
src_install() {
dobin hydra pw-inspector
use gtk && dobin hydra-gtk/src/xhydra
- dodoc CHANGES README.md
+ dodoc CHANGES README
}
diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild
index 9ef6f73c7ec..6f65020dd57 100644
--- a/net-analyzer/hydra/hydra-9999999.ebuild
+++ b/net-analyzer/hydra/hydra-9999999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -45,6 +45,14 @@ DEPEND="
${RDEPEND}
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.0-fcommon-gtk.patch
+ "${FILESDIR}"/${PN}-9.0-fcommon-mod.patch
+ "${FILESDIR}"/${PN}-9.0-fcommon-mods.patch
+ "${FILESDIR}"/${PN}-9.0-unneeded-buf.patch
+ "${FILESDIR}"/${PN}-9.0-vnc.patch
+ "${FILESDIR}"/${PN}-9999999-fcommon-http.patch
+)
src_prepare() {
default
@@ -81,21 +89,21 @@ src_configure() {
hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD'
hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT'
- hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H'
- hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH'
- hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED'
- hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON'
+ hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H'
+ hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH'
+ hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED'
+ hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON'
hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT'
hydra_sed ncp '-lncp' '' '-DLIBNCP'
- hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
- hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE'
- hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
+ hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
+ hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE'
+ hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE'
- hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2'
+ hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2'
# TODO: https://bugs.gentoo.org/686148
- #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
+ #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN'
- hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
+ hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
sh configure \
$(use gtk || echo --disable-xhydra) \
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/
@ 2020-01-28 8:49 Jeroen Roovers
0 siblings, 0 replies; 6+ messages in thread
From: Jeroen Roovers @ 2020-01-28 8:49 UTC (permalink / raw
To: gentoo-commits
commit: 8e301de130b75dc4ee76ca2e344de67e6965b90b
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 08:48:45 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 08:49:23 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e301de1
net-analyzer/hydra: Set CFLAGS=-fcommon
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=706416
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../hydra/files/hydra-9.0-fcommon-gtk.patch | 79 ----
.../hydra/files/hydra-9.0-fcommon-http.patch | 27 --
.../hydra/files/hydra-9.0-fcommon-mod.patch | 63 ---
.../hydra/files/hydra-9.0-fcommon-mods.patch | 496 ---------------------
.../hydra/files/hydra-9999999-fcommon-http.patch | 27 --
net-analyzer/hydra/hydra-9.0-r1.ebuild | 8 +-
net-analyzer/hydra/hydra-9999999.ebuild | 9 +-
7 files changed, 5 insertions(+), 704 deletions(-)
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch
deleted file mode 100644
index 02ebab64e41..00000000000
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch
+++ /dev/null
@@ -1,79 +0,0 @@
---- a/hydra-gtk/src/callbacks.c
-+++ b/hydra-gtk/src/callbacks.c
-@@ -66,7 +66,7 @@ int hydra_get_options(char *options[]) {
- gchar *tmp;
- GString *a;
-
-- options[0] = HYDRA_BIN;
-+ options[0] = hydra_bin;
-
- /* get the port */
- widget = lookup_widget(GTK_WIDGET(wndMain), "spnPort");
-@@ -599,7 +599,7 @@ int *popen_re_unbuffered(char *command) {
-
- (void) hydra_get_options(options);
-
-- execv(HYDRA_BIN, options);
-+ execv(hydra_bin, options);
-
- g_warning("%s %i: popen_rw_unbuffered: execv() returned", __FILE__, __LINE__);
-
---- a/hydra-gtk/src/main.c
-+++ b/hydra-gtk/src/main.c
-@@ -17,12 +17,12 @@
- char *hydra_path1 = "./hydra";
- char *hydra_path2 = "/usr/local/bin/hydra";
- char *hydra_path3 = "/usr/bin/hydra";
--
-+char *hydra_bin;
-+GtkWidget *wndMain;
-+guint message_id;
-
- int main(int argc, char *argv[]) {
-- extern GtkWidget *wndMain;
- int i;
-- extern guint message_id;
- GtkWidget *output;
- GtkTextBuffer *outputbuf;
-
-@@ -35,22 +35,22 @@ int main(int argc, char *argv[]) {
- message_id = 0;
-
- /* locate the hydra binary */
-- HYDRA_BIN = NULL;
-+ hydra_bin = NULL;
- for (i = 0; i < argc - 1; i++) {
- if (!strcmp(argv[i], "--hydra-path")) {
-- HYDRA_BIN = argv[i + 1];
-+ hydra_bin = argv[i + 1];
- break;
- }
- }
-
-- if ((HYDRA_BIN != NULL) && (g_file_test(HYDRA_BIN, G_FILE_TEST_IS_EXECUTABLE))) {
-+ if ((hydra_bin != NULL) && (g_file_test(hydra_bin, G_FILE_TEST_IS_EXECUTABLE))) {
- /* just for obfuscation *g* */
- } else if (g_file_test(hydra_path1, G_FILE_TEST_IS_EXECUTABLE)) {
-- HYDRA_BIN = hydra_path1;
-+ hydra_bin = hydra_path1;
- } else if (g_file_test(hydra_path2, G_FILE_TEST_IS_EXECUTABLE)) {
-- HYDRA_BIN = hydra_path2;
-+ hydra_bin = hydra_path2;
- } else if (g_file_test(hydra_path3, G_FILE_TEST_IS_EXECUTABLE)) {
-- HYDRA_BIN = hydra_path3;
-+ hydra_bin = hydra_path3;
- } else {
- g_error("Please tell me where hydra is, use --hydra-path\n");
- return -1;
---- a/hydra-gtk/src/support.h
-+++ b/hydra-gtk/src/support.h
-@@ -40,6 +40,6 @@ GdkPixbuf *create_pixbuf(const gchar * filename);
- void glade_set_atk_action_description(AtkAction * action, const gchar * action_name, const gchar * description);
-
-
--GtkWidget *wndMain;
--char *HYDRA_BIN;
--guint message_id;
-+extern GtkWidget *wndMain;
-+extern char *hydra_bin;
-+extern guint message_id;
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch
deleted file mode 100644
index 35b45e07161..00000000000
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/hydra-http.c
-+++ b/hydra-http.c
-@@ -5,7 +5,7 @@
- char *webtarget = NULL;
- char *slash = "/";
- char *http_buf = NULL;
--int32_t webport, freemischttp = 0;
-+int32_t freemischttp = 0;
- int32_t http_auth_mechanism = AUTH_UNASSIGNED;
-
- int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *type, ptr_header_node ptr_head) {
-@@ -22,6 +22,7 @@ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, cha
- char *ptr, *fooptr;
- int32_t complete_line = 0, buffer_size;
- char tmpreplybuf[1024] = "", *tmpreplybufptr;
-+ int32_t webport;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -291,6 +292,7 @@ void service_http(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
- int32_t myport = PORT_HTTP, mysslport = PORT_HTTP_SSL;
- char *ptr, *ptr2;
- ptr_header_node ptr_head = NULL;
-+ int32_t webport;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch
deleted file mode 100644
index e16a4157b24..00000000000
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch
+++ /dev/null
@@ -1,63 +0,0 @@
---- a/hydra-mod.c
-+++ b/hydra-mod.c
-@@ -48,6 +48,19 @@ char ipstring[64];
- uint32_t colored_output = 1;
- char quiet = 0;
- int32_t old_ssl = 0;
-+int32_t debug;
-+char *proxy_authentication[MAX_PROXY_COUNT];
-+int32_t proxy_count;
-+char proxy_string_ip[MAX_PROXY_COUNT][36];
-+char proxy_string_type[MAX_PROXY_COUNT][10];
-+int32_t proxy_string_port[MAX_PROXY_COUNT];
-+int32_t selected_proxy;
-+int32_t verbose;
-+int32_t waittime;
-+int32_t use_proxy;
-+int32_t port;
-+char *cmdlinetarget;
-+int32_t found;
-
- #ifdef LIBOPENSSL
- SSL *ssl = NULL;
---- a/hydra-mod.h
-+++ b/hydra-mod.h
-@@ -49,23 +49,23 @@ extern int32_t hydra_memsearch(char *haystack, int32_t hlen, char *needle, int32
- extern char *hydra_strrep(char *string, char *oldpiece, char *newpiece);
-
- #ifdef HAVE_PCRE
--int32_t hydra_string_match(char *str, const char *regex);
-+extern int32_t hydra_string_match(char *str, const char *regex);
- #endif
--char *hydra_string_replace(const char *string, const char *substr, const char *replacement);
-+extern char *hydra_string_replace(const char *string, const char *substr, const char *replacement);
-
--int32_t debug;
--int32_t verbose;
--int32_t waittime;
--int32_t port;
--int32_t found;
--int32_t proxy_count;
--int32_t use_proxy;
--int32_t selected_proxy;
--char proxy_string_ip[MAX_PROXY_COUNT][36];
--int32_t proxy_string_port[MAX_PROXY_COUNT];
--char proxy_string_type[MAX_PROXY_COUNT][10];
--char *proxy_authentication[MAX_PROXY_COUNT];
--char *cmdlinetarget;
-+extern int32_t debug;
-+extern int32_t verbose;
-+extern int32_t waittime;
-+extern int32_t port;
-+extern int32_t found;
-+extern int32_t proxy_count;
-+extern int32_t use_proxy;
-+extern int32_t selected_proxy;
-+extern char proxy_string_ip[MAX_PROXY_COUNT][36];
-+extern int32_t proxy_string_port[MAX_PROXY_COUNT];
-+extern char proxy_string_type[MAX_PROXY_COUNT][10];
-+extern char *proxy_authentication[MAX_PROXY_COUNT];
-+extern char *cmdlinetarget;
-
- typedef int32_t BOOL;
-
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch
deleted file mode 100644
index 9d63aa93a41..00000000000
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch
+++ /dev/null
@@ -1,496 +0,0 @@
---- a/hydra-asterisk.c
-+++ b/hydra-asterisk.c
-@@ -9,11 +9,11 @@
-
- extern char *HYDRA_EXIT;
-
--char *buf;
--
- int32_t start_asterisk(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "\"\"";
- char *login, *pass, buffer[1024];
-+ char *buf;
-+
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -65,6 +65,7 @@ int32_t start_asterisk(int32_t s, char *ip, int32_t port, unsigned char options,
- void service_asterisk(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
- int32_t run = 1, next_run = 1, sock = -1;
- int32_t myport = PORT_ASTERISK, mysslport = PORT_ASTERISK_SSL;
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-cisco-enable.c
-+++ b/hydra-cisco-enable.c
-@@ -1,11 +1,11 @@
- #include "hydra-mod.h"
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- int32_t start_cisco_enable(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "";
- char *pass, buffer[300];
-+ char *buf;
-
- if (strlen(pass = hydra_get_next_password()) == 0)
- pass = empty;
-@@ -63,6 +63,7 @@ void service_cisco_enable(char *ip, int32_t sp, unsigned char options, char *mis
- int32_t myport = PORT_TELNET, mysslport = PORT_TELNET_SSL;
- char buffer[300];
- char *login;
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-cisco.c
-+++ b/hydra-cisco.c
-@@ -5,11 +5,11 @@
- #endif
-
- extern char *HYDRA_EXIT;
--char *buf = NULL;
-
- int32_t start_cisco(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "";
- char *pass, buffer[300];
-+ char *buf = NULL;
-
- if (strlen(pass = hydra_get_next_password()) == 0)
- pass = empty;
---- a/hydra-cvs.c
-+++ b/hydra-cvs.c
-@@ -3,7 +3,6 @@
- extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec);
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- int32_t start_cvs(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "";
-@@ -37,6 +36,7 @@ int32_t start_cvs(int32_t s, char *ip, int32_t port, unsigned char options, char
- 0, 121, 117, 104, 101, 100, 69, 73, 99, 63, 94, 93, 39, 37, 61, 48,
- 58, 113, 32, 90, 44, 98, 60, 51, 33, 97, 62
- };
-+ char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
---- a/hydra-ftp.c
-+++ b/hydra-ftp.c
-@@ -1,11 +1,11 @@
- #include "hydra-mod.h"
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "\"\"";
- char *login, *pass, buffer[510];
-+ char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -77,6 +77,7 @@ int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char
- void service_ftp_core(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname, int32_t tls) {
- int32_t run = 1, next_run = 1, sock = -1;
- int32_t myport = PORT_FTP, mysslport = PORT_FTP_SSL;
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-http-form.c
-+++ b/hydra-http-form.c
-@@ -53,7 +53,6 @@ Added fail or success condition, getting cookies, and allow 5 redirections by da
- #include "sasl.h"
-
- extern char *HYDRA_EXIT;
--char *buf;
- char *cond;
- extern int32_t http_auth_mechanism;
-
-@@ -579,6 +578,7 @@ return -1 if no response from server
- */
- int32_t analyze_server_response(int32_t s) {
- int32_t runs = 0;
-+ char *buf;
-
- redirected_flag = 0;
- auth_flag = 0;
---- a/hydra-http-proxy-urlenum.c
-+++ b/hydra-http-proxy-urlenum.c
-@@ -2,7 +2,6 @@
- #include "sasl.h"
-
- extern char *HYDRA_EXIT;
--char *buf;
- static int32_t http_proxy_auth_mechanism = AUTH_ERROR;
-
- int32_t start_http_proxy_urlenum(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *hostname) {
-@@ -12,6 +11,7 @@ int32_t start_http_proxy_urlenum(int32_t s, char *ip, int32_t port, unsigned cha
- char *header = ""; /* XXX TODO */
- char *ptr;
- int32_t auth = 0;
-+ char *buf;
-
- login = hydra_get_next_login();
- if (login == NULL || strlen(login) == 0 || strstr(login, "://") == NULL) {
---- a/hydra-imap.c
-+++ b/hydra-imap.c
-@@ -2,7 +2,6 @@
- #include "sasl.h"
-
- extern char *HYDRA_EXIT;
--char *buf;
- int32_t counter;
-
- int32_t imap_auth_mechanism = AUTH_CLEAR;
-@@ -42,6 +41,7 @@ char *imap_read_server_capacity(int32_t sock) {
- int32_t start_imap(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "";
- char *login, *pass, buffer[500], buffer2[500], *fooptr;
-+ char *buf = NULL;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -357,6 +357,7 @@ void service_imap(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
- int32_t run = 1, next_run = 1, sock = -1;
- int32_t myport = PORT_IMAP, mysslport = PORT_IMAP_SSL, disable_tls = 1;
- char *buffer1 = "1 CAPABILITY\r\n";
-+ char *buf = NULL;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-ldap.c
-+++ b/hydra-ldap.c
-@@ -3,8 +3,6 @@
-
- extern char *HYDRA_EXIT;
-
--unsigned char *buf;
--int32_t counter;
- int32_t tls_required = 0;
-
- int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *hostname, char version, int32_t auth_method) {
-@@ -13,6 +11,8 @@ int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, cha
- unsigned char buffer[512];
- int32_t length = 0;
- int32_t ldap_auth_mechanism = auth_method;
-+ unsigned char *buf;
-+ int32_t counter;
-
- /*
- The LDAP "simple" method has three modes of operation:
-@@ -354,6 +354,8 @@ int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, cha
- void service_ldap(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname, char version, int32_t auth_method) {
- int32_t run = 1, next_run = 1, sock = -1;
- int32_t myport = PORT_LDAP, mysslport = PORT_LDAP_SSL;
-+ unsigned char *buf;
-+ int32_t counter;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-mongodb.c
-+++ b/hydra-mongodb.c
-@@ -17,7 +17,6 @@ void dummy_mongodb() {
- extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec);
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- #define DEFAULT_DB "admin"
-
-@@ -31,6 +30,7 @@ int is_error_msg(char *msg) {
- }
-
- int require_auth(int32_t sock) {
-+ char *buf;
- unsigned char m_hdr[] =
- "\x3f\x00\x00\x00" //messageLength (63)
- "\x00\x00\x00\x41" //requestID
---- a/hydra-mssql.c
-+++ b/hydra-mssql.c
-@@ -3,7 +3,6 @@
- #define MSLEN 30
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- unsigned char p_hdr[] =
- "\x02\x00\x02\x00\x00\x00\x02\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00";
-@@ -52,6 +51,7 @@ int32_t start_mssql(int32_t s, char *ip, int32_t port, unsigned char options, ch
- char ms_pass[MSLEN + 1];
- unsigned char len_login, len_pass;
- int32_t ret = -1;
-+ char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
---- a/hydra-nntp.c
-+++ b/hydra-nntp.c
-@@ -13,7 +13,6 @@ RFC 4643: Network News Transfer Protocol (NNTP) Extension for Authentication
- int32_t nntp_auth_mechanism = AUTH_CLEAR;
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- char *nntp_read_server_capacity(int32_t sock) {
- char *ptr = NULL;
-@@ -51,6 +50,7 @@ int32_t start_nntp(int32_t s, char *ip, int32_t port, unsigned char options, cha
- char *empty = "\"\"";
- char *login, *pass, buffer[500], buffer2[500], *fooptr;
- int32_t i = 1;
-+ char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -270,6 +270,7 @@ void service_nntp(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
- int32_t i = 0, run = 1, next_run = 1, sock = -1;
- int32_t myport = PORT_NNTP, mysslport = PORT_NNTP_SSL, disable_tls = 0;
- char *buffer1 = "CAPABILITIES\r\n";
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-oracle-listener.c
-+++ b/hydra-oracle-listener.c
-@@ -22,8 +22,6 @@ void dummy_oracle_listener() {
- #define HASHSIZE 17
-
- extern char *HYDRA_EXIT;
--char *buf;
--unsigned char *hash;
- int32_t sid_mechanism = AUTH_PLAIN;
-
- int32_t initial_permutation(unsigned char **result, char *p_str, int32_t *sz) {
-@@ -143,6 +141,7 @@ int32_t ora_hash_password(char *pass) {
- unsigned char *desresult;
- unsigned char *result;
- char buff[strlen(pass) + 5];
-+ unsigned char *hash;
-
- memset(buff, 0, sizeof(buff));
-
-@@ -192,6 +191,8 @@ int32_t start_oracle_listener(int32_t s, char *ip, int32_t port, unsigned char o
- char connect_string[200];
- char buffer2[260];
- int32_t siz = 0;
-+ char *buf;
-+ unsigned char *hash;
-
- memset(connect_string, 0, sizeof(connect_string));
- memset(buffer2, 0, sizeof(buffer2));
---- a/hydra-oracle-sid.c
-+++ b/hydra-oracle-sid.c
-@@ -19,7 +19,6 @@ void dummy_oracle_sid() {
- #define HASHSIZE 16
-
- extern char *HYDRA_EXIT;
--char *buf;
- unsigned char *hash;
-
-
-@@ -40,6 +39,7 @@ int32_t start_oracle_sid(int32_t s, char *ip, int32_t port, unsigned char option
- char connect_string[200];
- char buffer2[260];
- int32_t siz = 0;
-+ char *buf;
-
- memset(connect_string, 0, sizeof(connect_string));
- memset(buffer2, 0, sizeof(buffer2));
---- a/hydra-pcnfs.c
-+++ b/hydra-pcnfs.c
-@@ -3,7 +3,6 @@
- /* pcnfs stuff copied from prout.c */
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- #define LEN_HDR_RPC 24
- #define LEN_AUTH_UNIX 72+12
-@@ -37,6 +36,7 @@ int32_t start_pcnfs(int32_t s, char *ip, int32_t port, unsigned char options, ch
- char *empty = "";
- char *login, *pass, buffer[LEN_HDR_RPC + LEN_AUTH_UNIX + LEN_HDR_PCN_AUTH];
- char *ptr, *pkt = buffer;
-+ char *buf;
-
- unsigned long *authp;
- struct timeval tv;
---- a/hydra-pop3.c
-+++ b/hydra-pop3.c
-@@ -13,7 +13,6 @@ typedef struct pool_str {
- } pool;
-
- extern char *HYDRA_EXIT;
--char *buf;
- char apop_challenge[300] = "";
- pool *plist = NULL, *p = NULL;
-
-@@ -120,6 +119,7 @@ STLS
- int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "\"\"";
- char *login, *pass, buffer[500], buffer2[500], *fooptr;
-+ char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -416,6 +416,7 @@ int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, cha
- void service_pop3(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
- int32_t run = 1, next_run = 1, sock = -1;
- char *ptr = NULL;
-+ char *buf;
-
- //extract data from the pool, ip is the key
- if (plist == NULL)
-@@ -520,6 +521,7 @@ int32_t service_pop3_init(char *ip, int32_t sp, unsigned char options, char *mis
- char *capa_str = "CAPA\r\n";
- char *quit_str = "QUIT\r\n";
- pool p;
-+ char *buf;
-
- p.pop3_auth_mechanism = AUTH_CLEAR;
- p.disable_tls = 1;
---- a/hydra-redis.c
-+++ b/hydra-redis.c
-@@ -1,11 +1,11 @@
- #include "hydra-mod.h"
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- int32_t start_redis(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *pass, buffer[510];
- char *empty = "";
-+ char *buf;
-
- if (strlen(pass = hydra_get_next_password()) == 0)
- pass = empty;
-@@ -134,6 +134,7 @@ int32_t service_redis_init(char *ip, int32_t sp, unsigned char options, char *mi
- int32_t sock = -1;
- int32_t myport = PORT_REDIS, mysslport = PORT_REDIS_SSL;
- char buffer[] = "*1\r\n$4\r\nping\r\n";
-+ char *buf;
-
- hydra_register_socket(sp);
- if ((options & OPTION_SSL) == 0) {
---- a/hydra-smtp-enum.c
-+++ b/hydra-smtp-enum.c
-@@ -14,7 +14,6 @@ passwd will be used as the domain name
- #include "hydra-mod.h"
-
- extern char *HYDRA_EXIT;
--char *buf;
- char *err = NULL;
- int32_t tosent = 0;
-
-@@ -27,6 +26,7 @@ int32_t smtp_enum_cmd = VRFY;
- int32_t start_smtp_enum(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "";
- char *login, *pass, buffer[500];
-+ char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -154,6 +154,7 @@ void service_smtp_enum(char *ip, int32_t sp, unsigned char options, char *miscpt
- int32_t run = 1, next_run = 1, sock = -1, i = 0;
- int32_t myport = PORT_SMTP, mysslport = PORT_SMTP_SSL;
- char *buffer = "HELO hydra\r\n";
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-socks5.c
-+++ b/hydra-socks5.c
-@@ -10,7 +10,6 @@ This module enable bruteforcing for socks5, only following types are supported:
- */
-
- extern char *HYDRA_EXIT;
--unsigned char *buf;
-
- int32_t fail_cnt;
-
-@@ -18,6 +17,7 @@ int32_t start_socks5(int32_t s, char *ip, int32_t port, unsigned char options, c
- char *empty = "";
- char *login, *pass, buffer[300];
- int32_t pport, fud = 0;
-+ unsigned char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
---- a/hydra-telnet.c
-+++ b/hydra-telnet.c
-@@ -2,13 +2,13 @@
- #include <arpa/telnet.h>
-
- extern char *HYDRA_EXIT;
--char *buf;
- int32_t no_line_mode;
-
- int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "";
- char *login, *pass, buffer[300];
- int32_t i = 0;
-+ char *buf;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -99,6 +99,7 @@ int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, c
- void service_telnet(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
- int32_t run = 1, next_run = 1, sock = -1, fck;
- int32_t myport = PORT_TELNET, mysslport = PORT_TELNET_SSL;
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-vmauthd.c
-+++ b/hydra-vmauthd.c
-@@ -8,11 +8,11 @@
-
- extern char *HYDRA_EXIT;
-
--char *buf;
--
- int32_t start_vmauthd(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
- char *empty = "\"\"";
- char *login, *pass, buffer[300];
-+ char *buf;
-+
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -68,6 +68,7 @@ int32_t start_vmauthd(int32_t s, char *ip, int32_t port, unsigned char options,
- void service_vmauthd(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
- int32_t run = 1, next_run = 1, sock = -1;
- int32_t myport = PORT_VMAUTHD, mysslport = PORT_VMAUTHD_SSL;
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
---- a/hydra-vnc.c
-+++ b/hydra-vnc.c
-@@ -19,7 +19,6 @@ int32_t vnc_client_version = RFB33;
- int32_t failed_auth = 0;
-
- extern char *HYDRA_EXIT;
--char *buf;
-
- /*
- * Encrypt CHALLENGESIZE bytes in memory using a password.
-@@ -48,6 +47,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char
- char *empty = "";
- char *pass;
- unsigned char buf2[CHALLENGESIZE + 4];
-+ char *buf;
-
- if (strlen(pass = hydra_get_next_password()) == 0)
- pass = empty;
-@@ -148,6 +148,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char
- void service_vnc(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
- int32_t run = 1, next_run = 1, sock = -1;
- int32_t myport = PORT_VNC, mysslport = PORT_VNC_SSL;
-+ char *buf;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
diff --git a/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch b/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch
deleted file mode 100644
index eea0c3bc3ae..00000000000
--- a/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/hydra-http.c
-+++ b/hydra-http.c
-@@ -12,7 +12,7 @@ char *http_buf = NULL;
- static char end_condition[END_CONDITION_MAX_LEN];
- int end_condition_type=-1;
-
--int32_t webport, freemischttp = 0;
-+int32_t freemischttp = 0;
- int32_t http_auth_mechanism = AUTH_UNASSIGNED;
-
- int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *type, ptr_header_node ptr_head) {
-@@ -22,6 +22,7 @@ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, cha
- char *ptr, *fooptr;
- int32_t complete_line = 0, buffer_size;
- char tmpreplybuf[1024] = "", *tmpreplybufptr;
-+ int32_t webport;
-
- if (strlen(login = hydra_get_next_login()) == 0)
- login = empty;
-@@ -291,6 +292,7 @@ void service_http(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
- int32_t myport = PORT_HTTP, mysslport = PORT_HTTP_SSL;
- char *ptr, *ptr2;
- ptr_header_node ptr_head = NULL;
-+ int32_t webport;
-
- hydra_register_socket(sp);
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
diff --git a/net-analyzer/hydra/hydra-9.0-r1.ebuild b/net-analyzer/hydra/hydra-9.0-r1.ebuild
index c7b1e8aa733..402929ea230 100644
--- a/net-analyzer/hydra/hydra-9.0-r1.ebuild
+++ b/net-analyzer/hydra/hydra-9.0-r1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit toolchain-funcs
+inherit flag-o-matic toolchain-funcs
DESCRIPTION="Parallelized network login hacker"
HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
@@ -46,10 +46,6 @@ DEPEND="
virtual/pkgconfig
"
PATCHES=(
- "${FILESDIR}"/${PN}-9.0-fcommon-gtk.patch
- "${FILESDIR}"/${PN}-9.0-fcommon-http.patch
- "${FILESDIR}"/${PN}-9.0-fcommon-mod.patch
- "${FILESDIR}"/${PN}-9.0-fcommon-mods.patch
"${FILESDIR}"/${PN}-9.0-unneeded-buf.patch
"${FILESDIR}"/${PN}-9.0-vnc.patch
)
@@ -74,6 +70,8 @@ src_configure() {
# Note: the top level configure script is not autoconf-based
tc-export CC PKG_CONFIG
+ append-cflags -fcommon
+
export OPTS="${CFLAGS}"
hydra_sed() {
diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild
index 858c7af0135..3ff5496cc9b 100644
--- a/net-analyzer/hydra/hydra-9999999.ebuild
+++ b/net-analyzer/hydra/hydra-9999999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit git-r3 toolchain-funcs
+inherit flag-o-matic git-r3 toolchain-funcs
DESCRIPTION="Parallelized network login hacker"
HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
@@ -45,12 +45,6 @@ DEPEND="
${RDEPEND}
virtual/pkgconfig
"
-PATCHES=(
- "${FILESDIR}"/${PN}-9.0-fcommon-gtk.patch
- "${FILESDIR}"/${PN}-9.0-fcommon-mod.patch
- "${FILESDIR}"/${PN}-9.0-fcommon-mods.patch
- "${FILESDIR}"/${PN}-9999999-fcommon-http.patch
-)
src_prepare() {
default
@@ -70,6 +64,7 @@ src_prepare() {
src_configure() {
# Note: the top level configure script is not autoconf-based
tc-export CC PKG_CONFIG
+ append-cflags -fcommon
export OPTS="${CFLAGS}"
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/
@ 2020-07-29 9:45 Jeroen Roovers
0 siblings, 0 replies; 6+ messages in thread
From: Jeroen Roovers @ 2020-07-29 9:45 UTC (permalink / raw
To: gentoo-commits
commit: 407982e18b554dd91ce521982662840e3f7cae9f
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 29 09:38:55 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jul 29 09:44:59 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=407982e1
net-analyzer/hydra: Old
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Closes: https://bugs.gentoo.org/665942
Closes: https://bugs.gentoo.org/686420
Closes: https://bugs.gentoo.org/697580
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
net-analyzer/hydra/Manifest | 2 -
net-analyzer/hydra/files/hydra-8.0-configure.patch | 44 ---------
net-analyzer/hydra/files/hydra-8.4-configure.patch | 48 ----------
net-analyzer/hydra/hydra-8.1.ebuild | 98 --------------------
net-analyzer/hydra/hydra-8.9.1.ebuild | 103 ---------------------
5 files changed, 295 deletions(-)
diff --git a/net-analyzer/hydra/Manifest b/net-analyzer/hydra/Manifest
index 3874be7e823..fb6dd8eb493 100644
--- a/net-analyzer/hydra/Manifest
+++ b/net-analyzer/hydra/Manifest
@@ -1,4 +1,2 @@
-DIST hydra-8.1.tar.gz 559031 BLAKE2B a3d2b52508a1d03a2f3d6cecf7100543487b5a0f6210dd6128d3ab48ad16ca3a8fad49709163830049ed8b9bb6891861f9c3f5fd5a6179b0a87a072877e829af SHA512 7608dd365865e5976bea446faedaad9f0334e7572fd0ee47a601c471471fc7c8a922c7114f4df08705b34b29144d3a6552e66148adf6b0f92c67301119c94959
-DIST hydra-8.9.1.tar.gz 1186320 BLAKE2B 97c29cda5e26197ed66aa29555b0e4de3ef5b08bf65aa09fd0d564ee5f63825af71d6a41c4552a06a4c86a98dab5a69913c0b0200fe4e5068284ec7fc1f1061b SHA512 68b07dcb22bc55937e79035954417d820691e3a1eea169c959886ce6a741f545efe7879f31f41a1751779c923410dcc67fe8914bb9b5cf567edfc6fad3997d72
DIST hydra-9.0.tar.gz 1168498 BLAKE2B b4834c66fb1bebcd19151784b75d4c9220cbf7045b289a063a1cbc48a793abfa2edcb466d43234bd4c8e14074a2e2a39ccd697698392f24f39c84da54ee07165 SHA512 58067bd2696e82645bb959fe5537f2876e1d8c170a15fe6a9ac65bbdc33cfb75b47fd1a969c314a6c6d91b2b6c0ce4ba087680bbd67a5a38925a2a8b5c5ad338
DIST hydra-9.1.tar.gz 611846 BLAKE2B 9a5b6dc52b5f4069bf326e86728ebaf8c1fe018536f3943b83493de934703bff6770ae3f7a9a223ee00b5f52f7bd10ee4ddc272e1bbad00c399aa19cc0c083ba SHA512 863176375fe1aae4c0a2b74c11aba297682d66e522c98c926c539348309b0af4e407e460b4cb803d2c83c008787c73f7f1e56ac6aca9791351e1b596c2e4fbb2
diff --git a/net-analyzer/hydra/files/hydra-8.0-configure.patch b/net-analyzer/hydra/files/hydra-8.0-configure.patch
deleted file mode 100644
index 3ab9989b638..00000000000
--- a/net-analyzer/hydra/files/hydra-8.0-configure.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -66,8 +66,6 @@
- MYSQL_IPATH=""
- AFP_PATH=""
- AFP_IPATH=""
--NCP_PATH=""
--NCP_IPATH=""
- SVN_PATH=""
- SVN_IPATH=""
- APR_IPATH=""
-@@ -508,32 +506,6 @@
- fi
-
- echo "Checking for NCP (libncp.so / nwcalls.h) ..."
--for i in $LIBDIRS ; do
-- if [ "X" = "X$NCP_PATH" ]; then
-- if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a" ]; then
-- NCP_PATH="$i"
-- fi
-- fi
-- if [ "X" = "X$NCP_PATH" ]; then
-- TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.`
-- if [ -n "$TMP_LIB" ]; then
-- NCP_PATH="$i"
-- fi
-- fi
-- if [ "X" = "X$NCP_PATH" ]; then
-- TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.`
-- if [ -n "$TMP_LIB" ]; then
-- NCP_PATH="$i"
-- fi
-- fi
--done
--for i in $INCDIRS ; do
-- if [ "X" != "X$NCP_PATH" ]; then
-- if [ -f "$i/ncp/nwcalls.h" ]; then
-- NCP_IPATH="$i"
-- fi
-- fi
--done
- if [ -n "$NCP_PATH" -a -n "$NCP_IPATH" ]; then
- echo " ... found"
- fi
diff --git a/net-analyzer/hydra/files/hydra-8.4-configure.patch b/net-analyzer/hydra/files/hydra-8.4-configure.patch
deleted file mode 100644
index ba99ff2acda..00000000000
--- a/net-analyzer/hydra/files/hydra-8.4-configure.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -46,8 +46,6 @@
- MYSQL_IPATH=""
- AFP_PATH=""
- AFP_IPATH=""
--NCP_PATH=""
--NCP_IPATH=""
- SVN_PATH=""
- SVN_IPATH=""
- APR_IPATH=""
-@@ -679,36 +677,6 @@
- fi
-
- echo "Checking for NCP (libncp.so / nwcalls.h) ..."
--for i in $LIBDIRS ; do
-- if [ "X" = "X$NCP_PATH" ]; then
-- if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a" ]; then
-- NCP_PATH="$i"
-- fi
-- fi
-- if [ "X" = "X$NCP_PATH" ]; then
-- TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.`
-- if [ -n "$TMP_LIB" ]; then
-- NCP_PATH="$i"
-- fi
-- fi
-- if [ "X" = "X$NCP_PATH" ]; then
-- TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.`
-- if [ -n "$TMP_LIB" ]; then
-- NCP_PATH="$i"
-- fi
-- fi
--done
--for i in $INCDIRS ; do
-- if [ "X" != "X$NCP_PATH" ]; then
-- if [ -f "$i/ncp/nwcalls.h" ]; then
-- NCP_IPATH="$i"
-- fi
-- fi
--done
--if [ "X" != "X$DEBUG" ]; then
-- echo DEBUG: NCP_PATH=$NCP_PATH/libncp
-- echo DEBUG: NCP_IPATH=$NCP_IPATH/ncp/nwcalls.h
--fi
- if [ -n "$NCP_PATH" -a -n "$NCP_IPATH" ]; then
- echo " ... found"
- fi
diff --git a/net-analyzer/hydra/hydra-8.1.ebuild b/net-analyzer/hydra/hydra-8.1.ebuild
deleted file mode 100644
index b1b7d80ab55..00000000000
--- a/net-analyzer/hydra/hydra-8.1.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils toolchain-funcs
-
-DESCRIPTION="Parallelized network login hacker"
-HOMEPAGE="http://www.thc.org/thc-hydra/"
-SRC_URI="http://freeworld.thc.org/releases/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~ppc x86"
-IUSE="firebird gtk idn mysql ncp oracle pcre postgres ssl subversion"
-
-RDEPEND="
- dev-libs/openssl
- sys-libs/ncurses
- firebird? ( dev-db/firebird )
- gtk? (
- dev-libs/atk
- dev-libs/glib:2
- x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:2
- )
- idn? ( net-dns/libidn )
- mysql? ( virtual/mysql )
- ncp? ( net-fs/ncpfs )
- oracle? ( dev-db/oracle-instantclient-basic )
- pcre? ( dev-libs/libpcre )
- postgres? ( dev-db/postgresql )
- ssl? ( >=net-libs/libssh-0.4.0 )
- subversion? ( dev-vcs/subversion )
-"
-DEPEND="
- ${RDEPEND}
- virtual/pkgconfig
-"
-
-src_prepare() {
- # None of the settings in Makefile.unix are useful to us
- : > Makefile.unix
-
- sed -i \
- -e 's:|| echo.*$::' \
- -e '/\t-$(CC)/s:-::' \
- -e '/^OPTS/{s|=|+=|;s| -O3||}' \
- -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \
- Makefile.am || die
-
- epatch "${FILESDIR}"/${PN}-8.0-configure.patch
-}
-
-src_configure() {
- export OPTS="${CFLAGS}"
-
- if ! use subversion; then
- sed -i 's/-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1//;s/-DLIBSVN//' configure || die
- fi
-
- if ! use mysql; then
- sed -i 's/-lmysqlclient//;s/-DLIBMYSQLCLIENT//' configure || die
- fi
-
- # Linking against libtinfo might be enough here but pkg-config --libs tinfo
- # would require a USE=tinfo flag and recent linkers should drop libcurses
- # as needed
- sed -i \
- -e 's|-lcurses|'"$( $(tc-getPKG_CONFIG) --libs ncurses)"'|g' \
- configure || die
-
- # Note: despite the naming convention, the top level script is not an
- # autoconf-based script.
- export NCP_PATH=$(usex ncp /usr/$(get_libdir) '')
- export NCP_IPATH=$(usex ncp /usr/include '')
- sh configure \
- --prefix=/usr \
- --nostrip \
- $(use gtk && echo --disable-xhydra) \
- || die
-
- if use gtk ; then
- cd hydra-gtk && \
- econf
- fi
-}
-
-src_compile() {
- tc-export CC
- emake XLIBPATHS=''
- use gtk && emake -C hydra-gtk
-}
-
-src_install() {
- dobin hydra pw-inspector
- use gtk && dobin hydra-gtk/src/xhydra
- dodoc CHANGES README
-}
diff --git a/net-analyzer/hydra/hydra-8.9.1.ebuild b/net-analyzer/hydra/hydra-8.9.1.ebuild
deleted file mode 100644
index 9ee22e48e67..00000000000
--- a/net-analyzer/hydra/hydra-8.9.1.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit toolchain-funcs
-
-DESCRIPTION="Parallelized network login hacker"
-HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
-SRC_URI="https://github.com/vanhauser-thc/thc-hydra/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="firebird gtk idn libressl mysql ncp oracle pcre postgres ssl subversion"
-
-RDEPEND="
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- sys-libs/ncurses:=
- firebird? ( dev-db/firebird )
- gtk? (
- dev-libs/atk
- dev-libs/glib:2
- x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:2
- )
- idn? ( net-dns/libidn:0= )
- mysql? ( dev-db/mysql-connector-c:0= )
- ncp? ( net-fs/ncpfs )
- oracle? ( dev-db/oracle-instantclient-basic )
- pcre? ( dev-libs/libpcre )
- postgres? ( dev-db/postgresql:* )
- ssl? ( >=net-libs/libssh-0.4.0 )
- subversion? ( dev-vcs/subversion )
-"
-DEPEND="
- ${RDEPEND}
- virtual/pkgconfig
-"
-PATCHES=(
- "${FILESDIR}"/${PN}-8.4-configure.patch
-)
-S=${WORKDIR}/thc-${P}
-
-src_prepare() {
- default
-
- # None of the settings in Makefile.unix are useful to us
- : > Makefile.unix
-
- sed -i \
- -e 's:|| echo.*$::' \
- -e '/\t-$(CC)/s:-::' \
- -e '/^OPTS/{s|=|+=|;s| -O3||}' \
- -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \
- Makefile.am || die
-}
-
-src_configure() {
- export OPTS="${CFLAGS}"
-
- if ! use subversion; then
- sed -i 's/-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1//;s/-DLIBSVN//' configure || die
- fi
-
- if ! use mysql; then
- sed -i 's/-lmysqlclient//;s/-DLIBMYSQLCLIENT//' configure || die
- fi
-
- # Linking against libtinfo might be enough here but pkg-config --libs tinfo
- # would require a USE=tinfo flag and recent linkers should drop libcurses
- # as needed
- sed -i \
- -e 's|-lcurses|'"$( $(tc-getPKG_CONFIG) --libs ncurses)"'|g' \
- configure || die
-
- # Note: despite the naming convention, the top level script is not an
- # autoconf-based script.
- export NCP_PATH=$(usex ncp /usr/$(get_libdir) '')
- export NCP_IPATH=$(usex ncp /usr/include '')
- sh configure \
- --prefix=/usr \
- --nostrip \
- $(use gtk && echo --disable-xhydra) \
- || die
-
- if use gtk ; then
- cd hydra-gtk && \
- econf
- fi
-}
-
-src_compile() {
- tc-export CC
- emake XLIBPATHS=''
- use gtk && emake -C hydra-gtk
-}
-
-src_install() {
- dobin hydra pw-inspector
- use gtk && dobin hydra-gtk/src/xhydra
- dodoc CHANGES README
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/
@ 2021-03-19 2:08 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2021-03-19 2:08 UTC (permalink / raw
To: gentoo-commits
commit: 795f1881a904eda870e5b108494eda83caaab6b3
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 19 02:08:07 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 19 02:08:44 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=795f1881
net-analyzer/hydra: don't inject hardening CFLAGS
We have these by default in Gentoo.
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/hydra-9.2-respect-cflags-more.patch | 26 ++++++++++++++++++++++
net-analyzer/hydra/hydra-9.2.ebuild | 4 ++++
net-analyzer/hydra/hydra-9999999.ebuild | 4 ++++
3 files changed, 34 insertions(+)
diff --git a/net-analyzer/hydra/files/hydra-9.2-respect-cflags-more.patch b/net-analyzer/hydra/files/hydra-9.2-respect-cflags-more.patch
new file mode 100644
index 00000000000..8d158640803
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.2-respect-cflags-more.patch
@@ -0,0 +1,26 @@
+Don't inject hardening CFLAGS. We already have these by default in Gentoo.
+--- a/configure
++++ b/configure
+@@ -1376,22 +1376,6 @@ if [ -n "$CRYPTO_PATH" ]; then
+ echo " ... RSA_generate_key()$RSA found"
+ fi
+
+-echo "Checking for secure compile option support in $CC ..."
+-GCCSEC="no"
+-LDSEC="no"
+-GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
+-echo '#include <stdio.h>' > $TMPC.c
+-echo 'int main() { printf(""); return 0; }' >> $TMPC.c
+-$CC -pie -fPIE $GCCSEPOPT -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
+-test -x $TMPC && GCCSEC="yes"
+-grep -q fPI $TMPC.c.err || GCCSECOPT="-pie -fPIE $GCCSECOPT"
+-rm -f "$TMPC"
+-$CC $GCCSECOPT -Wl,-z,now -Wl,-z,relro -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
+-test -x $TMPC && { LDSEC="yes" ; GCCSECOPT="$GCCSECOPT -Wl,-z,now -Wl,-z,relro" ; }
+-rm -f $TMPC $TMPC.c $TMPC.c.err
+-echo " Compiling... $GCCSEC"
+-echo " Linking... $LDSEC"
+-
+ echo
+ XDEFINES=""
+ XLIBS=""
diff --git a/net-analyzer/hydra/hydra-9.2.ebuild b/net-analyzer/hydra/hydra-9.2.ebuild
index 4c57cd8f9bb..ff661533579 100644
--- a/net-analyzer/hydra/hydra-9.2.ebuild
+++ b/net-analyzer/hydra/hydra-9.2.ebuild
@@ -45,6 +45,10 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.2-respect-cflags-more.patch
+)
+
src_prepare() {
default
diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild
index 8745aff7191..7333951b195 100644
--- a/net-analyzer/hydra/hydra-9999999.ebuild
+++ b/net-analyzer/hydra/hydra-9999999.ebuild
@@ -44,6 +44,10 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.2-respect-cflags-more.patch
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/
@ 2021-10-22 3:48 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2021-10-22 3:48 UTC (permalink / raw
To: gentoo-commits
commit: 0a6dddca771421a50134b6a27ba0122f3fe25d83
Author: EmilienMottet <emilien.mottet <AT> grenoble-inp <DOT> org>
AuthorDate: Thu Oct 21 08:11:25 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 22 03:47:40 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a6dddca
net-analyzer/hydra: update live ebuild
- Use README instead of README.md in dodoc
- Update patch for matching new configure
Closes: https://bugs.gentoo.org/818988
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Emilien Mottet <emilien.mottet <AT> grenoble-inp.org>
Closes: https://github.com/gentoo/gentoo/pull/22653
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/hydra-9999999-respect-cflags-more.patch | 31 ++++++++++++++++++++++
net-analyzer/hydra/hydra-9999999.ebuild | 4 +--
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/net-analyzer/hydra/files/hydra-9999999-respect-cflags-more.patch b/net-analyzer/hydra/files/hydra-9999999-respect-cflags-more.patch
new file mode 100644
index 00000000000..0fe5753ec8a
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9999999-respect-cflags-more.patch
@@ -0,0 +1,31 @@
+Don't inject hardening CFLAGS. We already have these by default in Gentoo.
+--- a/configure
++++ b/configure
+@@ -1380,27 +1380,6 @@ if [ -n "$CRYPTO_PATH" ]; then
+ echo " ... RSA_generate_key()$RSA found"
+ fi
+
+-echo "Checking for secure compile option support in $CC ..."
+-GCCSEC="no"
+-LDSEC="no"
+-GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
+-echo '#include <stdio.h>' > $TMPC.c
+-echo 'int main() { printf(""); return 0; }' >> $TMPC.c
+-$CC -pie -fPIE $GCCSEPOPT -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
+-test -x $TMPC && GCCSEC="yes"
+-grep -q fPI $TMPC.c.err || GCCSECOPT="-pie -fPIE $GCCSECOPT"
+-rm -f "$TMPC"
+-$CC $GCCSECOPT -Wl,-z,now -Wl,-z,relro -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
+-test -x $TMPC && { LDSEC="yes" ; GCCSECOPT="$GCCSECOPT -Wl,-z,now -Wl,-z,relro" ; }
+-rm -f $TMPC $TMPC.c $TMPC.c.err
+-echo " Compiling... $GCCSEC"
+-echo " Linking... $LDSEC"
+-
+-echo "Checking for --allow-multiple-definition linker option ... $WALLOW"
+-if [ "$WALLOW" = "yes" ]; then
+- GCCSECOPT="$GCCSECOPT -Wl,--allow-multiple-definition"
+-fi
+-
+ echo
+ XDEFINES=""
+ XLIBS=""
\ No newline at end of file
diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild
index 170b7b81086..4597ee4cb58 100644
--- a/net-analyzer/hydra/hydra-9999999.ebuild
+++ b/net-analyzer/hydra/hydra-9999999.ebuild
@@ -43,7 +43,7 @@ DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}"/${PN}-9.2-respect-cflags-more.patch
+ "${FILESDIR}"/${PN}-9999999-respect-cflags-more.patch
)
src_prepare() {
@@ -117,5 +117,5 @@ src_compile() {
src_install() {
dobin hydra pw-inspector
use gtk && dobin hydra-gtk/src/xhydra
- dodoc CHANGES README.md
+ dodoc CHANGES README
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/
@ 2023-10-04 16:50 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2023-10-04 16:50 UTC (permalink / raw
To: gentoo-commits
commit: 72fa57a7886b0b295dea643dd1dda2d7ee1ae77e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 4 16:46:52 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 4 16:47:18 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72fa57a7
net-analyzer/hydra: add 9.5
Closes: https://bugs.gentoo.org/895530
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-analyzer/hydra/Manifest | 1 +
.../hydra-9.5-no-clobber-fortify-source.patch | 14 +++
net-analyzer/hydra/hydra-9.5.ebuild | 128 +++++++++++++++++++++
3 files changed, 143 insertions(+)
diff --git a/net-analyzer/hydra/Manifest b/net-analyzer/hydra/Manifest
index 64c4c34ffc82..df629c2399dc 100644
--- a/net-analyzer/hydra/Manifest
+++ b/net-analyzer/hydra/Manifest
@@ -1 +1,2 @@
DIST hydra-9.4.tar.gz 833465 BLAKE2B 2ba7f7e4a70c4f6c9dc4ec94d652ab7534cb0fb17b88412dfcf1e651d9f31af573ab9acd2d9cb698da6462f4744f53dfb8f87a437c32bebfa4f9a04f2f9136c0 SHA512 de5a1e73673fdc2f193cfb1aeec337c9d8faad52b06524850f352a797a4a5ef08cba8fc51da96fed1db01d141127e58c2aa874027f51c40a94a474de778d5241
+DIST hydra-9.5.tar.gz 833798 BLAKE2B 848c5b34719c2db98b3a3bee1c47e0b2ebeea668f5c387f015c7079f800cf0607a8cb5accba25ef2e253deb44422d51cf6e012c313496942a47468e0503000e8 SHA512 a8fe42d175d184cdb82072f3a963b956d767fa908aaf1cbbc0746b6a67cfd37f8b5e3ecf9be82085a7f6c1ef57e91a8bf05bfeb41e96708899b6c8d7f05eee06
diff --git a/net-analyzer/hydra/files/hydra-9.5-no-clobber-fortify-source.patch b/net-analyzer/hydra/files/hydra-9.5-no-clobber-fortify-source.patch
new file mode 100644
index 000000000000..281e5b63c9ff
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-9.5-no-clobber-fortify-source.patch
@@ -0,0 +1,14 @@
+Don't clobber toolchain defaults.
+
+https://bugs.gentoo.org/895530
+--- a/configure
++++ b/configure
+@@ -1381,7 +1381,7 @@ fi
+ echo "Checking for secure compile option support in $CC ..."
+ GCCSEC="no"
+ LDSEC="no"
+-GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
++GCCSECOPT="-fstack-protector-all --param ssp-buffer-size=4"
+ echo '#include <stdio.h>' > $TMPC.c
+ echo 'int main() { printf(""); return 0; }' >> $TMPC.c
+ $CC -pie -fPIE $GCCSEPOPT -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
diff --git a/net-analyzer/hydra/hydra-9.5.ebuild b/net-analyzer/hydra/hydra-9.5.ebuild
new file mode 100644
index 000000000000..12201fa9828f
--- /dev/null
+++ b/net-analyzer/hydra/hydra-9.5.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+DESCRIPTION="Parallelized network login hacker"
+HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra"
+SRC_URI="https://github.com/vanhauser-thc/thc-hydra/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/thc-${P}
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug firebird gcrypt gtk idn memcached mongodb mysql ncurses oracle pcre postgres rdp libssh samba subversion zlib"
+
+RDEPEND="
+ dev-libs/openssl:=
+ gtk? (
+ >=app-accessibility/at-spi2-core-2.46.0
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ )
+ firebird? ( dev-db/firebird )
+ gcrypt? ( dev-libs/libgcrypt )
+ idn? ( net-dns/libidn:= )
+ memcached? ( dev-libs/libmemcached[sasl] )
+ mongodb? ( dev-libs/mongo-c-driver )
+ mysql? ( dev-db/mysql-connector-c:= )
+ ncurses? ( sys-libs/ncurses:= )
+ oracle? ( dev-db/oracle-instantclient[sdk] )
+ pcre? ( dev-libs/libpcre2 )
+ postgres? ( dev-db/postgresql:* )
+ rdp? ( net-misc/freerdp )
+ libssh? ( >=net-libs/libssh-0.4.0 )
+ samba? ( net-fs/samba )
+ subversion? ( dev-vcs/subversion )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9.5-no-clobber-fortify-source.patch
+)
+
+src_prepare() {
+ default
+
+ # None of the settings in Makefile.unix are useful to us
+ mv Makefile.unix{,.gentoo_unused} || die
+ touch Makefile.unix || die
+
+ sed -i \
+ -e 's:|| echo.*$::' \
+ -e '/\t-$(CC)/s:-::' \
+ -e '/^OPTS/{s|=|+=|;s| -O3||}' \
+ -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \
+ Makefile.am || die
+
+ # Needed to get GTK+ 3 change in configure.in (.in got updated, but
+ # configure not regen'd.)
+ #cd hydra-gtk || die
+ #sed -i -e 's:AC_INIT(configure.in):AC_INIT(configure.ac):' configure.in || die
+ #eautoreconf
+}
+
+src_configure() {
+ # Note: the top level configure script is not autoconf-based
+ tc-export CC PKG_CONFIG
+
+ export OPTS="${CFLAGS}"
+
+ hydra_sed() {
+ if use ${1}; then
+ einfo "Enabling ${1}"
+ if [[ -n "${3}" ]]; then
+ sed -i 's#'"${2}"'#'"${3}"'#' configure || die
+ fi
+ else
+ einfo "Disabling ${1}"
+ sed -i 's#'"${2}"'##; s#'"${4}"'##' configure || die
+ fi
+ }
+
+ hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD'
+ hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT'
+ hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H'
+ hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH'
+ hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED'
+ hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON'
+ hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT'
+ hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES'
+ hydra_sed pcre '-lpcre2-8' '$( "${PKG_CONFIG}" --libs libpcre2-8 )' '-DHAVE_PCRE'
+ hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES'
+ hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE'
+ hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP'
+ # TODO: https://bugs.gentoo.org/686148
+ #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN'
+ hydra_sed samba '-lsmbclient' '$( "${PKG_CONFIG}" --libs smbclient )' '-DLIBSMBCLIENT'
+ hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN'
+ hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB'
+
+ edo ./configure \
+ $(usev !gtk '--disable-xhydra') \
+ $(usev debug '--debug') \
+ --nostrip \
+ --prefix=/usr \
+ || die
+
+ if use gtk ; then
+ pushd hydra-gtk || die
+ econf
+ fi
+}
+
+src_compile() {
+ emake XLIBPATHS=''
+ use gtk && emake -C hydra-gtk
+}
+
+src_install() {
+ dobin hydra pw-inspector
+ use gtk && dobin hydra-gtk/src/xhydra
+ dodoc CHANGES README
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-04 16:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-19 2:08 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/hydra/, net-analyzer/hydra/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-10-04 16:50 Sam James
2021-10-22 3:48 Sam James
2020-07-29 9:45 Jeroen Roovers
2020-01-28 8:49 Jeroen Roovers
2020-01-26 16:43 Jeroen Roovers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox