1 |
commit: 8e301de130b75dc4ee76ca2e344de67e6965b90b |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 28 08:48:45 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 28 08:49:23 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e301de1 |
7 |
|
8 |
net-analyzer/hydra: Set CFLAGS=-fcommon |
9 |
|
10 |
Package-Manager: Portage-2.3.85, Repoman-2.3.20 |
11 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=706416 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
.../hydra/files/hydra-9.0-fcommon-gtk.patch | 79 ---- |
15 |
.../hydra/files/hydra-9.0-fcommon-http.patch | 27 -- |
16 |
.../hydra/files/hydra-9.0-fcommon-mod.patch | 63 --- |
17 |
.../hydra/files/hydra-9.0-fcommon-mods.patch | 496 --------------------- |
18 |
.../hydra/files/hydra-9999999-fcommon-http.patch | 27 -- |
19 |
net-analyzer/hydra/hydra-9.0-r1.ebuild | 8 +- |
20 |
net-analyzer/hydra/hydra-9999999.ebuild | 9 +- |
21 |
7 files changed, 5 insertions(+), 704 deletions(-) |
22 |
|
23 |
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch |
24 |
deleted file mode 100644 |
25 |
index 02ebab64e41..00000000000 |
26 |
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch |
27 |
+++ /dev/null |
28 |
@@ -1,79 +0,0 @@ |
29 |
---- a/hydra-gtk/src/callbacks.c |
30 |
-+++ b/hydra-gtk/src/callbacks.c |
31 |
-@@ -66,7 +66,7 @@ int hydra_get_options(char *options[]) { |
32 |
- gchar *tmp; |
33 |
- GString *a; |
34 |
- |
35 |
-- options[0] = HYDRA_BIN; |
36 |
-+ options[0] = hydra_bin; |
37 |
- |
38 |
- /* get the port */ |
39 |
- widget = lookup_widget(GTK_WIDGET(wndMain), "spnPort"); |
40 |
-@@ -599,7 +599,7 @@ int *popen_re_unbuffered(char *command) { |
41 |
- |
42 |
- (void) hydra_get_options(options); |
43 |
- |
44 |
-- execv(HYDRA_BIN, options); |
45 |
-+ execv(hydra_bin, options); |
46 |
- |
47 |
- g_warning("%s %i: popen_rw_unbuffered: execv() returned", __FILE__, __LINE__); |
48 |
- |
49 |
---- a/hydra-gtk/src/main.c |
50 |
-+++ b/hydra-gtk/src/main.c |
51 |
-@@ -17,12 +17,12 @@ |
52 |
- char *hydra_path1 = "./hydra"; |
53 |
- char *hydra_path2 = "/usr/local/bin/hydra"; |
54 |
- char *hydra_path3 = "/usr/bin/hydra"; |
55 |
-- |
56 |
-+char *hydra_bin; |
57 |
-+GtkWidget *wndMain; |
58 |
-+guint message_id; |
59 |
- |
60 |
- int main(int argc, char *argv[]) { |
61 |
-- extern GtkWidget *wndMain; |
62 |
- int i; |
63 |
-- extern guint message_id; |
64 |
- GtkWidget *output; |
65 |
- GtkTextBuffer *outputbuf; |
66 |
- |
67 |
-@@ -35,22 +35,22 @@ int main(int argc, char *argv[]) { |
68 |
- message_id = 0; |
69 |
- |
70 |
- /* locate the hydra binary */ |
71 |
-- HYDRA_BIN = NULL; |
72 |
-+ hydra_bin = NULL; |
73 |
- for (i = 0; i < argc - 1; i++) { |
74 |
- if (!strcmp(argv[i], "--hydra-path")) { |
75 |
-- HYDRA_BIN = argv[i + 1]; |
76 |
-+ hydra_bin = argv[i + 1]; |
77 |
- break; |
78 |
- } |
79 |
- } |
80 |
- |
81 |
-- if ((HYDRA_BIN != NULL) && (g_file_test(HYDRA_BIN, G_FILE_TEST_IS_EXECUTABLE))) { |
82 |
-+ if ((hydra_bin != NULL) && (g_file_test(hydra_bin, G_FILE_TEST_IS_EXECUTABLE))) { |
83 |
- /* just for obfuscation *g* */ |
84 |
- } else if (g_file_test(hydra_path1, G_FILE_TEST_IS_EXECUTABLE)) { |
85 |
-- HYDRA_BIN = hydra_path1; |
86 |
-+ hydra_bin = hydra_path1; |
87 |
- } else if (g_file_test(hydra_path2, G_FILE_TEST_IS_EXECUTABLE)) { |
88 |
-- HYDRA_BIN = hydra_path2; |
89 |
-+ hydra_bin = hydra_path2; |
90 |
- } else if (g_file_test(hydra_path3, G_FILE_TEST_IS_EXECUTABLE)) { |
91 |
-- HYDRA_BIN = hydra_path3; |
92 |
-+ hydra_bin = hydra_path3; |
93 |
- } else { |
94 |
- g_error("Please tell me where hydra is, use --hydra-path\n"); |
95 |
- return -1; |
96 |
---- a/hydra-gtk/src/support.h |
97 |
-+++ b/hydra-gtk/src/support.h |
98 |
-@@ -40,6 +40,6 @@ GdkPixbuf *create_pixbuf(const gchar * filename); |
99 |
- void glade_set_atk_action_description(AtkAction * action, const gchar * action_name, const gchar * description); |
100 |
- |
101 |
- |
102 |
--GtkWidget *wndMain; |
103 |
--char *HYDRA_BIN; |
104 |
--guint message_id; |
105 |
-+extern GtkWidget *wndMain; |
106 |
-+extern char *hydra_bin; |
107 |
-+extern guint message_id; |
108 |
|
109 |
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch |
110 |
deleted file mode 100644 |
111 |
index 35b45e07161..00000000000 |
112 |
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-http.patch |
113 |
+++ /dev/null |
114 |
@@ -1,27 +0,0 @@ |
115 |
---- a/hydra-http.c |
116 |
-+++ b/hydra-http.c |
117 |
-@@ -5,7 +5,7 @@ |
118 |
- char *webtarget = NULL; |
119 |
- char *slash = "/"; |
120 |
- char *http_buf = NULL; |
121 |
--int32_t webport, freemischttp = 0; |
122 |
-+int32_t freemischttp = 0; |
123 |
- int32_t http_auth_mechanism = AUTH_UNASSIGNED; |
124 |
- |
125 |
- 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) { |
126 |
-@@ -22,6 +22,7 @@ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, cha |
127 |
- char *ptr, *fooptr; |
128 |
- int32_t complete_line = 0, buffer_size; |
129 |
- char tmpreplybuf[1024] = "", *tmpreplybufptr; |
130 |
-+ int32_t webport; |
131 |
- |
132 |
- if (strlen(login = hydra_get_next_login()) == 0) |
133 |
- login = empty; |
134 |
-@@ -291,6 +292,7 @@ void service_http(char *ip, int32_t sp, unsigned char options, char *miscptr, FI |
135 |
- int32_t myport = PORT_HTTP, mysslport = PORT_HTTP_SSL; |
136 |
- char *ptr, *ptr2; |
137 |
- ptr_header_node ptr_head = NULL; |
138 |
-+ int32_t webport; |
139 |
- |
140 |
- hydra_register_socket(sp); |
141 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
142 |
|
143 |
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch |
144 |
deleted file mode 100644 |
145 |
index e16a4157b24..00000000000 |
146 |
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-mod.patch |
147 |
+++ /dev/null |
148 |
@@ -1,63 +0,0 @@ |
149 |
---- a/hydra-mod.c |
150 |
-+++ b/hydra-mod.c |
151 |
-@@ -48,6 +48,19 @@ char ipstring[64]; |
152 |
- uint32_t colored_output = 1; |
153 |
- char quiet = 0; |
154 |
- int32_t old_ssl = 0; |
155 |
-+int32_t debug; |
156 |
-+char *proxy_authentication[MAX_PROXY_COUNT]; |
157 |
-+int32_t proxy_count; |
158 |
-+char proxy_string_ip[MAX_PROXY_COUNT][36]; |
159 |
-+char proxy_string_type[MAX_PROXY_COUNT][10]; |
160 |
-+int32_t proxy_string_port[MAX_PROXY_COUNT]; |
161 |
-+int32_t selected_proxy; |
162 |
-+int32_t verbose; |
163 |
-+int32_t waittime; |
164 |
-+int32_t use_proxy; |
165 |
-+int32_t port; |
166 |
-+char *cmdlinetarget; |
167 |
-+int32_t found; |
168 |
- |
169 |
- #ifdef LIBOPENSSL |
170 |
- SSL *ssl = NULL; |
171 |
---- a/hydra-mod.h |
172 |
-+++ b/hydra-mod.h |
173 |
-@@ -49,23 +49,23 @@ extern int32_t hydra_memsearch(char *haystack, int32_t hlen, char *needle, int32 |
174 |
- extern char *hydra_strrep(char *string, char *oldpiece, char *newpiece); |
175 |
- |
176 |
- #ifdef HAVE_PCRE |
177 |
--int32_t hydra_string_match(char *str, const char *regex); |
178 |
-+extern int32_t hydra_string_match(char *str, const char *regex); |
179 |
- #endif |
180 |
--char *hydra_string_replace(const char *string, const char *substr, const char *replacement); |
181 |
-+extern char *hydra_string_replace(const char *string, const char *substr, const char *replacement); |
182 |
- |
183 |
--int32_t debug; |
184 |
--int32_t verbose; |
185 |
--int32_t waittime; |
186 |
--int32_t port; |
187 |
--int32_t found; |
188 |
--int32_t proxy_count; |
189 |
--int32_t use_proxy; |
190 |
--int32_t selected_proxy; |
191 |
--char proxy_string_ip[MAX_PROXY_COUNT][36]; |
192 |
--int32_t proxy_string_port[MAX_PROXY_COUNT]; |
193 |
--char proxy_string_type[MAX_PROXY_COUNT][10]; |
194 |
--char *proxy_authentication[MAX_PROXY_COUNT]; |
195 |
--char *cmdlinetarget; |
196 |
-+extern int32_t debug; |
197 |
-+extern int32_t verbose; |
198 |
-+extern int32_t waittime; |
199 |
-+extern int32_t port; |
200 |
-+extern int32_t found; |
201 |
-+extern int32_t proxy_count; |
202 |
-+extern int32_t use_proxy; |
203 |
-+extern int32_t selected_proxy; |
204 |
-+extern char proxy_string_ip[MAX_PROXY_COUNT][36]; |
205 |
-+extern int32_t proxy_string_port[MAX_PROXY_COUNT]; |
206 |
-+extern char proxy_string_type[MAX_PROXY_COUNT][10]; |
207 |
-+extern char *proxy_authentication[MAX_PROXY_COUNT]; |
208 |
-+extern char *cmdlinetarget; |
209 |
- |
210 |
- typedef int32_t BOOL; |
211 |
- |
212 |
|
213 |
diff --git a/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch b/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch |
214 |
deleted file mode 100644 |
215 |
index 9d63aa93a41..00000000000 |
216 |
--- a/net-analyzer/hydra/files/hydra-9.0-fcommon-mods.patch |
217 |
+++ /dev/null |
218 |
@@ -1,496 +0,0 @@ |
219 |
---- a/hydra-asterisk.c |
220 |
-+++ b/hydra-asterisk.c |
221 |
-@@ -9,11 +9,11 @@ |
222 |
- |
223 |
- extern char *HYDRA_EXIT; |
224 |
- |
225 |
--char *buf; |
226 |
-- |
227 |
- int32_t start_asterisk(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
228 |
- char *empty = "\"\""; |
229 |
- char *login, *pass, buffer[1024]; |
230 |
-+ char *buf; |
231 |
-+ |
232 |
- |
233 |
- if (strlen(login = hydra_get_next_login()) == 0) |
234 |
- login = empty; |
235 |
-@@ -65,6 +65,7 @@ int32_t start_asterisk(int32_t s, char *ip, int32_t port, unsigned char options, |
236 |
- void service_asterisk(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) { |
237 |
- int32_t run = 1, next_run = 1, sock = -1; |
238 |
- int32_t myport = PORT_ASTERISK, mysslport = PORT_ASTERISK_SSL; |
239 |
-+ char *buf; |
240 |
- |
241 |
- hydra_register_socket(sp); |
242 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
243 |
---- a/hydra-cisco-enable.c |
244 |
-+++ b/hydra-cisco-enable.c |
245 |
-@@ -1,11 +1,11 @@ |
246 |
- #include "hydra-mod.h" |
247 |
- |
248 |
- extern char *HYDRA_EXIT; |
249 |
--char *buf; |
250 |
- |
251 |
- int32_t start_cisco_enable(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
252 |
- char *empty = ""; |
253 |
- char *pass, buffer[300]; |
254 |
-+ char *buf; |
255 |
- |
256 |
- if (strlen(pass = hydra_get_next_password()) == 0) |
257 |
- pass = empty; |
258 |
-@@ -63,6 +63,7 @@ void service_cisco_enable(char *ip, int32_t sp, unsigned char options, char *mis |
259 |
- int32_t myport = PORT_TELNET, mysslport = PORT_TELNET_SSL; |
260 |
- char buffer[300]; |
261 |
- char *login; |
262 |
-+ char *buf; |
263 |
- |
264 |
- hydra_register_socket(sp); |
265 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
266 |
---- a/hydra-cisco.c |
267 |
-+++ b/hydra-cisco.c |
268 |
-@@ -5,11 +5,11 @@ |
269 |
- #endif |
270 |
- |
271 |
- extern char *HYDRA_EXIT; |
272 |
--char *buf = NULL; |
273 |
- |
274 |
- int32_t start_cisco(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
275 |
- char *empty = ""; |
276 |
- char *pass, buffer[300]; |
277 |
-+ char *buf = NULL; |
278 |
- |
279 |
- if (strlen(pass = hydra_get_next_password()) == 0) |
280 |
- pass = empty; |
281 |
---- a/hydra-cvs.c |
282 |
-+++ b/hydra-cvs.c |
283 |
-@@ -3,7 +3,6 @@ |
284 |
- extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec); |
285 |
- |
286 |
- extern char *HYDRA_EXIT; |
287 |
--char *buf; |
288 |
- |
289 |
- int32_t start_cvs(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
290 |
- char *empty = ""; |
291 |
-@@ -37,6 +36,7 @@ int32_t start_cvs(int32_t s, char *ip, int32_t port, unsigned char options, char |
292 |
- 0, 121, 117, 104, 101, 100, 69, 73, 99, 63, 94, 93, 39, 37, 61, 48, |
293 |
- 58, 113, 32, 90, 44, 98, 60, 51, 33, 97, 62 |
294 |
- }; |
295 |
-+ char *buf; |
296 |
- |
297 |
- if (strlen(login = hydra_get_next_login()) == 0) |
298 |
- login = empty; |
299 |
---- a/hydra-ftp.c |
300 |
-+++ b/hydra-ftp.c |
301 |
-@@ -1,11 +1,11 @@ |
302 |
- #include "hydra-mod.h" |
303 |
- |
304 |
- extern char *HYDRA_EXIT; |
305 |
--char *buf; |
306 |
- |
307 |
- int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
308 |
- char *empty = "\"\""; |
309 |
- char *login, *pass, buffer[510]; |
310 |
-+ char *buf; |
311 |
- |
312 |
- if (strlen(login = hydra_get_next_login()) == 0) |
313 |
- login = empty; |
314 |
-@@ -77,6 +77,7 @@ int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char |
315 |
- void service_ftp_core(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname, int32_t tls) { |
316 |
- int32_t run = 1, next_run = 1, sock = -1; |
317 |
- int32_t myport = PORT_FTP, mysslport = PORT_FTP_SSL; |
318 |
-+ char *buf; |
319 |
- |
320 |
- hydra_register_socket(sp); |
321 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
322 |
---- a/hydra-http-form.c |
323 |
-+++ b/hydra-http-form.c |
324 |
-@@ -53,7 +53,6 @@ Added fail or success condition, getting cookies, and allow 5 redirections by da |
325 |
- #include "sasl.h" |
326 |
- |
327 |
- extern char *HYDRA_EXIT; |
328 |
--char *buf; |
329 |
- char *cond; |
330 |
- extern int32_t http_auth_mechanism; |
331 |
- |
332 |
-@@ -579,6 +578,7 @@ return -1 if no response from server |
333 |
- */ |
334 |
- int32_t analyze_server_response(int32_t s) { |
335 |
- int32_t runs = 0; |
336 |
-+ char *buf; |
337 |
- |
338 |
- redirected_flag = 0; |
339 |
- auth_flag = 0; |
340 |
---- a/hydra-http-proxy-urlenum.c |
341 |
-+++ b/hydra-http-proxy-urlenum.c |
342 |
-@@ -2,7 +2,6 @@ |
343 |
- #include "sasl.h" |
344 |
- |
345 |
- extern char *HYDRA_EXIT; |
346 |
--char *buf; |
347 |
- static int32_t http_proxy_auth_mechanism = AUTH_ERROR; |
348 |
- |
349 |
- int32_t start_http_proxy_urlenum(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp, char *hostname) { |
350 |
-@@ -12,6 +11,7 @@ int32_t start_http_proxy_urlenum(int32_t s, char *ip, int32_t port, unsigned cha |
351 |
- char *header = ""; /* XXX TODO */ |
352 |
- char *ptr; |
353 |
- int32_t auth = 0; |
354 |
-+ char *buf; |
355 |
- |
356 |
- login = hydra_get_next_login(); |
357 |
- if (login == NULL || strlen(login) == 0 || strstr(login, "://") == NULL) { |
358 |
---- a/hydra-imap.c |
359 |
-+++ b/hydra-imap.c |
360 |
-@@ -2,7 +2,6 @@ |
361 |
- #include "sasl.h" |
362 |
- |
363 |
- extern char *HYDRA_EXIT; |
364 |
--char *buf; |
365 |
- int32_t counter; |
366 |
- |
367 |
- int32_t imap_auth_mechanism = AUTH_CLEAR; |
368 |
-@@ -42,6 +41,7 @@ char *imap_read_server_capacity(int32_t sock) { |
369 |
- int32_t start_imap(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
370 |
- char *empty = ""; |
371 |
- char *login, *pass, buffer[500], buffer2[500], *fooptr; |
372 |
-+ char *buf = NULL; |
373 |
- |
374 |
- if (strlen(login = hydra_get_next_login()) == 0) |
375 |
- login = empty; |
376 |
-@@ -357,6 +357,7 @@ void service_imap(char *ip, int32_t sp, unsigned char options, char *miscptr, FI |
377 |
- int32_t run = 1, next_run = 1, sock = -1; |
378 |
- int32_t myport = PORT_IMAP, mysslport = PORT_IMAP_SSL, disable_tls = 1; |
379 |
- char *buffer1 = "1 CAPABILITY\r\n"; |
380 |
-+ char *buf = NULL; |
381 |
- |
382 |
- hydra_register_socket(sp); |
383 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
384 |
---- a/hydra-ldap.c |
385 |
-+++ b/hydra-ldap.c |
386 |
-@@ -3,8 +3,6 @@ |
387 |
- |
388 |
- extern char *HYDRA_EXIT; |
389 |
- |
390 |
--unsigned char *buf; |
391 |
--int32_t counter; |
392 |
- int32_t tls_required = 0; |
393 |
- |
394 |
- 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) { |
395 |
-@@ -13,6 +11,8 @@ int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, cha |
396 |
- unsigned char buffer[512]; |
397 |
- int32_t length = 0; |
398 |
- int32_t ldap_auth_mechanism = auth_method; |
399 |
-+ unsigned char *buf; |
400 |
-+ int32_t counter; |
401 |
- |
402 |
- /* |
403 |
- The LDAP "simple" method has three modes of operation: |
404 |
-@@ -354,6 +354,8 @@ int32_t start_ldap(int32_t s, char *ip, int32_t port, unsigned char options, cha |
405 |
- 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) { |
406 |
- int32_t run = 1, next_run = 1, sock = -1; |
407 |
- int32_t myport = PORT_LDAP, mysslport = PORT_LDAP_SSL; |
408 |
-+ unsigned char *buf; |
409 |
-+ int32_t counter; |
410 |
- |
411 |
- hydra_register_socket(sp); |
412 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
413 |
---- a/hydra-mongodb.c |
414 |
-+++ b/hydra-mongodb.c |
415 |
-@@ -17,7 +17,6 @@ void dummy_mongodb() { |
416 |
- extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec); |
417 |
- |
418 |
- extern char *HYDRA_EXIT; |
419 |
--char *buf; |
420 |
- |
421 |
- #define DEFAULT_DB "admin" |
422 |
- |
423 |
-@@ -31,6 +30,7 @@ int is_error_msg(char *msg) { |
424 |
- } |
425 |
- |
426 |
- int require_auth(int32_t sock) { |
427 |
-+ char *buf; |
428 |
- unsigned char m_hdr[] = |
429 |
- "\x3f\x00\x00\x00" //messageLength (63) |
430 |
- "\x00\x00\x00\x41" //requestID |
431 |
---- a/hydra-mssql.c |
432 |
-+++ b/hydra-mssql.c |
433 |
-@@ -3,7 +3,6 @@ |
434 |
- #define MSLEN 30 |
435 |
- |
436 |
- extern char *HYDRA_EXIT; |
437 |
--char *buf; |
438 |
- |
439 |
- unsigned char p_hdr[] = |
440 |
- "\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"; |
441 |
-@@ -52,6 +51,7 @@ int32_t start_mssql(int32_t s, char *ip, int32_t port, unsigned char options, ch |
442 |
- char ms_pass[MSLEN + 1]; |
443 |
- unsigned char len_login, len_pass; |
444 |
- int32_t ret = -1; |
445 |
-+ char *buf; |
446 |
- |
447 |
- if (strlen(login = hydra_get_next_login()) == 0) |
448 |
- login = empty; |
449 |
---- a/hydra-nntp.c |
450 |
-+++ b/hydra-nntp.c |
451 |
-@@ -13,7 +13,6 @@ RFC 4643: Network News Transfer Protocol (NNTP) Extension for Authentication |
452 |
- int32_t nntp_auth_mechanism = AUTH_CLEAR; |
453 |
- |
454 |
- extern char *HYDRA_EXIT; |
455 |
--char *buf; |
456 |
- |
457 |
- char *nntp_read_server_capacity(int32_t sock) { |
458 |
- char *ptr = NULL; |
459 |
-@@ -51,6 +50,7 @@ int32_t start_nntp(int32_t s, char *ip, int32_t port, unsigned char options, cha |
460 |
- char *empty = "\"\""; |
461 |
- char *login, *pass, buffer[500], buffer2[500], *fooptr; |
462 |
- int32_t i = 1; |
463 |
-+ char *buf; |
464 |
- |
465 |
- if (strlen(login = hydra_get_next_login()) == 0) |
466 |
- login = empty; |
467 |
-@@ -270,6 +270,7 @@ void service_nntp(char *ip, int32_t sp, unsigned char options, char *miscptr, FI |
468 |
- int32_t i = 0, run = 1, next_run = 1, sock = -1; |
469 |
- int32_t myport = PORT_NNTP, mysslport = PORT_NNTP_SSL, disable_tls = 0; |
470 |
- char *buffer1 = "CAPABILITIES\r\n"; |
471 |
-+ char *buf; |
472 |
- |
473 |
- hydra_register_socket(sp); |
474 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
475 |
---- a/hydra-oracle-listener.c |
476 |
-+++ b/hydra-oracle-listener.c |
477 |
-@@ -22,8 +22,6 @@ void dummy_oracle_listener() { |
478 |
- #define HASHSIZE 17 |
479 |
- |
480 |
- extern char *HYDRA_EXIT; |
481 |
--char *buf; |
482 |
--unsigned char *hash; |
483 |
- int32_t sid_mechanism = AUTH_PLAIN; |
484 |
- |
485 |
- int32_t initial_permutation(unsigned char **result, char *p_str, int32_t *sz) { |
486 |
-@@ -143,6 +141,7 @@ int32_t ora_hash_password(char *pass) { |
487 |
- unsigned char *desresult; |
488 |
- unsigned char *result; |
489 |
- char buff[strlen(pass) + 5]; |
490 |
-+ unsigned char *hash; |
491 |
- |
492 |
- memset(buff, 0, sizeof(buff)); |
493 |
- |
494 |
-@@ -192,6 +191,8 @@ int32_t start_oracle_listener(int32_t s, char *ip, int32_t port, unsigned char o |
495 |
- char connect_string[200]; |
496 |
- char buffer2[260]; |
497 |
- int32_t siz = 0; |
498 |
-+ char *buf; |
499 |
-+ unsigned char *hash; |
500 |
- |
501 |
- memset(connect_string, 0, sizeof(connect_string)); |
502 |
- memset(buffer2, 0, sizeof(buffer2)); |
503 |
---- a/hydra-oracle-sid.c |
504 |
-+++ b/hydra-oracle-sid.c |
505 |
-@@ -19,7 +19,6 @@ void dummy_oracle_sid() { |
506 |
- #define HASHSIZE 16 |
507 |
- |
508 |
- extern char *HYDRA_EXIT; |
509 |
--char *buf; |
510 |
- unsigned char *hash; |
511 |
- |
512 |
- |
513 |
-@@ -40,6 +39,7 @@ int32_t start_oracle_sid(int32_t s, char *ip, int32_t port, unsigned char option |
514 |
- char connect_string[200]; |
515 |
- char buffer2[260]; |
516 |
- int32_t siz = 0; |
517 |
-+ char *buf; |
518 |
- |
519 |
- memset(connect_string, 0, sizeof(connect_string)); |
520 |
- memset(buffer2, 0, sizeof(buffer2)); |
521 |
---- a/hydra-pcnfs.c |
522 |
-+++ b/hydra-pcnfs.c |
523 |
-@@ -3,7 +3,6 @@ |
524 |
- /* pcnfs stuff copied from prout.c */ |
525 |
- |
526 |
- extern char *HYDRA_EXIT; |
527 |
--char *buf; |
528 |
- |
529 |
- #define LEN_HDR_RPC 24 |
530 |
- #define LEN_AUTH_UNIX 72+12 |
531 |
-@@ -37,6 +36,7 @@ int32_t start_pcnfs(int32_t s, char *ip, int32_t port, unsigned char options, ch |
532 |
- char *empty = ""; |
533 |
- char *login, *pass, buffer[LEN_HDR_RPC + LEN_AUTH_UNIX + LEN_HDR_PCN_AUTH]; |
534 |
- char *ptr, *pkt = buffer; |
535 |
-+ char *buf; |
536 |
- |
537 |
- unsigned long *authp; |
538 |
- struct timeval tv; |
539 |
---- a/hydra-pop3.c |
540 |
-+++ b/hydra-pop3.c |
541 |
-@@ -13,7 +13,6 @@ typedef struct pool_str { |
542 |
- } pool; |
543 |
- |
544 |
- extern char *HYDRA_EXIT; |
545 |
--char *buf; |
546 |
- char apop_challenge[300] = ""; |
547 |
- pool *plist = NULL, *p = NULL; |
548 |
- |
549 |
-@@ -120,6 +119,7 @@ STLS |
550 |
- int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
551 |
- char *empty = "\"\""; |
552 |
- char *login, *pass, buffer[500], buffer2[500], *fooptr; |
553 |
-+ char *buf; |
554 |
- |
555 |
- if (strlen(login = hydra_get_next_login()) == 0) |
556 |
- login = empty; |
557 |
-@@ -416,6 +416,7 @@ int32_t start_pop3(int32_t s, char *ip, int32_t port, unsigned char options, cha |
558 |
- void service_pop3(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) { |
559 |
- int32_t run = 1, next_run = 1, sock = -1; |
560 |
- char *ptr = NULL; |
561 |
-+ char *buf; |
562 |
- |
563 |
- //extract data from the pool, ip is the key |
564 |
- if (plist == NULL) |
565 |
-@@ -520,6 +521,7 @@ int32_t service_pop3_init(char *ip, int32_t sp, unsigned char options, char *mis |
566 |
- char *capa_str = "CAPA\r\n"; |
567 |
- char *quit_str = "QUIT\r\n"; |
568 |
- pool p; |
569 |
-+ char *buf; |
570 |
- |
571 |
- p.pop3_auth_mechanism = AUTH_CLEAR; |
572 |
- p.disable_tls = 1; |
573 |
---- a/hydra-redis.c |
574 |
-+++ b/hydra-redis.c |
575 |
-@@ -1,11 +1,11 @@ |
576 |
- #include "hydra-mod.h" |
577 |
- |
578 |
- extern char *HYDRA_EXIT; |
579 |
--char *buf; |
580 |
- |
581 |
- int32_t start_redis(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
582 |
- char *pass, buffer[510]; |
583 |
- char *empty = ""; |
584 |
-+ char *buf; |
585 |
- |
586 |
- if (strlen(pass = hydra_get_next_password()) == 0) |
587 |
- pass = empty; |
588 |
-@@ -134,6 +134,7 @@ int32_t service_redis_init(char *ip, int32_t sp, unsigned char options, char *mi |
589 |
- int32_t sock = -1; |
590 |
- int32_t myport = PORT_REDIS, mysslport = PORT_REDIS_SSL; |
591 |
- char buffer[] = "*1\r\n$4\r\nping\r\n"; |
592 |
-+ char *buf; |
593 |
- |
594 |
- hydra_register_socket(sp); |
595 |
- if ((options & OPTION_SSL) == 0) { |
596 |
---- a/hydra-smtp-enum.c |
597 |
-+++ b/hydra-smtp-enum.c |
598 |
-@@ -14,7 +14,6 @@ passwd will be used as the domain name |
599 |
- #include "hydra-mod.h" |
600 |
- |
601 |
- extern char *HYDRA_EXIT; |
602 |
--char *buf; |
603 |
- char *err = NULL; |
604 |
- int32_t tosent = 0; |
605 |
- |
606 |
-@@ -27,6 +26,7 @@ int32_t smtp_enum_cmd = VRFY; |
607 |
- int32_t start_smtp_enum(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
608 |
- char *empty = ""; |
609 |
- char *login, *pass, buffer[500]; |
610 |
-+ char *buf; |
611 |
- |
612 |
- if (strlen(login = hydra_get_next_login()) == 0) |
613 |
- login = empty; |
614 |
-@@ -154,6 +154,7 @@ void service_smtp_enum(char *ip, int32_t sp, unsigned char options, char *miscpt |
615 |
- int32_t run = 1, next_run = 1, sock = -1, i = 0; |
616 |
- int32_t myport = PORT_SMTP, mysslport = PORT_SMTP_SSL; |
617 |
- char *buffer = "HELO hydra\r\n"; |
618 |
-+ char *buf; |
619 |
- |
620 |
- hydra_register_socket(sp); |
621 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
622 |
---- a/hydra-socks5.c |
623 |
-+++ b/hydra-socks5.c |
624 |
-@@ -10,7 +10,6 @@ This module enable bruteforcing for socks5, only following types are supported: |
625 |
- */ |
626 |
- |
627 |
- extern char *HYDRA_EXIT; |
628 |
--unsigned char *buf; |
629 |
- |
630 |
- int32_t fail_cnt; |
631 |
- |
632 |
-@@ -18,6 +17,7 @@ int32_t start_socks5(int32_t s, char *ip, int32_t port, unsigned char options, c |
633 |
- char *empty = ""; |
634 |
- char *login, *pass, buffer[300]; |
635 |
- int32_t pport, fud = 0; |
636 |
-+ unsigned char *buf; |
637 |
- |
638 |
- if (strlen(login = hydra_get_next_login()) == 0) |
639 |
- login = empty; |
640 |
---- a/hydra-telnet.c |
641 |
-+++ b/hydra-telnet.c |
642 |
-@@ -2,13 +2,13 @@ |
643 |
- #include <arpa/telnet.h> |
644 |
- |
645 |
- extern char *HYDRA_EXIT; |
646 |
--char *buf; |
647 |
- int32_t no_line_mode; |
648 |
- |
649 |
- int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
650 |
- char *empty = ""; |
651 |
- char *login, *pass, buffer[300]; |
652 |
- int32_t i = 0; |
653 |
-+ char *buf; |
654 |
- |
655 |
- if (strlen(login = hydra_get_next_login()) == 0) |
656 |
- login = empty; |
657 |
-@@ -99,6 +99,7 @@ int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, c |
658 |
- void service_telnet(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) { |
659 |
- int32_t run = 1, next_run = 1, sock = -1, fck; |
660 |
- int32_t myport = PORT_TELNET, mysslport = PORT_TELNET_SSL; |
661 |
-+ char *buf; |
662 |
- |
663 |
- hydra_register_socket(sp); |
664 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
665 |
---- a/hydra-vmauthd.c |
666 |
-+++ b/hydra-vmauthd.c |
667 |
-@@ -8,11 +8,11 @@ |
668 |
- |
669 |
- extern char *HYDRA_EXIT; |
670 |
- |
671 |
--char *buf; |
672 |
-- |
673 |
- int32_t start_vmauthd(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { |
674 |
- char *empty = "\"\""; |
675 |
- char *login, *pass, buffer[300]; |
676 |
-+ char *buf; |
677 |
-+ |
678 |
- |
679 |
- if (strlen(login = hydra_get_next_login()) == 0) |
680 |
- login = empty; |
681 |
-@@ -68,6 +68,7 @@ int32_t start_vmauthd(int32_t s, char *ip, int32_t port, unsigned char options, |
682 |
- void service_vmauthd(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) { |
683 |
- int32_t run = 1, next_run = 1, sock = -1; |
684 |
- int32_t myport = PORT_VMAUTHD, mysslport = PORT_VMAUTHD_SSL; |
685 |
-+ char *buf; |
686 |
- |
687 |
- hydra_register_socket(sp); |
688 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
689 |
---- a/hydra-vnc.c |
690 |
-+++ b/hydra-vnc.c |
691 |
-@@ -19,7 +19,6 @@ int32_t vnc_client_version = RFB33; |
692 |
- int32_t failed_auth = 0; |
693 |
- |
694 |
- extern char *HYDRA_EXIT; |
695 |
--char *buf; |
696 |
- |
697 |
- /* |
698 |
- * Encrypt CHALLENGESIZE bytes in memory using a password. |
699 |
-@@ -48,6 +47,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char |
700 |
- char *empty = ""; |
701 |
- char *pass; |
702 |
- unsigned char buf2[CHALLENGESIZE + 4]; |
703 |
-+ char *buf; |
704 |
- |
705 |
- if (strlen(pass = hydra_get_next_password()) == 0) |
706 |
- pass = empty; |
707 |
-@@ -148,6 +148,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char |
708 |
- void service_vnc(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) { |
709 |
- int32_t run = 1, next_run = 1, sock = -1; |
710 |
- int32_t myport = PORT_VNC, mysslport = PORT_VNC_SSL; |
711 |
-+ char *buf; |
712 |
- |
713 |
- hydra_register_socket(sp); |
714 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
715 |
|
716 |
diff --git a/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch b/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch |
717 |
deleted file mode 100644 |
718 |
index eea0c3bc3ae..00000000000 |
719 |
--- a/net-analyzer/hydra/files/hydra-9999999-fcommon-http.patch |
720 |
+++ /dev/null |
721 |
@@ -1,27 +0,0 @@ |
722 |
---- a/hydra-http.c |
723 |
-+++ b/hydra-http.c |
724 |
-@@ -12,7 +12,7 @@ char *http_buf = NULL; |
725 |
- static char end_condition[END_CONDITION_MAX_LEN]; |
726 |
- int end_condition_type=-1; |
727 |
- |
728 |
--int32_t webport, freemischttp = 0; |
729 |
-+int32_t freemischttp = 0; |
730 |
- int32_t http_auth_mechanism = AUTH_UNASSIGNED; |
731 |
- |
732 |
- 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) { |
733 |
-@@ -22,6 +22,7 @@ int32_t start_http(int32_t s, char *ip, int32_t port, unsigned char options, cha |
734 |
- char *ptr, *fooptr; |
735 |
- int32_t complete_line = 0, buffer_size; |
736 |
- char tmpreplybuf[1024] = "", *tmpreplybufptr; |
737 |
-+ int32_t webport; |
738 |
- |
739 |
- if (strlen(login = hydra_get_next_login()) == 0) |
740 |
- login = empty; |
741 |
-@@ -291,6 +292,7 @@ void service_http(char *ip, int32_t sp, unsigned char options, char *miscptr, FI |
742 |
- int32_t myport = PORT_HTTP, mysslport = PORT_HTTP_SSL; |
743 |
- char *ptr, *ptr2; |
744 |
- ptr_header_node ptr_head = NULL; |
745 |
-+ int32_t webport; |
746 |
- |
747 |
- hydra_register_socket(sp); |
748 |
- if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) |
749 |
|
750 |
diff --git a/net-analyzer/hydra/hydra-9.0-r1.ebuild b/net-analyzer/hydra/hydra-9.0-r1.ebuild |
751 |
index c7b1e8aa733..402929ea230 100644 |
752 |
--- a/net-analyzer/hydra/hydra-9.0-r1.ebuild |
753 |
+++ b/net-analyzer/hydra/hydra-9.0-r1.ebuild |
754 |
@@ -2,7 +2,7 @@ |
755 |
# Distributed under the terms of the GNU General Public License v2 |
756 |
|
757 |
EAPI=7 |
758 |
-inherit toolchain-funcs |
759 |
+inherit flag-o-matic toolchain-funcs |
760 |
|
761 |
DESCRIPTION="Parallelized network login hacker" |
762 |
HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra" |
763 |
@@ -46,10 +46,6 @@ DEPEND=" |
764 |
virtual/pkgconfig |
765 |
" |
766 |
PATCHES=( |
767 |
- "${FILESDIR}"/${PN}-9.0-fcommon-gtk.patch |
768 |
- "${FILESDIR}"/${PN}-9.0-fcommon-http.patch |
769 |
- "${FILESDIR}"/${PN}-9.0-fcommon-mod.patch |
770 |
- "${FILESDIR}"/${PN}-9.0-fcommon-mods.patch |
771 |
"${FILESDIR}"/${PN}-9.0-unneeded-buf.patch |
772 |
"${FILESDIR}"/${PN}-9.0-vnc.patch |
773 |
) |
774 |
@@ -74,6 +70,8 @@ src_configure() { |
775 |
# Note: the top level configure script is not autoconf-based |
776 |
tc-export CC PKG_CONFIG |
777 |
|
778 |
+ append-cflags -fcommon |
779 |
+ |
780 |
export OPTS="${CFLAGS}" |
781 |
|
782 |
hydra_sed() { |
783 |
|
784 |
diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild |
785 |
index 858c7af0135..3ff5496cc9b 100644 |
786 |
--- a/net-analyzer/hydra/hydra-9999999.ebuild |
787 |
+++ b/net-analyzer/hydra/hydra-9999999.ebuild |
788 |
@@ -2,7 +2,7 @@ |
789 |
# Distributed under the terms of the GNU General Public License v2 |
790 |
|
791 |
EAPI=7 |
792 |
-inherit git-r3 toolchain-funcs |
793 |
+inherit flag-o-matic git-r3 toolchain-funcs |
794 |
|
795 |
DESCRIPTION="Parallelized network login hacker" |
796 |
HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra" |
797 |
@@ -45,12 +45,6 @@ DEPEND=" |
798 |
${RDEPEND} |
799 |
virtual/pkgconfig |
800 |
" |
801 |
-PATCHES=( |
802 |
- "${FILESDIR}"/${PN}-9.0-fcommon-gtk.patch |
803 |
- "${FILESDIR}"/${PN}-9.0-fcommon-mod.patch |
804 |
- "${FILESDIR}"/${PN}-9.0-fcommon-mods.patch |
805 |
- "${FILESDIR}"/${PN}-9999999-fcommon-http.patch |
806 |
-) |
807 |
|
808 |
src_prepare() { |
809 |
default |
810 |
@@ -70,6 +64,7 @@ src_prepare() { |
811 |
src_configure() { |
812 |
# Note: the top level configure script is not autoconf-based |
813 |
tc-export CC PKG_CONFIG |
814 |
+ append-cflags -fcommon |
815 |
|
816 |
export OPTS="${CFLAGS}" |