pull/3917/merge
Rosen Penev 2 weeks ago committed by GitHub
commit ad3521070d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,15 +14,19 @@ void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, cons
#define EVENT(id) event_call ((id), hashcat_ctx, NULL, 0)
#define EVENT_DATA(id,buf,len) event_call ((id), hashcat_ctx, (buf), (len))
__attribute__ ((format (printf, 2, 3))) size_t event_log_advice_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (printf, 2, 3))) size_t event_log_info_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (printf, 2, 3))) size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (printf, 2, 3))) size_t event_log_error_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (printf, 2, 3))) size_t event_log_advice (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (printf, 2, 3))) size_t event_log_info (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (printf, 2, 3))) size_t event_log_warning (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (printf, 2, 3))) size_t event_log_error (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
#ifndef __MINGW_PRINTF_FORMAT
#define __MINGW_PRINTF_FORMAT printf
#endif
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_advice_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_info_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_error_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_advice (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_info (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_warning (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_error (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
int event_ctx_init (hashcat_ctx_t *hashcat_ctx);
void event_ctx_destroy (hashcat_ctx_t *hashcat_ctx);

@ -34,9 +34,13 @@
#define logfile_top_string(var) logfile_top_var_string (#var, (var))
#define logfile_sub_string(var) logfile_sub_var_string (#var, (var))
#ifndef __MINGW_PRINTF_FORMAT
#define __MINGW_PRINTF_FORMAT printf
#endif
void logfile_generate_topid (hashcat_ctx_t *hashcat_ctx);
void logfile_generate_subid (hashcat_ctx_t *hashcat_ctx);
void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...) __attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3)));
int logfile_init (hashcat_ctx_t *hashcat_ctx);
void logfile_destroy (hashcat_ctx_t *hashcat_ctx);

@ -7,6 +7,7 @@
#define HC_SHARED_H
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@ -24,6 +25,10 @@
#include <sys/select.h>
#endif
#ifndef __MINGW_PRINTF_FORMAT
#define __MINGW_PRINTF_FORMAT printf
#endif
int sort_by_string_sized (const void *p1, const void *p2);
int sort_by_stringptr (const void *p1, const void *p2);
@ -44,7 +49,7 @@ char *filename_from_filepath (char *filepath);
void naive_replace (char *s, const char key_char, const char replace_char);
void naive_escape (char *s, size_t s_max, const char key_char, const char escape_char);
__attribute__ ((format (printf, 2, 3))) int hc_asprintf (char **strp, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) int hc_asprintf (char **strp, const char *fmt, ...);
void setup_environment_variables (const folder_config_t *folder_config);
void setup_umask (void);

@ -138,7 +138,7 @@ static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w,
/* Declare structs and functions */
#if defined _SORT_R_BSD
#if defined _SORT_R_BSD && !defined(qsort_r)
/* Ensure qsort_r is defined */
extern void qsort_r(void *base, size_t nel, size_t width, void *thunk,

@ -750,7 +750,6 @@ CFLAGS_CROSS_WIN := $(CFLAGS)
CFLAGS_CROSS_WIN += -fPIC
CFLAGS_CROSS_WIN += -I$(WIN_ICONV)/include/
CFLAGS_CROSS_WIN += -DWITH_HWMON
CFLAGS_CROSS_WIN += -D__USE_MINGW_ANSI_STDIO=0
LFLAGS_CROSS_LINUX := $(LFLAGS)
LFLAGS_CROSS_LINUX += -lpthread

@ -7472,11 +7472,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
#if defined (__APPLE__)
char *start130 = index (device_param->opencl_driver_version, '(');
char *stop130 = index (device_param->opencl_driver_version, ')');
char *start130 = strchr (device_param->opencl_driver_version, '(');
char *stop130 = strchr (device_param->opencl_driver_version, ')');
char *start131 = index (opencl_platform_version, '(');
char *stop131 = index (opencl_platform_version, ')');
char *start131 = strchr (opencl_platform_version, '(');
char *stop131 = strchr (opencl_platform_version, ')');
// either none or one of these have a date string

@ -8,6 +8,10 @@
#include "thread.h"
#include "event.h"
#ifndef __MINGW_PRINTF_FORMAT
#define __MINGW_PRINTF_FORMAT printf
#endif
void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len)
{
event_ctx_t *event_ctx = hashcat_ctx->event_ctx;
@ -62,7 +66,7 @@ void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, cons
}
}
__attribute__ ((format (printf, 1, 0)))
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 1, 0)))
static int event_log (const char *fmt, va_list ap, char *s, const size_t sz)
{
size_t length;

Loading…
Cancel
Save