summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch')
-rw-r--r--net-analyzer/hydra/files/hydra-9.0-fcommon-gtk.patch79
1 files changed, 79 insertions, 0 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 000000000000..02ebab64e413
--- /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;