mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
removed warnings
This commit is contained in:
parent
8fe519dd75
commit
4cc2dcebc2
7 changed files with 26 additions and 27 deletions
|
@ -167,7 +167,7 @@ void service_cisco(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
|||
hydra_child_exit(0);
|
||||
}
|
||||
}
|
||||
if (buf2 != NULL && hydra_strcasestr(buf2, "ress ENTER") != NULL)
|
||||
if (buf2 != NULL && hydra_strcasestr((char*)buf2, "ress ENTER") != NULL)
|
||||
hydra_send(sock, "\r\n", 2, 0);
|
||||
} while (strstr((char *) buf2, "assw") == NULL);
|
||||
free(buf2);
|
||||
|
|
|
@ -406,7 +406,7 @@ int start_pop3(int s, char *ip, int port, unsigned char options, char *miscptr,
|
|||
}
|
||||
|
||||
void service_pop3(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port) {
|
||||
int run = 1, next_run = 1, sock = -1, i;
|
||||
int run = 1, next_run = 1, sock = -1;
|
||||
char *ptr = NULL;
|
||||
|
||||
//extract data from the pool, ip is the key
|
||||
|
|
|
@ -900,7 +900,7 @@ unsigned long SMBSessionSetup(int s, char *szLogin, char *szPassword, char *misc
|
|||
unsigned char *NTLMv2hash = NULL;
|
||||
unsigned char *NTLMhash = NULL;
|
||||
unsigned char *LMhash = NULL;
|
||||
unsigned char unicodeLogin[32 * 2];
|
||||
// unsigned char unicodeLogin[32 * 2];
|
||||
int j;
|
||||
char bufReceive[512];
|
||||
int nReceiveBufferSize = 0;
|
||||
|
|
40
hydra-snmp.c
40
hydra-snmp.c
|
@ -15,7 +15,7 @@ extern int child_head_no;
|
|||
char snmpv3buf[1024], *snmpv3info = NULL;
|
||||
int snmpv3infolen = 0, snmpversion = 1, snmpread = 1, hashtype = 1, enctype = 0;
|
||||
|
||||
char snmpv3_init[] = { 0x30, 0x3e, 0x02, 0x01, 0x03, 0x30, 0x11, 0x02,
|
||||
unsigned char snmpv3_init[] = { 0x30, 0x3e, 0x02, 0x01, 0x03, 0x30, 0x11, 0x02,
|
||||
0x04, 0x08, 0x86, 0xdd, 0xf0, 0x02, 0x03, 0x00,
|
||||
0xff, 0xe3, 0x04, 0x01, 0x04, 0x02, 0x01, 0x03,
|
||||
0x04, 0x10, 0x30, 0x0e, 0x04, 0x00, 0x02, 0x01,
|
||||
|
@ -25,12 +25,12 @@ char snmpv3_init[] = { 0x30, 0x3e, 0x02, 0x01, 0x03, 0x30, 0x11, 0x02,
|
|||
0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x30, 0x00
|
||||
};
|
||||
|
||||
char snmpv3_get1[] = { 0x30, 0x77, 0x02, 0x01, 0x03, 0x30, 0x11, 0x02,
|
||||
unsigned char snmpv3_get1[] = { 0x30, 0x77, 0x02, 0x01, 0x03, 0x30, 0x11, 0x02,
|
||||
0x04, 0x08, 0x86, 0xdd, 0xef, 0x02, 0x03, 0x00,
|
||||
0xff, 0xe3, 0x04, 0x01, 0x05, 0x02, 0x01, 0x03
|
||||
};
|
||||
|
||||
char snmpv3_get2[] = { 0x30, 0x2e, 0x04, 0x0c, 0x80, 0x00, 0x00,
|
||||
unsigned char snmpv3_get2[] = { 0x30, 0x2e, 0x04, 0x0c, 0x80, 0x00, 0x00,
|
||||
0x09, 0x03, 0x00, 0x00, 0x1f, 0xca, 0x8d, 0x82,
|
||||
0x1b, 0x04, 0x00, 0xa0, 0x1c, 0x02, 0x04, 0x3f,
|
||||
0x44, 0x5c, 0xbb, 0x02, 0x01, 0x00, 0x02, 0x01,
|
||||
|
@ -39,7 +39,7 @@ char snmpv3_get2[] = { 0x30, 0x2e, 0x04, 0x0c, 0x80, 0x00, 0x00,
|
|||
0x00
|
||||
};
|
||||
|
||||
char snmpv3_nouser[] = { 0x04, 0x00, 0x04, 0x00, 0x04, 0x00 };
|
||||
unsigned char snmpv3_nouser[] = { 0x04, 0x00, 0x04, 0x00, 0x04, 0x00 };
|
||||
|
||||
struct SNMPV1_A {
|
||||
char ID;
|
||||
|
@ -58,14 +58,14 @@ struct SNMPV1_A snmpv1_a = {
|
|||
};
|
||||
|
||||
struct SNMPV1_R {
|
||||
char type[2];
|
||||
char identid[2];
|
||||
char ident[4];
|
||||
char errstat[3];
|
||||
char errind[3];
|
||||
char objectid[2];
|
||||
char object[11];
|
||||
char value[3];
|
||||
unsigned char type[2];
|
||||
unsigned char identid[2];
|
||||
unsigned char ident[4];
|
||||
unsigned char errstat[3];
|
||||
unsigned char errind[3];
|
||||
unsigned char objectid[2];
|
||||
unsigned char object[11];
|
||||
unsigned char value[3];
|
||||
} snmpv1_r = {
|
||||
.type = "\xa0\x1b", /* GET */
|
||||
.identid = "\x02\x04",.ident = "\x1a\x5e\x97\x00", /* random crap :) */
|
||||
|
@ -76,14 +76,14 @@ struct SNMPV1_R {
|
|||
};
|
||||
|
||||
struct SNMPV1_W {
|
||||
char type[2];
|
||||
char identid[2];
|
||||
char ident[4];
|
||||
char errstat[3];
|
||||
char errind[3];
|
||||
char objectid[2];
|
||||
char object[12];
|
||||
char value[8];
|
||||
unsigned char type[2];
|
||||
unsigned char identid[2];
|
||||
unsigned char ident[4];
|
||||
unsigned char errstat[3];
|
||||
unsigned char errind[3];
|
||||
unsigned char objectid[2];
|
||||
unsigned char object[12];
|
||||
unsigned char value[8];
|
||||
} snmpv1_w = {
|
||||
.type = "\xa3\x21", /* SET */
|
||||
.identid = "\x02\x04",.ident = "\x1a\x5e\x97\x22", /* random crap :) */
|
||||
|
|
|
@ -24,7 +24,7 @@ extern int new_session;
|
|||
int start_sshkey(int s, char *ip, int port, unsigned char options, char *miscptr, FILE * fp) {
|
||||
char *empty = "";
|
||||
char *login, *key, keep_login[300];
|
||||
int auth_state = 0, rc = 0, i = 0;
|
||||
int auth_state = 0, rc = 0;
|
||||
ssh_private_key privkey;
|
||||
|
||||
if (strlen(login = hydra_get_next_login()) == 0)
|
||||
|
|
|
@ -96,9 +96,8 @@ int start_telnet(int s, char *ip, int port, unsigned char options, char *miscptr
|
|||
}
|
||||
|
||||
void service_telnet(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port) {
|
||||
int run = 1, next_run = 1, sock = -1;
|
||||
int run = 1, next_run = 1, sock = -1, fck;
|
||||
int myport = PORT_TELNET, mysslport = PORT_TELNET_SSL;
|
||||
int fck = 0;
|
||||
|
||||
hydra_register_socket(sp);
|
||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||
|
|
2
hydra.c
2
hydra.c
|
@ -3603,7 +3603,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
for (j = 0; j < hydra_options.max_use; j++)
|
||||
if (hydra_heads[j]->active >= 0 && (hydra_heads[j]->target_no == target_no || hydra_options.exit_found == 2)) {
|
||||
if (hydra_brains.targets > 1 && hydra_options.exit_found < 2)
|
||||
if (hydra_brains.targets > hydra_brains.finished && hydra_options.exit_found < 2)
|
||||
hydra_kill_head(j, 1, 0); // kill all heads working on the target
|
||||
else
|
||||
hydra_kill_head(j, 1, 2); // kill all heads working on the target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue