big int to stdint switch

This commit is contained in:
van Hauser 2017-07-05 08:48:00 +02:00
parent 74931e3b58
commit f124c26fc6
73 changed files with 1364 additions and 1235 deletions

View file

@ -3,12 +3,12 @@
extern char *HYDRA_EXIT;
char *buf;
int no_line_mode;
int32_t no_line_mode;
int start_telnet(int s, char *ip, int port, unsigned char options, char *miscptr, FILE * fp) {
int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) {
char *empty = "";
char *login, *pass, buffer[300];
int i = 0;
int32_t i = 0;
if (strlen(login = hydra_get_next_login()) == 0)
login = empty;
@ -96,9 +96,9 @@ int start_telnet(int s, char *ip, int port, unsigned char options, char *miscptr
return 2;
}
void service_telnet(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname) {
int run = 1, next_run = 1, sock = -1, fck;
int myport = PORT_TELNET, mysslport = PORT_TELNET_SSL;
void service_telnet(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
int32_t run = 1, next_run = 1, sock = -1, fck;
int32_t myport = PORT_TELNET, mysslport = PORT_TELNET_SSL;
hydra_register_socket(sp);
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
@ -106,8 +106,8 @@ void service_telnet(char *ip, int sp, unsigned char options, char *miscptr, FILE
if (miscptr != NULL)
make_to_lower(miscptr);
while (1) {
int first = 0;
int old_waittime = waittime;
int32_t first = 0;
int32_t old_waittime = waittime;
switch (run) {
case 1: /* connect and service init function */
@ -128,7 +128,7 @@ void service_telnet(char *ip, int sp, unsigned char options, char *miscptr, FILE
port = mysslport;
}
if (sock < 0) {
hydra_report(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
hydra_report(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int32_t) getpid());
hydra_child_exit(1);
}
if ((buf = hydra_receive_line(sock)) == NULL) { /* check the first line */
@ -204,7 +204,7 @@ void service_telnet(char *ip, int sp, unsigned char options, char *miscptr, FILE
}
}
int service_telnet_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname) {
int32_t service_telnet_init(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE * fp, int32_t port, char *hostname) {
// called before the childrens are forked off, so this is the function
// which should be filled if initial connections and service setup has to be
// performed once only.