From 28d6531b29788ecfa0f50f728e51ce57450624c4 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Thu, 17 Aug 2017 22:23:40 +0200 Subject: [PATCH] smb: fix compilation warnings. --- Makefile | 2 +- hydra-mod.c | 2 +- hydra-mod.h | 2 +- hydra-smb.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f607857..6eb18ec 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CC?=gcc +CC=clang STRIP=strip XDEFINES= -DHAVE_MYSQL_MYSQL_H -DLIBOPENSSL -DLIBNCURSES -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE -DLIBMYSQLCLIENT -DLIBSSH -DHAVE_ZLIB -DHAVE_GCRYPT -DHAVE_MATH_H XLIBS= -lgcrypt -lz -lcurses -lssl -lidn -lpcre -lmysqlclient -lssh -lcrypto diff --git a/hydra-mod.c b/hydra-mod.c index 9aea7d5..9d5ecde 100644 --- a/hydra-mod.c +++ b/hydra-mod.c @@ -1151,7 +1151,7 @@ void hydra_tobase64(unsigned char *buf, uint32_t buflen, uint32_t bufsize) { strcpy((char *) buf, (char *) bof); /* can not overflow */ } -void hydra_dump_asciihex(char *string, int32_t length) { +void hydra_dump_asciihex(const char *string, int32_t length) { unsigned char *p = (unsigned char *) string; unsigned char lastrow_data[16]; int32_t rows = length / HYDRA_DUMP_ROWS; diff --git a/hydra-mod.h b/hydra-mod.h index 4a830cf..fa3e7c0 100644 --- a/hydra-mod.h +++ b/hydra-mod.h @@ -31,7 +31,7 @@ extern int32_t hydra_send(int32_t socket, char *buf, uint32_t size, int32_t opti extern int32_t make_to_lower(char *buf); extern unsigned char hydra_conv64(unsigned char in); extern void hydra_tobase64(unsigned char *buf, uint32_t buflen, uint32_t bufsize); -extern void hydra_dump_asciihex(char *string, int32_t length); +extern void hydra_dump_asciihex(const char *string, int32_t length); extern void hydra_set_srcport(int32_t port); extern char *hydra_address2string(char *address); extern char *hydra_address2string_beautiful(char *address); diff --git a/hydra-smb.c b/hydra-smb.c index 255bd44..18d501e 100644 --- a/hydra-smb.c +++ b/hydra-smb.c @@ -119,7 +119,7 @@ static size_t UTF8_UTF16LE(unsigned char *in, int32_t insize, unsigned char *out uint64_t ch; if (debug) { hydra_report(stderr, "[DEBUG] UTF8_UTF16LE in:\n"); - hydra_dump_asciihex(in, insize); + hydra_dump_asciihex((char *)in, insize); } for (i = 0; i < insize; i++) { if (in[i] < 128) { // one byte @@ -149,7 +149,7 @@ static size_t UTF8_UTF16LE(unsigned char *in, int32_t insize, unsigned char *out } if (debug) { hydra_report(stderr, "[DEBUG] UTF8_UTF16LE out:\n"); - hydra_dump_asciihex(out,j); + hydra_dump_asciihex((char *)out,j); } return j; }