mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
nits
This commit is contained in:
parent
93abd60fc9
commit
568ef74e0d
5 changed files with 7 additions and 6 deletions
|
@ -4,7 +4,7 @@
|
||||||
WARN_CLANG=-Wformat-nonliteral -Wstrncat-size -Wformat-security -Wsign-conversion -Wconversion -Wfloat-conversion -Wshorten-64-to-32 -Wuninitialized -Wmissing-variable-declarations -Wmissing-declarations
|
WARN_CLANG=-Wformat-nonliteral -Wstrncat-size -Wformat-security -Wsign-conversion -Wconversion -Wfloat-conversion -Wshorten-64-to-32 -Wuninitialized -Wmissing-variable-declarations -Wmissing-declarations
|
||||||
WARN_GCC=-Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-truncation=2 -Wnull-dereference -Wstrict-overflow=2 -Wstringop-overflow=4 -Walloca-larger-than=4096 -Wtype-limits -Wconversion -Wtrampolines -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fno-common -Wcast-align
|
WARN_GCC=-Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-truncation=2 -Wnull-dereference -Wstrict-overflow=2 -Wstringop-overflow=4 -Walloca-larger-than=4096 -Wtype-limits -Wconversion -Wtrampolines -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fno-common -Wcast-align
|
||||||
CFLAGS ?= -g
|
CFLAGS ?= -g
|
||||||
OPTS=-I. -O3 $(CFLAGS) -fcommon
|
OPTS=-I. -O3 $(CFLAGS) -fcommon -Wno-deprecated-declarations
|
||||||
CPPFLAGS += -D_GNU_SOURCE
|
CPPFLAGS += -D_GNU_SOURCE
|
||||||
# -Wall -g -pedantic
|
# -Wall -g -pedantic
|
||||||
LIBS=-lm
|
LIBS=-lm
|
||||||
|
|
|
@ -322,8 +322,7 @@ void hdrrep(ptr_header_node *ptr_head, char *oldvalue, char *newvalue) {
|
||||||
char *p = strstr(cur_ptr->value, oldvalue);
|
char *p = strstr(cur_ptr->value, oldvalue);
|
||||||
memmove(p + newlen, p + oldlen, strlen(p + oldlen) + 1);
|
memmove(p + newlen, p + oldlen, strlen(p + oldlen) + 1);
|
||||||
memcpy(p, newvalue, newlen);
|
memcpy(p, newvalue, newlen);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
hydra_report(stderr, "[ERROR] Out of memory (hddrep).\n");
|
hydra_report(stderr, "[ERROR] Out of memory (hddrep).\n");
|
||||||
hydra_child_exit(0);
|
hydra_child_exit(0);
|
||||||
}
|
}
|
||||||
|
@ -805,7 +804,7 @@ int32_t start_http_form(int32_t s, char *ip, int32_t port, unsigned char options
|
||||||
if (hydra_send(s, http_request, strlen(http_request), 0) < 0) {
|
if (hydra_send(s, http_request, strlen(http_request), 0) < 0) {
|
||||||
free(cookie_header);
|
free(cookie_header);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (header_exists(&ptr_head, "Content-Length", HEADER_TYPE_DEFAULT))
|
if (header_exists(&ptr_head, "Content-Length", HEADER_TYPE_DEFAULT))
|
||||||
hdrrepv(&ptr_head, "Content-Length", "0");
|
hdrrepv(&ptr_head, "Content-Length", "0");
|
||||||
|
|
|
@ -664,7 +664,7 @@ char *hydra_get_next_pair() {
|
||||||
// if (debug) hydra_dump_data(pair, __fck, "CHILD READ PAIR");
|
// if (debug) hydra_dump_data(pair, __fck, "CHILD READ PAIR");
|
||||||
if (pair[0] == 0 || __fck <= 0)
|
if (pair[0] == 0 || __fck <= 0)
|
||||||
return HYDRA_EMPTY;
|
return HYDRA_EMPTY;
|
||||||
if (__fck >= sizeof(HYDRA_EXIT) && memcmp(&HYDRA_EXIT, &pair, sizeof(HYDRA_EXIT)) == 0)
|
if (__fck >= sizeof(HYDRA_EXIT) && memcmp(&HYDRA_EXIT, &pair, sizeof(HYDRA_EXIT)) == 0)
|
||||||
return HYDRA_EXIT;
|
return HYDRA_EXIT;
|
||||||
}
|
}
|
||||||
return pair;
|
return pair;
|
||||||
|
|
|
@ -126,7 +126,7 @@ bool smb2_run_test(creds_t *cr, const char *server, uint16_t port) {
|
||||||
|
|
||||||
*/
|
*/
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case 0:
|
case 0:
|
||||||
// maybe false positive? unclear ... :( ... needs more testing
|
// maybe false positive? unclear ... :( ... needs more testing
|
||||||
smbc_free_context(ctx, 1);
|
smbc_free_context(ctx, 1);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
#ifdef LIBSVN
|
#ifdef LIBSVN
|
||||||
|
|
||||||
/* needed on openSUSE */
|
/* needed on openSUSE */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined PATH_MAX && defined HAVE_SYS_PARAM_H
|
#if !defined PATH_MAX && defined HAVE_SYS_PARAM_H
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue