mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-21 13:53:59 -07:00
code indent
This commit is contained in:
parent
531ee7734b
commit
720bdb3f96
83 changed files with 6377 additions and 6240 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
/*
|
||||
* This file handles all that needs to be done...
|
||||
* Some stuff is stolen from gcombust since I never used pipes... ok, i
|
||||
* Some stuff is stolen from gcombust since I never used pipes... ok, i
|
||||
* only used them in reallife :)
|
||||
*/
|
||||
|
||||
|
@ -15,18 +15,17 @@
|
|||
#include "interface.h"
|
||||
#include "support.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int hydra_pid = 0;
|
||||
|
||||
|
@ -37,16 +36,14 @@ char smbparm[128];
|
|||
char sapr3id[4];
|
||||
char passLoginNull[4];
|
||||
|
||||
|
||||
#define BUF_S 1024
|
||||
|
||||
void hydra_select_file(GtkEntry * widget, char *text) {
|
||||
void hydra_select_file(GtkEntry *widget, char *text) {
|
||||
#ifdef GTK_TYPE_FILE_CHOOSER
|
||||
GtkWidget *dialog;
|
||||
char *filename;
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new(text, (GtkWindow *) wndMain, GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
|
||||
dialog = gtk_file_chooser_dialog_new(text, (GtkWindow *)wndMain, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
|
||||
|
||||
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
|
||||
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
||||
|
@ -70,7 +67,7 @@ int hydra_get_options(char *options[]) {
|
|||
|
||||
/* get the port */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "spnPort");
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *) widget);
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *)widget);
|
||||
if (j != 0) {
|
||||
snprintf(port, 10, "%d", j);
|
||||
options[i++] = "-s";
|
||||
|
@ -79,107 +76,107 @@ int hydra_get_options(char *options[]) {
|
|||
|
||||
/* prefer ipv6 */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkIPV6");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-6";
|
||||
}
|
||||
|
||||
/* use SSL? */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkSSL");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-S";
|
||||
}
|
||||
|
||||
/* use old SSL? */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkOldSSL");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-O";
|
||||
}
|
||||
|
||||
/* be verbose? */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkVerbose");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-v";
|
||||
}
|
||||
|
||||
/* show attempts */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkAttempts");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-V";
|
||||
}
|
||||
|
||||
/* debug mode? */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkDebug");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-d";
|
||||
}
|
||||
|
||||
/* COMPLETE HELP */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkCompleteHelp");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-h";
|
||||
}
|
||||
|
||||
/* Service Module Usage Details */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkServiceDetails");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-U";
|
||||
}
|
||||
|
||||
/* use colon separated list? */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkColon");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-C";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entColonFile");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else {
|
||||
/* disable usernames */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkDisUser");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
} else {
|
||||
/* get the username, or username list */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "radioUsername1");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-l";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entUsername");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
} else {
|
||||
options[i++] = "-L";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entUsernameFile");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
}
|
||||
}
|
||||
|
||||
/* get the pass, pass list, or generate */
|
||||
/* The "generate" button was implemented by Petar Kaleychev <petar.kaleychev@gmail.com> */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "radioPass1");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-p";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entPass");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
}
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "radioPass2");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-P";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entPassFile");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
}
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "radioGenerate");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-x";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entGeneration");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
}
|
||||
}
|
||||
|
||||
/* empty passes / login as pass / reversed login? */
|
||||
memset(passLoginNull, 0, 4);
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkPassNull");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
passLoginNull[0] = 'n';
|
||||
}
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkPassLogin");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
if (passLoginNull[0] == 0) {
|
||||
passLoginNull[0] = 's';
|
||||
} else {
|
||||
|
@ -188,7 +185,7 @@ int hydra_get_options(char *options[]) {
|
|||
}
|
||||
/* The "Try reversed login" button was implemented by Petar Kaleychev <petar.kaleychev@gmail.com> */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkPassReverse");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
if (passLoginNull[0] == 0) {
|
||||
passLoginNull[0] = 'r';
|
||||
} else if (passLoginNull[1] == 0) {
|
||||
|
@ -204,7 +201,7 @@ int hydra_get_options(char *options[]) {
|
|||
|
||||
/* #of tasks */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "spnTasks");
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *) widget);
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *)widget);
|
||||
if (j != 40) {
|
||||
snprintf(tasks, 10, "%d", j);
|
||||
options[i++] = "-t";
|
||||
|
@ -213,7 +210,7 @@ int hydra_get_options(char *options[]) {
|
|||
|
||||
/* timeout */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "spnTimeout");
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *) widget);
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *)widget);
|
||||
if (j != 30) {
|
||||
snprintf(timeout, 10, "%d", j);
|
||||
options[i++] = "-w";
|
||||
|
@ -222,56 +219,56 @@ int hydra_get_options(char *options[]) {
|
|||
|
||||
/* loop around users? */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkUsernameLoop");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-u";
|
||||
}
|
||||
|
||||
/* exit after first found pair? */
|
||||
/* per host */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkExitf");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-f";
|
||||
}
|
||||
/* global */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkExitF");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-F";
|
||||
}
|
||||
|
||||
/* Do not print messages about connection errors */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkNoErr");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
options[i++] = "-q";
|
||||
}
|
||||
|
||||
/* get additional parameters */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entProtocol");
|
||||
tmp = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
tmp = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
if (!strncmp(tmp, "http-proxy", 10)) {
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entHTTPProxyURL");
|
||||
options[i++] = "-m";
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else if (!strncmp(tmp, "http-", 5) || !strncmp(tmp, "https-", 6)) {
|
||||
options[i++] = "-m";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entHTTPURL");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else if (!strcmp(tmp, "cisco-enable")) {
|
||||
options[i++] = "-m";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entCiscoPass");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else if (!strcmp(tmp, "ldap3-crammd5")) {
|
||||
options[i++] = "-m";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entLDAPDN");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else if (!strcmp(tmp, "ldap3-digestmd5")) {
|
||||
options[i++] = "-m";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entLDAPDN");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else if (!strcmp(tmp, "smb")) {
|
||||
memset(smbparm, 0, sizeof(smbparm));
|
||||
|
@ -282,12 +279,12 @@ int hydra_get_options(char *options[]) {
|
|||
strncpy(smbparm, "Both", sizeof(smbparm));
|
||||
smbparm[strlen("Both")] = '\0';
|
||||
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
strncpy(smbparm, "Domain", sizeof(smbparm));
|
||||
smbparm[strlen("Domain")] = '\0';
|
||||
}
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget2)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget2)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
strncpy(smbparm, "Both", sizeof(smbparm));
|
||||
smbparm[strlen("Both")] = '\0';
|
||||
} else {
|
||||
|
@ -296,7 +293,7 @@ int hydra_get_options(char *options[]) {
|
|||
}
|
||||
}
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkNTLM");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
strcat(smbparm, "Hash");
|
||||
}
|
||||
options[i++] = smbparm;
|
||||
|
@ -307,18 +304,14 @@ int hydra_get_options(char *options[]) {
|
|||
options[i++] = smbparm;
|
||||
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkNTLM");
|
||||
int pth = gtk_toggle_button_get_active((GtkToggleButton *) widget);
|
||||
int pth = gtk_toggle_button_get_active((GtkToggleButton *)widget);
|
||||
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entSMB2Workgroup");
|
||||
|
||||
snprintf(smbparm,
|
||||
sizeof(smbparm)-1,
|
||||
"nthash:%s workgroup:{%s}",
|
||||
pth ? "true" : "false",
|
||||
(char *) gtk_entry_get_text((GtkEntry *) widget));
|
||||
snprintf(smbparm, sizeof(smbparm) - 1, "nthash:%s workgroup:{%s}", pth ? "true" : "false", (char *)gtk_entry_get_text((GtkEntry *)widget));
|
||||
} else if (!strcmp(tmp, "sapr3")) {
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "spnSAPR3");
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *) widget);
|
||||
j = gtk_spin_button_get_value_as_int((GtkSpinButton *)widget);
|
||||
snprintf(sapr3id, sizeof(sapr3id), "%d", j);
|
||||
options[i++] = "-m";
|
||||
options[i++] = sapr3id;
|
||||
|
@ -326,18 +319,18 @@ int hydra_get_options(char *options[]) {
|
|||
} else if (!strcmp(tmp, "cvs") || !strcmp(tmp, "svn")) {
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entCVS");
|
||||
options[i++] = "-m";
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else if (!strcmp(tmp, "snmp")) {
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entSNMP");
|
||||
options[i++] = "-m";
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
} else if (!strcmp(tmp, "telnet")) {
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entTelnet");
|
||||
if ((char *) gtk_entry_get_text((GtkEntry *) widget) != NULL) {
|
||||
if ((char *)gtk_entry_get_text((GtkEntry *)widget) != NULL) {
|
||||
options[i++] = "-m";
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,45 +342,44 @@ int hydra_get_options(char *options[]) {
|
|||
/* proxy support */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "radioProxy");
|
||||
|
||||
if (!gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
|
||||
if (!gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
widget2 = lookup_widget(GTK_WIDGET(wndMain), "entHTTPProxy");
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "radioProxy2");
|
||||
|
||||
/* which variable do we set? */
|
||||
if ((!strncmp(tmp, "http-", 5)) && (gtk_toggle_button_get_active((GtkToggleButton *) widget))) {
|
||||
setenv("HYDRA_PROXY_HTTP", gtk_entry_get_text((GtkEntry *) widget2), 1);
|
||||
if ((!strncmp(tmp, "http-", 5)) && (gtk_toggle_button_get_active((GtkToggleButton *)widget))) {
|
||||
setenv("HYDRA_PROXY_HTTP", gtk_entry_get_text((GtkEntry *)widget2), 1);
|
||||
} else {
|
||||
setenv("HYDRA_PROXY_CONNECT", (char *) gtk_entry_get_text((GtkEntry *) widget2), 1);
|
||||
setenv("HYDRA_PROXY_CONNECT", (char *)gtk_entry_get_text((GtkEntry *)widget2), 1);
|
||||
}
|
||||
|
||||
/* do we need to provide user and pass? */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "chkProxyAuth");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entProxyUser");
|
||||
widget2 = lookup_widget(GTK_WIDGET(wndMain), "entProxyPass");
|
||||
a = g_string_new((gchar *) gtk_entry_get_text((GtkEntry *) widget));
|
||||
a = g_string_new((gchar *)gtk_entry_get_text((GtkEntry *)widget));
|
||||
a = g_string_append_c(a, ':');
|
||||
a = g_string_append(a, gtk_entry_get_text((GtkEntry *) widget2));
|
||||
a = g_string_append(a, gtk_entry_get_text((GtkEntry *)widget2));
|
||||
setenv("HYDRA_PROXY_AUTH", a->str, 1);
|
||||
(void) g_string_free(a, TRUE);
|
||||
(void)g_string_free(a, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
/* get the target, or target list */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "radioTarget1");
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *) widget)) {
|
||||
if (gtk_toggle_button_get_active((GtkToggleButton *)widget)) {
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entTarget");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
} else {
|
||||
options[i++] = "-M";
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entTargetFile");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
}
|
||||
|
||||
/* get the service */
|
||||
widget = lookup_widget(GTK_WIDGET(wndMain), "entProtocol");
|
||||
options[i++] = (char *) gtk_entry_get_text((GtkEntry *) widget);
|
||||
options[i++] = (char *)gtk_entry_get_text((GtkEntry *)widget);
|
||||
|
||||
options[i] = NULL;
|
||||
return i;
|
||||
|
@ -404,12 +396,11 @@ int update_statusbar() {
|
|||
i = hydra_get_options(options);
|
||||
|
||||
for (j = 1; j < i; j++) {
|
||||
|
||||
statustext = g_string_append(statustext, options[j]);
|
||||
statustext = g_string_append_c(statustext, ' ');
|
||||
}
|
||||
|
||||
statusbar = (GtkStatusbar *) lookup_widget(GTK_WIDGET(wndMain), "statusbar");
|
||||
statusbar = (GtkStatusbar *)lookup_widget(GTK_WIDGET(wndMain), "statusbar");
|
||||
context_id = gtk_statusbar_get_context_id(statusbar, "status");
|
||||
|
||||
/* an old message in stack? */
|
||||
|
@ -417,9 +408,9 @@ int update_statusbar() {
|
|||
gtk_statusbar_remove(statusbar, context_id, message_id);
|
||||
}
|
||||
|
||||
message_id = gtk_statusbar_push(statusbar, context_id, (gchar *) statustext->str);
|
||||
message_id = gtk_statusbar_push(statusbar, context_id, (gchar *)statustext->str);
|
||||
|
||||
(void) g_string_free(statustext, TRUE);
|
||||
(void)g_string_free(statustext, TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -443,11 +434,10 @@ int read_into(int fd) {
|
|||
}
|
||||
|
||||
output = lookup_widget(GTK_WIDGET(wndMain), "txtOutput");
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *) output);
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *)output);
|
||||
|
||||
gtk_text_buffer_get_iter_at_offset(outputbuf, &outputiter, -1);
|
||||
|
||||
|
||||
if ((passline = strstr(in_buf, "password: ")) == NULL) {
|
||||
gtk_text_buffer_insert(outputbuf, &outputiter, in_buf, result);
|
||||
} else {
|
||||
|
@ -465,15 +455,13 @@ int read_into(int fd) {
|
|||
if (end - in_buf - result > 0) {
|
||||
gtk_text_buffer_insert(outputbuf, &outputiter, end + 1, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (strstr(in_buf, " finished at ") != NULL) {
|
||||
gtk_text_buffer_insert_with_tags_by_name(outputbuf, &outputiter, "<finished>\n\n", -1, "bold", NULL);
|
||||
}
|
||||
|
||||
if (result == BUF_S - 1) /* there might be more available, recurse baby! */
|
||||
if (result == BUF_S - 1) /* there might be more available, recurse baby! */
|
||||
return read_into(fd);
|
||||
else
|
||||
return TRUE;
|
||||
|
@ -530,7 +518,6 @@ static int wait_hydra_output(gpointer data) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* assumes a successfull pipe() won't set the fd's to -1 */
|
||||
static void close_pipe(int *pipe) {
|
||||
if (-1 != pipe[0]) {
|
||||
|
@ -550,8 +537,7 @@ static void close_pipe(int *pipe) {
|
|||
*/
|
||||
|
||||
int *popen_re_unbuffered(char *command) {
|
||||
static int p_r[2] = { -1, -1 }, p_e[2] = {
|
||||
-1, -1};
|
||||
static int p_r[2] = {-1, -1}, p_e[2] = {-1, -1};
|
||||
static int *pfd = NULL;
|
||||
|
||||
char *options[128];
|
||||
|
@ -576,7 +562,7 @@ int *popen_re_unbuffered(char *command) {
|
|||
if ((hydra_pid = fork()) < 0) {
|
||||
g_warning("popen_rw_unbuffered: Error forking!");
|
||||
return NULL;
|
||||
} else if (hydra_pid == 0) { /* child */
|
||||
} else if (hydra_pid == 0) { /* child */
|
||||
int k;
|
||||
|
||||
if (setpgid(getpid(), getpid()) < 0)
|
||||
|
@ -597,7 +583,7 @@ int *popen_re_unbuffered(char *command) {
|
|||
if (close(p_e[1]) < 0)
|
||||
g_warning("popen_rw_unbuffered: close(p_e[1]) failed");
|
||||
|
||||
(void) hydra_get_options(options);
|
||||
(void)hydra_get_options(options);
|
||||
|
||||
execv(HYDRA_BIN, options);
|
||||
|
||||
|
@ -607,7 +593,7 @@ int *popen_re_unbuffered(char *command) {
|
|||
g_warning("%s", options[k]);
|
||||
}
|
||||
gtk_main_quit();
|
||||
} else { /* parent */
|
||||
} else { /* parent */
|
||||
if (close(p_r[1]) < 0)
|
||||
g_warning("popen_rw_unbuffered: close(p_r[1]) (parent) failed");
|
||||
if (close(p_e[1]) < 0)
|
||||
|
@ -620,32 +606,25 @@ int *popen_re_unbuffered(char *command) {
|
|||
return pfd;
|
||||
}
|
||||
|
||||
void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
void on_quit1_activate(GtkMenuItem *menuitem, gpointer user_data) { gtk_main_quit(); }
|
||||
|
||||
void on_about1_activate(GtkMenuItem *menuitem, gpointer user_data) {}
|
||||
|
||||
void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data) {
|
||||
|
||||
}
|
||||
|
||||
void on_btnStart_clicked(GtkButton * button, gpointer user_data) {
|
||||
void on_btnStart_clicked(GtkButton *button, gpointer user_data) {
|
||||
int *fd = NULL;
|
||||
|
||||
fd = popen_re_unbuffered(NULL);
|
||||
g_timeout_add(200, wait_hydra_output, fd);
|
||||
|
||||
}
|
||||
|
||||
void on_btnStop_clicked(GtkButton * button, gpointer user_data) {
|
||||
void on_btnStop_clicked(GtkButton *button, gpointer user_data) {
|
||||
if (hydra_pid != 0) {
|
||||
kill(hydra_pid, SIGTERM);
|
||||
hydra_pid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void on_wndMain_destroy(GtkObject * object, gpointer user_data) {
|
||||
void on_wndMain_destroy(GtkObject *object, gpointer user_data) {
|
||||
if (hydra_pid != 0) {
|
||||
kill(hydra_pid, SIGTERM);
|
||||
hydra_pid = 0;
|
||||
|
@ -653,35 +632,31 @@ void on_wndMain_destroy(GtkObject * object, gpointer user_data) {
|
|||
gtk_main_quit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
gboolean on_entTargetFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *) widget, "Select target list");
|
||||
gboolean on_entTargetFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *)widget, "Select target list");
|
||||
gtk_widget_grab_focus(widget);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
gboolean on_entUsernameFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *) widget, "Select username list");
|
||||
gboolean on_entUsernameFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *)widget, "Select username list");
|
||||
gtk_widget_grab_focus(widget);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
gboolean on_entPassFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *) widget, "Select password list");
|
||||
gboolean on_entPassFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *)widget, "Select password list");
|
||||
gtk_widget_grab_focus(widget);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean on_entColonFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *) widget, "Select colon separated user,password list");
|
||||
gboolean on_entColonFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data) {
|
||||
hydra_select_file((GtkEntry *)widget, "Select colon separated user,password list");
|
||||
gtk_widget_grab_focus(widget);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void on_btnSave_clicked(GtkButton * button, gpointer user_data) {
|
||||
void on_btnSave_clicked(GtkButton *button, gpointer user_data) {
|
||||
#ifdef GTK_TYPE_FILE_CHOOSER
|
||||
GtkWidget *dialog;
|
||||
char *filename;
|
||||
|
@ -692,13 +667,12 @@ void on_btnSave_clicked(GtkButton * button, gpointer user_data) {
|
|||
GtkTextIter start;
|
||||
GtkTextIter end;
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new("Save output", (GtkWindow *) wndMain, GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
|
||||
dialog = gtk_file_chooser_dialog_new("Save output", (GtkWindow *)wndMain, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
|
||||
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
|
||||
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
||||
|
||||
output = lookup_widget(GTK_WIDGET(wndMain), "txtOutput");
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *) output);
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *)output);
|
||||
gtk_text_buffer_get_start_iter(outputbuf, &start);
|
||||
gtk_text_buffer_get_end_iter(outputbuf, &end);
|
||||
|
||||
|
@ -716,10 +690,11 @@ void on_btnSave_clicked(GtkButton * button, gpointer user_data) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void on_chkColon_toggled(GtkToggleButton * togglebutton, gpointer user_data) {
|
||||
void on_chkColon_toggled(GtkToggleButton *togglebutton, gpointer user_data) {
|
||||
GtkWidget *user, *pass;
|
||||
|
||||
user = lookup_widget(GTK_WIDGET(wndMain), "frmUsername");;
|
||||
user = lookup_widget(GTK_WIDGET(wndMain), "frmUsername");
|
||||
;
|
||||
pass = lookup_widget(GTK_WIDGET(wndMain), "frmPass");
|
||||
|
||||
if (gtk_toggle_button_get_active(togglebutton)) {
|
||||
|
@ -731,10 +706,11 @@ void on_chkColon_toggled(GtkToggleButton * togglebutton, gpointer user_data) {
|
|||
}
|
||||
}
|
||||
|
||||
void on_chkDisUser_toggled(GtkToggleButton * togglebutton, gpointer user_data) {
|
||||
void on_chkDisUser_toggled(GtkToggleButton *togglebutton, gpointer user_data) {
|
||||
GtkWidget *radioUsername1, *radioUsername2, *entUsername, *entUsernameFile;
|
||||
|
||||
radioUsername1 = lookup_widget(GTK_WIDGET(wndMain), "radioUsername1");;
|
||||
radioUsername1 = lookup_widget(GTK_WIDGET(wndMain), "radioUsername1");
|
||||
;
|
||||
radioUsername2 = lookup_widget(GTK_WIDGET(wndMain), "radioUsername2");
|
||||
entUsername = lookup_widget(GTK_WIDGET(wndMain), "entUsername");
|
||||
entUsernameFile = lookup_widget(GTK_WIDGET(wndMain), "entUsernameFile");
|
||||
|
@ -752,11 +728,11 @@ void on_chkDisUser_toggled(GtkToggleButton * togglebutton, gpointer user_data) {
|
|||
}
|
||||
}
|
||||
|
||||
void on_btnClear_clicked(GtkButton * button, gpointer user_data) {
|
||||
void on_btnClear_clicked(GtkButton *button, gpointer user_data) {
|
||||
GtkWidget *output;
|
||||
GtkTextBuffer *outputbuf;
|
||||
|
||||
output = lookup_widget(GTK_WIDGET(wndMain), "txtOutput");
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *) output);
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *)output);
|
||||
gtk_text_buffer_set_text(outputbuf, "", -1);
|
||||
}
|
||||
|
|
|
@ -2,28 +2,28 @@
|
|||
|
||||
int update_statusbar();
|
||||
|
||||
void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data);
|
||||
void on_quit1_activate(GtkMenuItem *menuitem, gpointer user_data);
|
||||
|
||||
void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data);
|
||||
void on_about1_activate(GtkMenuItem *menuitem, gpointer user_data);
|
||||
|
||||
void on_btnStart_clicked(GtkButton * button, gpointer user_data);
|
||||
void on_btnStart_clicked(GtkButton *button, gpointer user_data);
|
||||
|
||||
void on_wndMain_destroy(GtkObject * object, gpointer user_data);
|
||||
void on_wndMain_destroy(GtkObject *object, gpointer user_data);
|
||||
|
||||
void on_btnStop_clicked(GtkButton * button, gpointer user_data);
|
||||
void on_btnStop_clicked(GtkButton *button, gpointer user_data);
|
||||
|
||||
gboolean on_entTargetFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data);
|
||||
gboolean on_entTargetFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
|
||||
|
||||
gboolean on_entUsernameFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data);
|
||||
gboolean on_entUsernameFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
|
||||
|
||||
gboolean on_entPassFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data);
|
||||
gboolean on_entPassFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
|
||||
|
||||
void on_btnSave_clicked(GtkButton * button, gpointer user_data);
|
||||
void on_btnSave_clicked(GtkButton *button, gpointer user_data);
|
||||
|
||||
gboolean on_entColonFile_button_press_event(GtkWidget * widget, GdkEventButton * event, gpointer user_data);
|
||||
gboolean on_entColonFile_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
|
||||
|
||||
void on_chkColon_toggled(GtkToggleButton * togglebutton, gpointer user_data);
|
||||
void on_chkColon_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
||||
|
||||
void on_btnClear_clicked(GtkButton * button, gpointer user_data);
|
||||
void on_btnClear_clicked(GtkButton *button, gpointer user_data);
|
||||
|
||||
void on_chkDisUser_toggled(GtkToggleButton * togglebutton, gpointer user_data);
|
||||
void on_chkDisUser_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@ -22,12 +22,9 @@
|
|||
#include "interface.h"
|
||||
#include "support.h"
|
||||
|
||||
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
|
||||
g_object_set_data_full (G_OBJECT (component), name, \
|
||||
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
|
||||
#define GLADE_HOOKUP_OBJECT(component, widget, name) g_object_set_data_full(G_OBJECT(component), name, gtk_widget_ref(widget), (GDestroyNotify)gtk_widget_unref)
|
||||
|
||||
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
|
||||
g_object_set_data (G_OBJECT (component), name, widget)
|
||||
#define GLADE_HOOKUP_OBJECT_NO_REF(component, widget, name) g_object_set_data(G_OBJECT(component), name, widget)
|
||||
|
||||
GtkWidget *create_wndMain(void) {
|
||||
GtkWidget *wndMain;
|
||||
|
@ -224,7 +221,7 @@ GtkWidget *create_wndMain(void) {
|
|||
g_object_set_data(G_OBJECT(GTK_COMBO(cmbProtocol)->popwin), "GladeParentKey", cmbProtocol);
|
||||
gtk_widget_set_name(cmbProtocol, "cmbProtocol");
|
||||
gtk_widget_show(cmbProtocol);
|
||||
gtk_table_attach(GTK_TABLE(table8), cmbProtocol, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), cmbProtocol, 1, 2, 4, 5, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
cmbProtocol_items = g_list_append(cmbProtocol_items, (gpointer) "adam6500");
|
||||
cmbProtocol_items = g_list_append(cmbProtocol_items, (gpointer) "afp");
|
||||
cmbProtocol_items = g_list_append(cmbProtocol_items, (gpointer) "asterisk");
|
||||
|
@ -299,53 +296,52 @@ GtkWidget *create_wndMain(void) {
|
|||
label7 = gtk_label_new("Protocol");
|
||||
gtk_widget_set_name(label7, "label7");
|
||||
gtk_widget_show(label7);
|
||||
gtk_table_attach(GTK_TABLE(table8), label7, 0, 1, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), label7, 0, 1, 4, 5, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label7), 0, 0.5);
|
||||
|
||||
spnPort_adj = gtk_adjustment_new(0, 0, 65535, 1, 10, 0);
|
||||
spnPort = gtk_spin_button_new(GTK_ADJUSTMENT(spnPort_adj), 1, 0);
|
||||
gtk_widget_set_name(spnPort, "spnPort");
|
||||
gtk_widget_show(spnPort);
|
||||
gtk_table_attach(GTK_TABLE(table8), spnPort, 1, 2, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), spnPort, 1, 2, 3, 4, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, spnPort, "select the port on which the daemon you want to brute force runs, 0 means default", NULL);
|
||||
|
||||
label6 = gtk_label_new("Port");
|
||||
gtk_widget_set_name(label6, "label6");
|
||||
gtk_widget_show(label6);
|
||||
gtk_table_attach(GTK_TABLE(table8), label6, 0, 1, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), label6, 0, 1, 3, 4, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5);
|
||||
|
||||
|
||||
chkIPV6 = gtk_check_button_new_with_mnemonic("Prefer IPV6");
|
||||
gtk_widget_set_name(chkIPV6, "chkIPV6");
|
||||
gtk_widget_show(chkIPV6);
|
||||
gtk_table_attach(GTK_TABLE(table8), chkIPV6, 0, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), chkIPV6, 0, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkIPV6, "Enable to use IPV6", NULL);
|
||||
|
||||
radioTarget2 = gtk_radio_button_new_with_mnemonic(NULL, "Target List");
|
||||
gtk_widget_set_name(radioTarget2, "radioTarget2");
|
||||
gtk_widget_show(radioTarget2);
|
||||
gtk_table_attach(GTK_TABLE(table8), radioTarget2, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), radioTarget2, 0, 1, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_radio_button_set_group(GTK_RADIO_BUTTON(radioTarget2), radioTarget2_group);
|
||||
radioTarget2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radioTarget2));
|
||||
|
||||
entTargetFile = gtk_entry_new();
|
||||
gtk_widget_set_name(entTargetFile, "entTargetFile");
|
||||
gtk_widget_show(entTargetFile);
|
||||
gtk_table_attach(GTK_TABLE(table8), entTargetFile, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), entTargetFile, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entTargetFile, "A file which contains the targets to attack. One entry per line. IP\naddresses and/or DNS names.", NULL);
|
||||
|
||||
entTarget = gtk_entry_new();
|
||||
gtk_widget_set_name(entTarget, "entTarget");
|
||||
gtk_widget_show(entTarget);
|
||||
gtk_table_attach(GTK_TABLE(table8), entTarget, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), entTarget, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entTarget, "The target to attack - DNS name or IP address", NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entTarget), "127.0.0.1");
|
||||
|
||||
radioTarget1 = gtk_radio_button_new_with_mnemonic(NULL, "Single Target");
|
||||
gtk_widget_set_name(radioTarget1, "radioTarget1");
|
||||
gtk_widget_show(radioTarget1);
|
||||
gtk_table_attach(GTK_TABLE(table8), radioTarget1, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table8), radioTarget1, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_radio_button_set_group(GTK_RADIO_BUTTON(radioTarget1), radioTarget2_group);
|
||||
radioTarget2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radioTarget1));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radioTarget1), TRUE);
|
||||
|
@ -368,50 +364,44 @@ GtkWidget *create_wndMain(void) {
|
|||
chkVerbose = gtk_check_button_new_with_mnemonic("Be Verbose");
|
||||
gtk_widget_set_name(chkVerbose, "chkVerbose");
|
||||
gtk_widget_show(chkVerbose);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkVerbose, 2, 3, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkVerbose, 2, 3, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkVerbose, "be verbose", NULL);
|
||||
|
||||
chkDebug = gtk_check_button_new_with_mnemonic("Debug");
|
||||
gtk_widget_set_name(chkDebug, "chkDebug");
|
||||
gtk_widget_show(chkDebug);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkDebug, 2, 3, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkDebug, 2, 3, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkDebug, "Enable debug mode", NULL);
|
||||
|
||||
chkAttempts = gtk_check_button_new_with_mnemonic("Show Attempts");
|
||||
gtk_widget_set_name(chkAttempts, "chkAttempts");
|
||||
gtk_widget_show(chkAttempts);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkAttempts, 0, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkAttempts, 0, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkAttempts, "Show attempts", NULL);
|
||||
|
||||
chkSSL = gtk_check_button_new_with_mnemonic("Use SSL");
|
||||
gtk_widget_set_name(chkSSL, "chkSSL");
|
||||
gtk_widget_show(chkSSL);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkSSL, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkSSL, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkSSL, "Enable to use SSL (the target must have SSL enabled!)", NULL);
|
||||
|
||||
chkServiceDetails = gtk_check_button_new_with_mnemonic ("Service Module Usage Details");
|
||||
gtk_widget_set_name (chkServiceDetails, "chkServiceDetails");
|
||||
gtk_widget_show (chkServiceDetails);
|
||||
gtk_table_attach (GTK_TABLE (table9), chkServiceDetails, 2, 3, 2, 3,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK),
|
||||
(GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, chkServiceDetails, "Service Module Usage Details", NULL);
|
||||
chkServiceDetails = gtk_check_button_new_with_mnemonic("Service Module Usage Details");
|
||||
gtk_widget_set_name(chkServiceDetails, "chkServiceDetails");
|
||||
gtk_widget_show(chkServiceDetails);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkServiceDetails, 2, 3, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkServiceDetails, "Service Module Usage Details", NULL);
|
||||
|
||||
chkCompleteHelp = gtk_check_button_new_with_mnemonic ("COMPLETE HELP");
|
||||
gtk_widget_set_name (chkCompleteHelp, "chkCompleteHelp");
|
||||
gtk_widget_show (chkCompleteHelp);
|
||||
gtk_table_attach (GTK_TABLE (table9), chkCompleteHelp, 0, 2, 2, 3,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK),
|
||||
(GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, chkCompleteHelp, "Complete Help", NULL);
|
||||
chkCompleteHelp = gtk_check_button_new_with_mnemonic("COMPLETE HELP");
|
||||
gtk_widget_set_name(chkCompleteHelp, "chkCompleteHelp");
|
||||
gtk_widget_show(chkCompleteHelp);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkCompleteHelp, 0, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkCompleteHelp, "Complete Help", NULL);
|
||||
|
||||
chkOldSSL = gtk_check_button_new_with_mnemonic ("Use old SSL");
|
||||
gtk_widget_set_name (chkOldSSL, "chkOldSSL");
|
||||
gtk_widget_show (chkOldSSL);
|
||||
gtk_table_attach (GTK_TABLE (table9), chkOldSSL, 1, 2, 0, 1,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK),
|
||||
(GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, chkOldSSL, "Enable to use old SSL (the target must have SSL enabled!)", NULL);
|
||||
chkOldSSL = gtk_check_button_new_with_mnemonic("Use old SSL");
|
||||
gtk_widget_set_name(chkOldSSL, "chkOldSSL");
|
||||
gtk_widget_show(chkOldSSL);
|
||||
gtk_table_attach(GTK_TABLE(table9), chkOldSSL, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkOldSSL, "Enable to use old SSL (the target must have SSL enabled!)", NULL);
|
||||
|
||||
label29 = gtk_label_new("Output Options");
|
||||
gtk_widget_set_name(label29, "label29");
|
||||
|
@ -441,20 +431,20 @@ GtkWidget *create_wndMain(void) {
|
|||
entUsernameFile = gtk_entry_new();
|
||||
gtk_widget_set_name(entUsernameFile, "entUsernameFile");
|
||||
gtk_widget_show(entUsernameFile);
|
||||
gtk_table_attach(GTK_TABLE(table2), entUsernameFile, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table2), entUsernameFile, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entUsernameFile, "File with user logins, one entry per line", NULL);
|
||||
|
||||
entUsername = gtk_entry_new();
|
||||
gtk_widget_set_name(entUsername, "entUsername");
|
||||
gtk_widget_show(entUsername);
|
||||
gtk_table_attach(GTK_TABLE(table2), entUsername, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table2), entUsername, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entUsername, "The login to use", NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entUsername), "yourname");
|
||||
|
||||
radioUsername1 = gtk_radio_button_new_with_mnemonic(NULL, "Username");
|
||||
gtk_widget_set_name(radioUsername1, "radioUsername1");
|
||||
gtk_widget_show(radioUsername1);
|
||||
gtk_table_attach(GTK_TABLE(table2), radioUsername1, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table2), radioUsername1, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_radio_button_set_group(GTK_RADIO_BUTTON(radioUsername1), radioUsername1_group);
|
||||
radioUsername1_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radioUsername1));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radioUsername1), TRUE);
|
||||
|
@ -462,20 +452,20 @@ GtkWidget *create_wndMain(void) {
|
|||
radioUsername2 = gtk_radio_button_new_with_mnemonic(NULL, "Username List");
|
||||
gtk_widget_set_name(radioUsername2, "radioUsername2");
|
||||
gtk_widget_show(radioUsername2);
|
||||
gtk_table_attach(GTK_TABLE(table2), radioUsername2, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table2), radioUsername2, 0, 1, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_radio_button_set_group(GTK_RADIO_BUTTON(radioUsername2), radioUsername1_group);
|
||||
radioUsername1_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radioUsername2));
|
||||
|
||||
chkUsernameLoop = gtk_check_button_new_with_mnemonic("Loop around users");
|
||||
gtk_widget_set_name(chkUsernameLoop, "chkUsernameLoop");
|
||||
gtk_widget_show(chkUsernameLoop);
|
||||
gtk_table_attach(GTK_TABLE(table2), chkUsernameLoop, 0, 1, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table2), chkUsernameLoop, 0, 1, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkUsernameLoop, "Enable this option to loop around users not passwords", NULL);
|
||||
|
||||
chkDisUser = gtk_check_button_new_with_mnemonic("Protocol does not require usernames");
|
||||
gtk_widget_set_name(chkDisUser, "chkDisUser");
|
||||
gtk_widget_show(chkDisUser);
|
||||
gtk_table_attach(GTK_TABLE (table2), chkDisUser, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table2), chkDisUser, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkDisUser, "Protocols like Cisco, Cisco enable, redis, Oracle listener, SNMP, S7-300, VNC etc. are not using usernames", NULL);
|
||||
|
||||
label8 = gtk_label_new("Username");
|
||||
|
@ -488,7 +478,7 @@ GtkWidget *create_wndMain(void) {
|
|||
gtk_widget_show(frmPass);
|
||||
gtk_box_pack_start(GTK_BOX(vbox2), frmPass, TRUE, TRUE, 0);
|
||||
|
||||
table3 = gtk_table_new (3, 2, FALSE);
|
||||
table3 = gtk_table_new(3, 2, FALSE);
|
||||
gtk_widget_set_name(table3, "table3");
|
||||
gtk_widget_show(table3);
|
||||
gtk_container_add(GTK_CONTAINER(frmPass), table3);
|
||||
|
@ -496,20 +486,20 @@ GtkWidget *create_wndMain(void) {
|
|||
entPassFile = gtk_entry_new();
|
||||
gtk_widget_set_name(entPassFile, "entPassFile");
|
||||
gtk_widget_show(entPassFile);
|
||||
gtk_table_attach(GTK_TABLE(table3), entPassFile, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table3), entPassFile, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entPassFile, "File with passwords to try, one entry per line", NULL);
|
||||
|
||||
entPass = gtk_entry_new();
|
||||
gtk_widget_set_name(entPass, "entPass");
|
||||
gtk_widget_show(entPass);
|
||||
gtk_table_attach(GTK_TABLE(table3), entPass, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table3), entPass, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entPass, "The password to try", NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entPass), "yourpass");
|
||||
|
||||
radioPass1 = gtk_radio_button_new_with_mnemonic(NULL, "Password");
|
||||
gtk_widget_set_name(radioPass1, "radioPass1");
|
||||
gtk_widget_show(radioPass1);
|
||||
gtk_table_attach(GTK_TABLE(table3), radioPass1, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table3), radioPass1, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_radio_button_set_group(GTK_RADIO_BUTTON(radioPass1), radioPass1_group);
|
||||
radioPass1_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radioPass1));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radioPass1), TRUE);
|
||||
|
@ -517,26 +507,22 @@ GtkWidget *create_wndMain(void) {
|
|||
radioPass2 = gtk_radio_button_new_with_mnemonic(NULL, "Password List");
|
||||
gtk_widget_set_name(radioPass2, "radioPass2");
|
||||
gtk_widget_show(radioPass2);
|
||||
gtk_table_attach(GTK_TABLE(table3), radioPass2, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table3), radioPass2, 0, 1, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_radio_button_set_group(GTK_RADIO_BUTTON(radioPass2), radioPass1_group);
|
||||
radioPass1_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radioPass2));
|
||||
radioGenerate = gtk_radio_button_new_with_mnemonic (NULL, "Generate");
|
||||
gtk_widget_set_name (radioGenerate, "radioGenerate");
|
||||
gtk_widget_show (radioGenerate);
|
||||
gtk_table_attach (GTK_TABLE (table3), radioGenerate, 0, 1, 2, 3,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK),
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radioGenerate), radioPass1_group);
|
||||
radioPass1_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radioGenerate));
|
||||
radioGenerate = gtk_radio_button_new_with_mnemonic(NULL, "Generate");
|
||||
gtk_widget_set_name(radioGenerate, "radioGenerate");
|
||||
gtk_widget_show(radioGenerate);
|
||||
gtk_table_attach(GTK_TABLE(table3), radioGenerate, 0, 1, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_radio_button_set_group(GTK_RADIO_BUTTON(radioGenerate), radioPass1_group);
|
||||
radioPass1_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radioGenerate));
|
||||
|
||||
entGeneration = gtk_entry_new ();
|
||||
gtk_widget_set_name (entGeneration, "entGeneration");
|
||||
gtk_widget_show (entGeneration);
|
||||
gtk_table_attach (GTK_TABLE (table3), entGeneration, 1, 2, 2, 3,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK),
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, entGeneration, "Generate passwords", NULL);
|
||||
gtk_entry_set_text (GTK_ENTRY (entGeneration), "1:1:a");
|
||||
entGeneration = gtk_entry_new();
|
||||
gtk_widget_set_name(entGeneration, "entGeneration");
|
||||
gtk_widget_show(entGeneration);
|
||||
gtk_table_attach(GTK_TABLE(table3), entGeneration, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entGeneration, "Generate passwords", NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entGeneration), "1:1:a");
|
||||
|
||||
labelpass = gtk_label_new("Password");
|
||||
gtk_widget_set_name(labelpass, "labelpass");
|
||||
|
@ -556,13 +542,13 @@ GtkWidget *create_wndMain(void) {
|
|||
chkColon = gtk_check_button_new_with_mnemonic("Use Colon separated file");
|
||||
gtk_widget_set_name(chkColon, "chkColon");
|
||||
gtk_widget_show(chkColon);
|
||||
gtk_table_attach(GTK_TABLE(table5), chkColon, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table5), chkColon, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkColon, "Enable this option to use a colon file for login/password attempts", NULL);
|
||||
|
||||
entColonFile = gtk_entry_new();
|
||||
gtk_widget_set_name(entColonFile, "entColonFile");
|
||||
gtk_widget_show(entColonFile);
|
||||
gtk_table_attach(GTK_TABLE(table5), entColonFile, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table5), entColonFile, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entColonFile, "The colon file to use, each line has to be structured like \"mylogin:mypass\"", NULL);
|
||||
|
||||
label20 = gtk_label_new("Colon separated file");
|
||||
|
@ -578,21 +564,21 @@ GtkWidget *create_wndMain(void) {
|
|||
chkPassLogin = gtk_check_button_new_with_mnemonic("Try login as password");
|
||||
gtk_widget_set_name(chkPassLogin, "chkPassLogin");
|
||||
gtk_widget_show(chkPassLogin);
|
||||
gtk_table_attach(GTK_TABLE(table6), chkPassLogin, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table6), chkPassLogin, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkPassLogin, "Enable this option to try the login as password, in addition to the password/file", NULL);
|
||||
|
||||
chkPassNull = gtk_check_button_new_with_mnemonic("Try empty password");
|
||||
gtk_widget_set_name(chkPassNull, "chkPassNull");
|
||||
gtk_widget_show(chkPassNull);
|
||||
gtk_table_attach(GTK_TABLE(table6), chkPassNull, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table6), chkPassNull, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkPassNull, "Enable this option to try an empty password, in addition to the password/file", NULL);
|
||||
|
||||
chkPassReverse = gtk_check_button_new_with_mnemonic ("Try reversed login");
|
||||
gtk_widget_set_name (chkPassReverse, "chkPassReverse");
|
||||
gtk_widget_show (chkPassReverse);
|
||||
gtk_table_attach (GTK_TABLE (table6), chkPassReverse, 2, 3, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, chkPassReverse, "Enable this option to try an reverse password, in addition to the password/file", NULL);
|
||||
|
||||
chkPassReverse = gtk_check_button_new_with_mnemonic("Try reversed login");
|
||||
gtk_widget_set_name(chkPassReverse, "chkPassReverse");
|
||||
gtk_widget_show(chkPassReverse);
|
||||
gtk_table_attach(GTK_TABLE(table6), chkPassReverse, 2, 3, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkPassReverse, "Enable this option to try an reverse password, in addition to the password/file", NULL);
|
||||
|
||||
label2 = gtk_label_new("Passwords");
|
||||
gtk_widget_set_name(label2, "label2");
|
||||
gtk_widget_show(label2);
|
||||
|
@ -606,7 +592,7 @@ GtkWidget *create_wndMain(void) {
|
|||
frame9 = gtk_frame_new(NULL);
|
||||
gtk_widget_set_name(frame9, "frame9");
|
||||
gtk_widget_show(frame9);
|
||||
gtk_table_attach(GTK_TABLE(table4), frame9, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table4), frame9, 0, 1, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 0);
|
||||
|
||||
table7 = gtk_table_new(5, 2, FALSE);
|
||||
gtk_widget_set_name(table7, "table7");
|
||||
|
@ -616,58 +602,58 @@ GtkWidget *create_wndMain(void) {
|
|||
label22 = gtk_label_new("Proxy ");
|
||||
gtk_widget_set_name(label22, "label22");
|
||||
gtk_widget_show(label22);
|
||||
gtk_table_attach(GTK_TABLE(table7), label22, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), label22, 0, 1, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label22), 0, 0.5);
|
||||
|
||||
entHTTPProxy = gtk_entry_new();
|
||||
gtk_widget_set_name(entHTTPProxy, "entHTTPProxy");
|
||||
gtk_widget_show(entHTTPProxy);
|
||||
gtk_table_attach(GTK_TABLE(table7), entHTTPProxy, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), entHTTPProxy, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entHTTPProxy, "The address of the proxy. Syntax: \"http://123.45.67.89:8080\"", NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entHTTPProxy), "http://127.0.0.1:8080");
|
||||
|
||||
chkProxyAuth = gtk_check_button_new_with_mnemonic("Proxy needs authentication");
|
||||
gtk_widget_set_name(chkProxyAuth, "chkProxyAuth");
|
||||
gtk_widget_show(chkProxyAuth);
|
||||
gtk_table_attach(GTK_TABLE(table7), chkProxyAuth, 0, 1, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), chkProxyAuth, 0, 1, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkProxyAuth, "Enable this if the proxy requires authenticatio", NULL);
|
||||
|
||||
label23 = gtk_label_new("Username");
|
||||
gtk_widget_set_name(label23, "label23");
|
||||
gtk_widget_show(label23);
|
||||
gtk_table_attach(GTK_TABLE(table7), label23, 0, 1, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), label23, 0, 1, 3, 4, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label23), 0, 0.5);
|
||||
|
||||
entProxyUser = gtk_entry_new();
|
||||
gtk_widget_set_name(entProxyUser, "entProxyUser");
|
||||
gtk_widget_show(entProxyUser);
|
||||
gtk_table_attach(GTK_TABLE(table7), entProxyUser, 1, 2, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), entProxyUser, 1, 2, 3, 4, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entProxyUser, "The user name for proxy authentication", NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entProxyUser), "yourname");
|
||||
|
||||
label24 = gtk_label_new("Password");
|
||||
gtk_widget_set_name(label24, "label24");
|
||||
gtk_widget_show(label24);
|
||||
gtk_table_attach(GTK_TABLE(table7), label24, 0, 1, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), label24, 0, 1, 4, 5, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label24), 0, 0.5);
|
||||
|
||||
entProxyPass = gtk_entry_new();
|
||||
gtk_widget_set_name(entProxyPass, "entProxyPass");
|
||||
gtk_widget_show(entProxyPass);
|
||||
gtk_table_attach(GTK_TABLE(table7), entProxyPass, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), entProxyPass, 1, 2, 4, 5, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entProxyPass, "The password for proxy authentication", NULL);
|
||||
gtk_entry_set_text(GTK_ENTRY(entProxyPass), "yourpass");
|
||||
|
||||
label26 = gtk_label_new("");
|
||||
gtk_widget_set_name(label26, "label26");
|
||||
gtk_widget_show(label26);
|
||||
gtk_table_attach(GTK_TABLE(table7), label26, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), label26, 1, 2, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label26), 0, 0.5);
|
||||
|
||||
hbox3 = gtk_hbox_new(FALSE, 0);
|
||||
gtk_widget_set_name(hbox3, "hbox3");
|
||||
gtk_widget_show(hbox3);
|
||||
gtk_table_attach(GTK_TABLE(table7), hbox3, 0, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table7), hbox3, 0, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
|
||||
|
||||
radioProxy = gtk_radio_button_new_with_mnemonic(NULL, "No Proxy");
|
||||
gtk_widget_set_name(radioProxy, "radioProxy");
|
||||
|
@ -701,7 +687,7 @@ GtkWidget *create_wndMain(void) {
|
|||
frame13 = gtk_frame_new(NULL);
|
||||
gtk_widget_set_name(frame13, "frame13");
|
||||
gtk_widget_show(frame13);
|
||||
gtk_table_attach(GTK_TABLE(table4), frame13, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table4), frame13, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
|
||||
|
||||
table10 = gtk_table_new(5, 2, FALSE);
|
||||
gtk_widget_set_name(table10, "table10");
|
||||
|
@ -711,50 +697,46 @@ GtkWidget *create_wndMain(void) {
|
|||
chkExitf = gtk_check_button_new_with_mnemonic("Exit after first found pair (per host)");
|
||||
gtk_widget_set_name(chkExitf, "chkExitf");
|
||||
gtk_widget_show(chkExitf);
|
||||
gtk_table_attach(GTK_TABLE(table10), chkExitf, 0, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table10), chkExitf, 0, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkExitf, "Enable this to stop all attacking processes once a valid login/password pair is found (per host)", NULL);
|
||||
|
||||
spnTimeout_adj = gtk_adjustment_new(30, 0, 295, 1, 10, 0);
|
||||
spnTimeout = gtk_spin_button_new(GTK_ADJUSTMENT(spnTimeout_adj), 1, 0);
|
||||
gtk_widget_set_name(spnTimeout, "spnTimeout");
|
||||
gtk_widget_show(spnTimeout);
|
||||
gtk_table_attach(GTK_TABLE(table10), spnTimeout, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table10), spnTimeout, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, spnTimeout, "The maximum timeout an attack process is waiting for a response from the target", NULL);
|
||||
|
||||
spnTasks_adj = gtk_adjustment_new(16, 0, 128, 1, 10, 0);
|
||||
spnTasks = gtk_spin_button_new(GTK_ADJUSTMENT(spnTasks_adj), 1, 0);
|
||||
gtk_widget_set_name(spnTasks, "spnTasks");
|
||||
gtk_widget_show(spnTasks);
|
||||
gtk_table_attach(GTK_TABLE(table10), spnTasks, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table10), spnTasks, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, spnTasks, "The number of attack tasks to run in parallel. The more the faster, the most: computer lockup :-) 16-64 is a good choice", NULL);
|
||||
|
||||
label32 = gtk_label_new("Timeout");
|
||||
gtk_widget_set_name(label32, "label32");
|
||||
gtk_widget_show(label32);
|
||||
gtk_table_attach(GTK_TABLE(table10), label32, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table10), label32, 0, 1, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label32), 0, 0.5);
|
||||
|
||||
label31 = gtk_label_new("Number of Tasks");
|
||||
gtk_widget_set_name(label31, "label31");
|
||||
gtk_widget_show(label31);
|
||||
gtk_table_attach(GTK_TABLE(table10), label31, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_table_attach(GTK_TABLE(table10), label31, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label31), 0, 0.5);
|
||||
|
||||
chkExitF = gtk_check_button_new_with_mnemonic ("Exit after first found pair (global)");
|
||||
gtk_widget_set_name (chkExitF, "chkExitF");
|
||||
gtk_widget_show (chkExitF);
|
||||
gtk_table_attach (GTK_TABLE (table10), chkExitF, 0, 2, 3, 4,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK),
|
||||
(GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, chkExitF, "Enable this to stop all attacking processes once a valid login/password pair is found (global)", NULL);
|
||||
chkExitF = gtk_check_button_new_with_mnemonic("Exit after first found pair (global)");
|
||||
gtk_widget_set_name(chkExitF, "chkExitF");
|
||||
gtk_widget_show(chkExitF);
|
||||
gtk_table_attach(GTK_TABLE(table10), chkExitF, 0, 2, 3, 4, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkExitF, "Enable this to stop all attacking processes once a valid login/password pair is found (global)", NULL);
|
||||
|
||||
chkNoErr = gtk_check_button_new_with_mnemonic ("Do not print messages about connection errors");
|
||||
gtk_widget_set_name (chkNoErr, "chkNoErr");
|
||||
gtk_widget_show (chkNoErr);
|
||||
gtk_table_attach (GTK_TABLE (table10), chkNoErr, 0, 2, 4, 5,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK),
|
||||
(GtkAttachOptions) (GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip (tooltips, chkNoErr, "Do not print messages about connection errors", NULL);
|
||||
chkNoErr = gtk_check_button_new_with_mnemonic("Do not print messages about connection errors");
|
||||
gtk_widget_set_name(chkNoErr, "chkNoErr");
|
||||
gtk_widget_show(chkNoErr);
|
||||
gtk_table_attach(GTK_TABLE(table10), chkNoErr, 0, 2, 4, 5, (GtkAttachOptions)(GTK_EXPAND | GTK_SHRINK), (GtkAttachOptions)(GTK_EXPAND), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, chkNoErr, "Do not print messages about connection errors", NULL);
|
||||
|
||||
label30 = gtk_label_new("Performance Options");
|
||||
gtk_widget_set_name(label30, "label30");
|
||||
|
@ -1038,18 +1020,18 @@ GtkWidget *create_wndMain(void) {
|
|||
gtk_widget_show(statusbar);
|
||||
gtk_box_pack_start(GTK_BOX(vbox1), statusbar, FALSE, FALSE, 0);
|
||||
|
||||
g_signal_connect((gpointer) wndMain, "destroy", G_CALLBACK(on_wndMain_destroy), NULL);
|
||||
g_signal_connect((gpointer) quit1, "button-press-event", G_CALLBACK(on_quit1_activate), NULL);
|
||||
g_signal_connect((gpointer) entTargetFile, "button_press_event", G_CALLBACK(on_entTargetFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer) entUsernameFile, "button_press_event", G_CALLBACK(on_entUsernameFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer) chkDisUser, "toggled", G_CALLBACK (on_chkDisUser_toggled), NULL);
|
||||
g_signal_connect((gpointer) entPassFile, "button_press_event", G_CALLBACK(on_entPassFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer) chkColon, "toggled", G_CALLBACK(on_chkColon_toggled), NULL);
|
||||
g_signal_connect((gpointer) entColonFile, "button_press_event", G_CALLBACK(on_entColonFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer) btnStart, "clicked", G_CALLBACK(on_btnStart_clicked), NULL);
|
||||
g_signal_connect((gpointer) btnStop, "clicked", G_CALLBACK(on_btnStop_clicked), NULL);
|
||||
g_signal_connect((gpointer) btnSave, "clicked", G_CALLBACK(on_btnSave_clicked), NULL);
|
||||
g_signal_connect((gpointer) btnClear, "clicked", G_CALLBACK(on_btnClear_clicked), NULL);
|
||||
g_signal_connect((gpointer)wndMain, "destroy", G_CALLBACK(on_wndMain_destroy), NULL);
|
||||
g_signal_connect((gpointer)quit1, "button-press-event", G_CALLBACK(on_quit1_activate), NULL);
|
||||
g_signal_connect((gpointer)entTargetFile, "button_press_event", G_CALLBACK(on_entTargetFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer)entUsernameFile, "button_press_event", G_CALLBACK(on_entUsernameFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer)chkDisUser, "toggled", G_CALLBACK(on_chkDisUser_toggled), NULL);
|
||||
g_signal_connect((gpointer)entPassFile, "button_press_event", G_CALLBACK(on_entPassFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer)chkColon, "toggled", G_CALLBACK(on_chkColon_toggled), NULL);
|
||||
g_signal_connect((gpointer)entColonFile, "button_press_event", G_CALLBACK(on_entColonFile_button_press_event), NULL);
|
||||
g_signal_connect((gpointer)btnStart, "clicked", G_CALLBACK(on_btnStart_clicked), NULL);
|
||||
g_signal_connect((gpointer)btnStop, "clicked", G_CALLBACK(on_btnStop_clicked), NULL);
|
||||
g_signal_connect((gpointer)btnSave, "clicked", G_CALLBACK(on_btnSave_clicked), NULL);
|
||||
g_signal_connect((gpointer)btnClear, "clicked", G_CALLBACK(on_btnClear_clicked), NULL);
|
||||
|
||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||
GLADE_HOOKUP_OBJECT_NO_REF(wndMain, wndMain, "wndMain");
|
||||
|
@ -1090,7 +1072,7 @@ GtkWidget *create_wndMain(void) {
|
|||
GLADE_HOOKUP_OBJECT(wndMain, radioUsername1, "radioUsername1");
|
||||
GLADE_HOOKUP_OBJECT(wndMain, chkUsernameLoop, "chkUsernameLoop");
|
||||
GLADE_HOOKUP_OBJECT(wndMain, radioUsername2, "radioUsername2");
|
||||
GLADE_HOOKUP_OBJECT (wndMain, chkDisUser, "chkDisUser");
|
||||
GLADE_HOOKUP_OBJECT(wndMain, chkDisUser, "chkDisUser");
|
||||
GLADE_HOOKUP_OBJECT(wndMain, label8, "label8");
|
||||
GLADE_HOOKUP_OBJECT(wndMain, frmPass, "frmPass");
|
||||
GLADE_HOOKUP_OBJECT(wndMain, table3, "table3");
|
||||
|
|
|
@ -8,17 +8,16 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
#include "callbacks.h"
|
||||
#include "interface.h"
|
||||
#include "support.h"
|
||||
#include "callbacks.h"
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
char *hydra_path1 = "./hydra";
|
||||
char *hydra_path2 = "/usr/local/bin/hydra";
|
||||
char *hydra_path3 = "/usr/bin/hydra";
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
extern GtkWidget *wndMain;
|
||||
int i;
|
||||
|
@ -60,7 +59,6 @@ int main(int argc, char *argv[]) {
|
|||
wndMain = create_wndMain();
|
||||
gtk_widget_show(wndMain);
|
||||
|
||||
|
||||
/* if we can't use the new cool file chooser, the save button gets disabled */
|
||||
#ifndef GTK_TYPE_FILE_CHOOSER
|
||||
GtkWidget *btnSave;
|
||||
|
@ -69,13 +67,12 @@ int main(int argc, char *argv[]) {
|
|||
gtk_widget_set_sensitive(btnSave, FALSE);
|
||||
#endif
|
||||
|
||||
|
||||
/* update the statusbar every now and then */
|
||||
g_timeout_add(600, update_statusbar, NULL);
|
||||
|
||||
/* we want bold text in the output window */
|
||||
output = lookup_widget(GTK_WIDGET(wndMain), "txtOutput");
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *) output);
|
||||
outputbuf = gtk_text_view_get_buffer((GtkTextView *)output);
|
||||
gtk_text_buffer_create_tag(outputbuf, "bold", "weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
||||
/* he ho, lets go! */
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "support.h"
|
||||
|
||||
GtkWidget *lookup_widget(GtkWidget * widget, const gchar * widget_name) {
|
||||
GtkWidget *lookup_widget(GtkWidget *widget, const gchar *widget_name) {
|
||||
GtkWidget *parent, *found_widget;
|
||||
|
||||
for (;;) {
|
||||
|
@ -26,13 +26,13 @@ GtkWidget *lookup_widget(GtkWidget * widget, const gchar * widget_name) {
|
|||
else
|
||||
parent = widget->parent;
|
||||
if (!parent)
|
||||
parent = (GtkWidget *) g_object_get_data(G_OBJECT(widget), "GladeParentKey");
|
||||
parent = (GtkWidget *)g_object_get_data(G_OBJECT(widget), "GladeParentKey");
|
||||
if (parent == NULL)
|
||||
break;
|
||||
widget = parent;
|
||||
}
|
||||
|
||||
found_widget = (GtkWidget *) g_object_get_data(G_OBJECT(widget), widget_name);
|
||||
found_widget = (GtkWidget *)g_object_get_data(G_OBJECT(widget), widget_name);
|
||||
if (!found_widget)
|
||||
g_warning("Widget not found: %s", widget_name);
|
||||
return found_widget;
|
||||
|
@ -41,19 +41,16 @@ GtkWidget *lookup_widget(GtkWidget * widget, const gchar * widget_name) {
|
|||
static GList *pixmaps_directories = NULL;
|
||||
|
||||
/* Use this function to set the directory containing installed pixmaps. */
|
||||
void add_pixmap_directory(const gchar * directory) {
|
||||
pixmaps_directories = g_list_prepend(pixmaps_directories, g_strdup(directory));
|
||||
}
|
||||
void add_pixmap_directory(const gchar *directory) { pixmaps_directories = g_list_prepend(pixmaps_directories, g_strdup(directory)); }
|
||||
|
||||
/* This is an internally used function to find pixmap files. */
|
||||
static gchar *find_pixmap_file(const gchar * filename) {
|
||||
static gchar *find_pixmap_file(const gchar *filename) {
|
||||
GList *elem;
|
||||
|
||||
/* We step through each of the pixmaps directory to find it. */
|
||||
elem = pixmaps_directories;
|
||||
while (elem) {
|
||||
gchar *pathname = g_strdup_printf("%s%s%s", (gchar *) elem->data,
|
||||
G_DIR_SEPARATOR_S, filename);
|
||||
gchar *pathname = g_strdup_printf("%s%s%s", (gchar *)elem->data, G_DIR_SEPARATOR_S, filename);
|
||||
|
||||
if (g_file_test(pathname, G_FILE_TEST_EXISTS))
|
||||
return pathname;
|
||||
|
@ -64,7 +61,7 @@ static gchar *find_pixmap_file(const gchar * filename) {
|
|||
}
|
||||
|
||||
/* This is an internally used function to create pixmaps. */
|
||||
GtkWidget *create_pixmap(GtkWidget * widget, const gchar * filename) {
|
||||
GtkWidget *create_pixmap(GtkWidget *widget, const gchar *filename) {
|
||||
gchar *pathname = NULL;
|
||||
GtkWidget *pixmap;
|
||||
|
||||
|
@ -84,7 +81,7 @@ GtkWidget *create_pixmap(GtkWidget * widget, const gchar * filename) {
|
|||
}
|
||||
|
||||
/* This is an internally used function to create pixmaps. */
|
||||
GdkPixbuf *create_pixbuf(const gchar * filename) {
|
||||
GdkPixbuf *create_pixbuf(const gchar *filename) {
|
||||
gchar *pathname = NULL;
|
||||
GdkPixbuf *pixbuf;
|
||||
GError *error = NULL;
|
||||
|
@ -109,7 +106,7 @@ GdkPixbuf *create_pixbuf(const gchar * filename) {
|
|||
}
|
||||
|
||||
/* This is used to set ATK action descriptions. */
|
||||
void glade_set_atk_action_description(AtkAction * action, const gchar * action_name, const gchar * description) {
|
||||
void glade_set_atk_action_description(AtkAction *action, const gchar *action_name, const gchar *description) {
|
||||
gint n_actions, i;
|
||||
|
||||
n_actions = atk_action_get_n_actions(action);
|
||||
|
|
|
@ -19,26 +19,23 @@
|
|||
* or alternatively any widget in the component, and the name of the widget
|
||||
* you want returned.
|
||||
*/
|
||||
GtkWidget *lookup_widget(GtkWidget * widget, const gchar * widget_name);
|
||||
|
||||
GtkWidget *lookup_widget(GtkWidget *widget, const gchar *widget_name);
|
||||
|
||||
/* Use this function to set the directory containing installed pixmaps. */
|
||||
void add_pixmap_directory(const gchar * directory);
|
||||
|
||||
void add_pixmap_directory(const gchar *directory);
|
||||
|
||||
/*
|
||||
* Private Functions.
|
||||
*/
|
||||
|
||||
/* This is used to create the pixmaps used in the interface. */
|
||||
GtkWidget *create_pixmap(GtkWidget * widget, const gchar * filename);
|
||||
GtkWidget *create_pixmap(GtkWidget *widget, const gchar *filename);
|
||||
|
||||
/* This is used to create the pixbufs used in the interface. */
|
||||
GdkPixbuf *create_pixbuf(const gchar * filename);
|
||||
GdkPixbuf *create_pixbuf(const gchar *filename);
|
||||
|
||||
/* This is used to set ATK action descriptions. */
|
||||
void glade_set_atk_action_description(AtkAction * action, const gchar * action_name, const gchar * description);
|
||||
|
||||
void glade_set_atk_action_description(AtkAction *action, const gchar *action_name, const gchar *description);
|
||||
|
||||
GtkWidget *wndMain;
|
||||
char *HYDRA_BIN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue