Lines 1-84
Link Here
|
1 |
--- hydra-gtk/src/callbacks.c.realorig Tue Jun 8 00:33:18 2004 |
|
|
2 |
+++ hydra-gtk/src/callbacks.c Sat May 21 14:20:53 2005 |
3 |
@@ -69,21 +69,6 @@ |
4 |
|
5 |
options[0] = HYDRA_BIN; |
6 |
|
7 |
- /* get the target, or target list */ |
8 |
- widget = lookup_widget(GTK_WIDGET(wndMain), "radioTarget1"); |
9 |
- if ( gtk_toggle_button_get_active((GtkToggleButton *) widget) ){ |
10 |
- widget = lookup_widget(GTK_WIDGET(wndMain), "entTarget"); |
11 |
- options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget); |
12 |
- } else { |
13 |
- options[i++] = "-M"; |
14 |
- widget = lookup_widget(GTK_WIDGET(wndMain), "entTargetFile"); |
15 |
- options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget); |
16 |
- } |
17 |
- |
18 |
- /* get the service */ |
19 |
- widget = lookup_widget(GTK_WIDGET(wndMain), "entProtocol"); |
20 |
- options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget); |
21 |
- |
22 |
/* get the port */ |
23 |
widget = lookup_widget(GTK_WIDGET(wndMain), "spnPort"); |
24 |
j = gtk_spin_button_get_value_as_int((GtkSpinButton *) widget); |
25 |
@@ -307,6 +292,21 @@ |
26 |
} |
27 |
} |
28 |
|
29 |
+ /* get the target, or target list */ |
30 |
+ widget = lookup_widget(GTK_WIDGET(wndMain), "radioTarget1"); |
31 |
+ if ( gtk_toggle_button_get_active((GtkToggleButton *) widget) ){ |
32 |
+ widget = lookup_widget(GTK_WIDGET(wndMain), "entTarget"); |
33 |
+ options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget); |
34 |
+ } else { |
35 |
+ options[i++] = "-M"; |
36 |
+ widget = lookup_widget(GTK_WIDGET(wndMain), "entTargetFile"); |
37 |
+ options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget); |
38 |
+ } |
39 |
+ |
40 |
+ /* get the service */ |
41 |
+ widget = lookup_widget(GTK_WIDGET(wndMain), "entProtocol"); |
42 |
+ options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget); |
43 |
+ |
44 |
options[i] = NULL; |
45 |
return i; |
46 |
} |
47 |
@@ -472,8 +472,8 @@ |
48 |
int *popen_re_unbuffered(char *command) { |
49 |
static int p_r[2] = {-1, -1}, p_e[2] = {-1, -1}; |
50 |
static int *pfd = NULL; |
51 |
- hydra_pid = 0; |
52 |
char *options[128]; |
53 |
+ hydra_pid = 0; |
54 |
|
55 |
update_statusbar(); |
56 |
|
57 |
@@ -494,6 +494,7 @@ |
58 |
g_warning("popen_rw_unbuffered: Error forking!"); |
59 |
return NULL; |
60 |
} else if (hydra_pid == 0) { /* child */ |
61 |
+ int k; |
62 |
if (setpgid(getpid(), getpid()) < 0) |
63 |
g_warning("popen_rw_unbuffered: setpgid() failed"); |
64 |
if (close(p_r[0]) < 0) |
65 |
@@ -517,7 +518,6 @@ |
66 |
execv(HYDRA_BIN, options); |
67 |
|
68 |
g_warning("%s %i: popen_rw_unbuffered: execv() returned", __FILE__, __LINE__); |
69 |
- int k; |
70 |
for ( k = 0; options[k] != NULL; k++ ){ |
71 |
g_warning(options[k]); |
72 |
} |
73 |
@@ -669,8 +669,9 @@ |
74 |
on_chkColon_toggled (GtkToggleButton *togglebutton, |
75 |
gpointer user_data) |
76 |
{ |
77 |
- GtkWidget *user = lookup_widget(GTK_WIDGET(wndMain), "frmUsername");; |
78 |
- GtkWidget *pass = lookup_widget(GTK_WIDGET(wndMain), "frmPass"); |
79 |
+ GtkWidget *user, *pass; |
80 |
+ user = lookup_widget(GTK_WIDGET(wndMain), "frmUsername");; |
81 |
+ pass = lookup_widget(GTK_WIDGET(wndMain), "frmPass"); |
82 |
|
83 |
if (gtk_toggle_button_get_active(togglebutton)){ |
84 |
gtk_widget_set_sensitive(user, FALSE); |