From af9de0a7b743fba52bddd4ac8e39cde260027cac Mon Sep 17 00:00:00 2001 From: jsteube Date: Tue, 11 Oct 2016 10:55:02 +0200 Subject: [PATCH] Fix some error string formats --- src/affinity.c | 6 +- src/autotune.c | 4 +- src/combinator.c | 16 ++-- src/debugfile.c | 2 +- src/dictstat.c | 8 +- src/dispatch.c | 6 +- src/folder.c | 12 +-- src/hashcat.c | 8 +- src/hashes.c | 30 ++++---- src/hwmon.c | 174 ++++++++++++++++++++++---------------------- src/induct.c | 8 +- src/interface.c | 4 +- src/logfile.c | 2 +- src/loopback.c | 2 +- src/memory.c | 6 +- src/monitor.c | 4 +- src/mpsp.c | 52 ++++++------- src/opencl.c | 106 +++++++++++++-------------- src/outfile.c | 4 +- src/outfile_check.c | 6 +- src/potfile.c | 4 +- src/restore.c | 31 ++++---- src/rp.c | 4 +- src/status.c | 16 ++-- src/stdout.c | 2 +- src/straight.c | 26 +++---- src/terminal.c | 6 +- src/user_options.c | 90 +++++++++++------------ 28 files changed, 319 insertions(+), 320 deletions(-) diff --git a/src/affinity.c b/src/affinity.c index 893ce1250..7f141a4f3 100644 --- a/src/affinity.c +++ b/src/affinity.c @@ -82,7 +82,7 @@ int set_cpu_affinity (hashcat_ctx_t *hashcat_ctx) if (cpu_id > 32) { - event_log_error (hashcat_ctx, "ERROR: Invalid cpu_id %u specified", cpu_id); + event_log_error (hashcat_ctx, "Invalid cpu_id %u specified", cpu_id); return (-1); } @@ -103,7 +103,7 @@ int set_cpu_affinity (hashcat_ctx_t *hashcat_ctx) if (SetThreadAffinityMask (GetCurrentThread (), aff_mask) == 0) { - event_log_error (hashcat_ctx, "ERROR: %s", "SetThreadAffinityMask()"); + event_log_error (hashcat_ctx, "%s", "SetThreadAffinityMask()"); return -1; } @@ -114,7 +114,7 @@ int set_cpu_affinity (hashcat_ctx_t *hashcat_ctx) if (pthread_setaffinity_np (thread, sizeof (cpu_set_t), &cpuset) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s", "pthread_setaffinity_np()"); + event_log_error (hashcat_ctx, "%s", "pthread_setaffinity_np()"); return -1; } diff --git a/src/autotune.c b/src/autotune.c index f0203345e..9ca5e8955 100644 --- a/src/autotune.c +++ b/src/autotune.c @@ -99,7 +99,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueWriteBuffer(): %s\n", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueWriteBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -113,7 +113,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueCopyBuffer(): %s\n", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueCopyBuffer(): %s", val2cstr_cl (CL_err)); return -1; } diff --git a/src/combinator.c b/src/combinator.c index 2bdbe8fa4..0db247519 100644 --- a/src/combinator.c +++ b/src/combinator.c @@ -52,14 +52,14 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) if ((fp1 = fopen (dictfile1, "rb")) == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictfile1, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictfile1, strerror (errno)); return -1; } if (stat (dictfile1, &tmp_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictfile1, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictfile1, strerror (errno)); fclose (fp1); @@ -68,7 +68,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) if (S_ISDIR (tmp_stat.st_mode)) { - event_log_error (hashcat_ctx, "ERROR: %s must be a regular file", dictfile1, strerror (errno)); + event_log_error (hashcat_ctx, "%s must be a regular file", dictfile1, strerror (errno)); fclose (fp1); @@ -77,7 +77,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) if ((fp2 = fopen (dictfile2, "rb")) == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictfile2, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictfile2, strerror (errno)); fclose (fp1); @@ -86,7 +86,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (dictfile2, &tmp_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictfile2, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictfile2, strerror (errno)); fclose (fp1); fclose (fp2); @@ -96,7 +96,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) if (S_ISDIR (tmp_stat.st_mode)) { - event_log_error (hashcat_ctx, "ERROR: %s must be a regular file", dictfile2, strerror (errno)); + event_log_error (hashcat_ctx, "%s must be a regular file", dictfile2, strerror (errno)); fclose (fp1); fclose (fp2); @@ -110,7 +110,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) if (words1_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: %s: empty file", dictfile1); + event_log_error (hashcat_ctx, "%s: empty file", dictfile1); fclose (fp1); fclose (fp2); @@ -124,7 +124,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) if (words2_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: %s: empty file", dictfile2); + event_log_error (hashcat_ctx, "%s: empty file", dictfile2); fclose (fp1); fclose (fp2); diff --git a/src/debugfile.c b/src/debugfile.c index 9f08d52fb..70614da0a 100644 --- a/src/debugfile.c +++ b/src/debugfile.c @@ -107,7 +107,7 @@ int debugfile_init (hashcat_ctx_t *hashcat_ctx) if (debugfile_ctx->fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: Could not open debug-file for writing"); + event_log_error (hashcat_ctx, "Could not open debug-file for writing"); return -1; } diff --git a/src/dictstat.c b/src/dictstat.c index f6ff41783..6948fc299 100644 --- a/src/dictstat.c +++ b/src/dictstat.c @@ -52,7 +52,7 @@ int dictstat_init (hashcat_ctx_t *hashcat_ctx) if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictstat_ctx->filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictstat_ctx->filename, strerror (errno)); return -1; } @@ -101,7 +101,7 @@ void dictstat_read (hashcat_ctx_t *hashcat_ctx) if (dictstat_ctx->cnt == MAX_DICTSTAT) { - event_log_error (hashcat_ctx, "ERROR: There are too many entries in the %s database. You have to remove/rename it.", dictstat_ctx->filename); + event_log_error (hashcat_ctx, "There are too many entries in the %s database. You have to remove/rename it.", dictstat_ctx->filename); break; } @@ -120,7 +120,7 @@ int dictstat_write (hashcat_ctx_t *hashcat_ctx) if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictstat_ctx->filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictstat_ctx->filename, strerror (errno)); return -1; } @@ -153,7 +153,7 @@ void dictstat_append (hashcat_ctx_t *hashcat_ctx, dictstat_t *d) if (dictstat_ctx->cnt == MAX_DICTSTAT) { - event_log_error (hashcat_ctx, "ERROR: There are too many entries in the %s database. You have to remove/rename it.", dictstat_ctx->filename); + event_log_error (hashcat_ctx, "There are too many entries in the %s database. You have to remove/rename it.", dictstat_ctx->filename); return; } diff --git a/src/dispatch.c b/src/dispatch.c index 65d01fcbb..701a6fe49 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -314,7 +314,7 @@ static void calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) if (fd == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictfile, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictfile, strerror (errno)); return; } @@ -331,7 +331,7 @@ static void calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) if (combs_fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", combinator_ctx->dict2, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", combinator_ctx->dict2, strerror (errno)); fclose (fd); @@ -348,7 +348,7 @@ static void calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) if (combs_fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", dictfilec, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", dictfilec, strerror (errno)); fclose (fd); diff --git a/src/folder.c b/src/folder.c index 181342a11..5c09b1e2c 100644 --- a/src/folder.c +++ b/src/folder.c @@ -241,7 +241,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins if (getcwd (cwd, HCBUFSIZ_TINY - 1) == NULL) { - event_log_error (hashcat_ctx, "ERROR: getcwd(): %s", strerror (errno)); + event_log_error (hashcat_ctx, "getcwd(): %s", strerror (errno)); return -1; } @@ -254,7 +254,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins if (exec_path == NULL) { - event_log_error (hashcat_ctx, "ERROR: get_exec_path() failed"); + event_log_error (hashcat_ctx, "get_exec_path() failed"); return -1; } @@ -268,14 +268,14 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins if (resolved_install_folder == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", resolved_install_folder, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", resolved_install_folder, strerror (errno)); return -1; } if (resolved_exec_path == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", resolved_exec_path, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", resolved_exec_path, strerror (errno)); return -1; } @@ -336,7 +336,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins if (GetFullPathName (cpath, HCBUFSIZ_TINY - 1, cpath_real, NULL) == 0) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", cpath, "GetFullPathName()"); + event_log_error (hashcat_ctx, "%s: %s", cpath, "GetFullPathName()"); return -1; } @@ -349,7 +349,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins if (realpath (cpath, cpath_real) == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", cpath, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", cpath, strerror (errno)); return -1; } diff --git a/src/hashcat.c b/src/hashcat.c index a547a4c4c..f62410354 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -200,7 +200,7 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx) if (status_ctx->words_cur > status_ctx->words_base) { - event_log_error (hashcat_ctx, "ERROR: Restore value greater keyspace"); + event_log_error (hashcat_ctx, "Restore value greater keyspace"); return -1; } @@ -490,7 +490,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx) { if (hashes->hashes_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: No hashes loaded"); + event_log_error (hashcat_ctx, "No hashes loaded"); return -1; } @@ -613,7 +613,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx) { if ((mask_ctx->masks_cnt > 1) || (straight_ctx->dicts_cnt > 1)) { - event_log_error (hashcat_ctx, "ERROR: --skip/--limit are not supported with --increment or mask files"); + event_log_error (hashcat_ctx, "--skip/--limit are not supported with --increment or mask files"); return -1; } @@ -627,7 +627,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx) { if ((mask_ctx->masks_cnt > 1) || (straight_ctx->dicts_cnt > 1)) { - event_log_error (hashcat_ctx, "ERROR: --keyspace is not supported with --increment or mask files"); + event_log_error (hashcat_ctx, "--keyspace is not supported with --increment or mask files"); return -1; } diff --git a/src/hashes.c b/src/hashes.c index 8cccb6dcc..d37f332a5 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -139,7 +139,7 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", new_hashfile, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", new_hashfile, strerror (errno)); return -1; } @@ -198,7 +198,7 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) if (rename (hashfile, old_hashfile) != 0) { - event_log_error (hashcat_ctx, "ERROR: Rename file '%s' to '%s': %s", hashfile, old_hashfile, strerror (errno)); + event_log_error (hashcat_ctx, "Rename file '%s' to '%s': %s", hashfile, old_hashfile, strerror (errno)); return -1; } @@ -207,7 +207,7 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) if (rename (new_hashfile, hashfile) != 0) { - event_log_error (hashcat_ctx, "ERROR: Rename file '%s' to '%s': %s", new_hashfile, hashfile, strerror (errno)); + event_log_error (hashcat_ctx, "Rename file '%s' to '%s': %s", new_hashfile, hashfile, strerror (errno)); return -1; } @@ -324,7 +324,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueReadBuffer(): %s\n", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueReadBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -341,7 +341,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueReadBuffer(): %s\n", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueReadBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -411,7 +411,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueWriteBuffer(): %s\n", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueWriteBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -423,7 +423,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueWriteBuffer(): %s\n", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueWriteBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -477,7 +477,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) if (stat (hashes->hashfile, &st) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", hashes->hashfile, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", hashes->hashfile, strerror (errno)); return -1; } @@ -499,7 +499,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) if ((fp = fopen (hashfile, "rb")) == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", hashfile, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", hashfile, strerror (errno)); return -1; } @@ -512,7 +512,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) if (hashes_avail == 0) { - event_log_error (hashcat_ctx, "ERROR: hashfile is empty or corrupt"); + event_log_error (hashcat_ctx, "hashfile is empty or corrupt"); fclose (fp); @@ -523,7 +523,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) if ((user_options->remove == 1) && (hashlist_format != HLFMT_HASHCAT)) { - event_log_error (hashcat_ctx, "ERROR: remove not supported in native hashfile-format mode"); + event_log_error (hashcat_ctx, "remove not supported in native hashfile-format mode"); fclose (fp); @@ -687,7 +687,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) { if (hash_len == 0) { - event_log_error (hashcat_ctx, "ERROR: hccap file not specified"); + event_log_error (hashcat_ctx, "hccap file not specified"); return -1; } @@ -700,14 +700,14 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", hash_buf, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", hash_buf, strerror (errno)); return -1; } if (hashes_avail < 1) { - event_log_error (hashcat_ctx, "ERROR: hccap file is empty or corrupt"); + event_log_error (hashcat_ctx, "hccap file is empty or corrupt"); fclose (fp); @@ -880,7 +880,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) if ((fp = fopen (hashfile, "rb")) == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", hashfile, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", hashfile, strerror (errno)); return -1; } diff --git a/src/hwmon.c b/src/hwmon.c index 55248235c..95ad3d41f 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -42,7 +42,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx) else { //if (user_options->quiet == false) - // event_log_error (hashcat_ctx, "NVML library load failed, proceed without NVML HWMon enabled."); + // event_log_error (hashcat_ctx, "NVML library load failed, proceed without NVML HWMon enabled"); return -1; } @@ -52,7 +52,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx) else { //if (user_options->quiet == false) - // event_log_error (hashcat_ctx, "NVML library load failed, proceed without NVML HWMon enabled."); + // event_log_error (hashcat_ctx, "NVML library load failed, proceed without NVML HWMon enabled"); return -1; } @@ -71,7 +71,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx) if (!nvml->lib) { //if (user_options->quiet == false) - // event_log_error (hashcat_ctx, "NVML library load failed, proceed without NVML HWMon enabled."); + // event_log_error (hashcat_ctx, "NVML library load failed, proceed without NVML HWMon enabled"); return -1; } @@ -132,7 +132,7 @@ static int hm_NVML_nvmlInit (hashcat_ctx_t *hashcat_ctx) { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlInit()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlInit(): %s", string); return -1; } @@ -152,7 +152,7 @@ static int hm_NVML_nvmlShutdown (hashcat_ctx_t *hashcat_ctx) { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlShutdown()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlShutdown(): %s", string); return -1; } @@ -172,7 +172,7 @@ static int hm_NVML_nvmlDeviceGetHandleByIndex (hashcat_ctx_t *hashcat_ctx, unsig { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetHandleByIndex()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetHandleByIndex(): %s", string); return -1; } @@ -193,7 +193,7 @@ static int hm_NVML_nvmlDeviceGetName (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t d { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetName()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetName(): %s", string); return -1; } @@ -214,7 +214,7 @@ static int hm_NVML_nvmlDeviceGetTemperature (hashcat_ctx_t *hashcat_ctx, nvmlDev { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetTemperature()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetTemperature(): %s", string); return -1; } @@ -234,7 +234,7 @@ static int hm_NVML_nvmlDeviceGetFanSpeed (hashcat_ctx_t *hashcat_ctx, nvmlDevice { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetFanSpeed()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetFanSpeed(): %s", string); return -1; } @@ -255,7 +255,7 @@ static int hm_NVML_nvmlDeviceGetPowerUsage (hashcat_ctx_t *hashcat_ctx, nvmlDevi { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetPowerUsage()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetPowerUsage(): %s", string); return -1; } @@ -276,7 +276,7 @@ static int hm_NVML_nvmlDeviceGetUtilizationRates (hashcat_ctx_t *hashcat_ctx, nv { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetUtilizationRates()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetUtilizationRates(): %s", string); return -1; } @@ -296,7 +296,7 @@ static int hm_NVML_nvmlDeviceGetClockInfo (hashcat_ctx_t *hashcat_ctx, nvmlDevic { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetClockInfo()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetClockInfo(): %s", string); return -1; } @@ -316,7 +316,7 @@ static int hm_NVML_nvmlDeviceGetTemperatureThreshold (hashcat_ctx_t *hashcat_ctx { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetTemperatureThreshold()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetTemperatureThreshold(): %s", string); return -1; } @@ -337,7 +337,7 @@ static int hm_NVML_nvmlDeviceGetCurrPcieLinkGeneration (hashcat_ctx_t *hashcat_c { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetCurrPcieLinkGeneration()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetCurrPcieLinkGeneration(): %s", string); return -1; } @@ -358,7 +358,7 @@ static int hm_NVML_nvmlDeviceGetCurrPcieLinkWidth (hashcat_ctx_t *hashcat_ctx, n { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetCurrPcieLinkWidth()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetCurrPcieLinkWidth(): %s", string); return -1; } @@ -379,7 +379,7 @@ static int hm_NVML_nvmlDeviceGetCurrentClocksThrottleReasons (hashcat_ctx_t *has { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetCurrentClocksThrottleReasons()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetCurrentClocksThrottleReasons(): %s", string); return -1; } @@ -401,7 +401,7 @@ static int hm_NVML_nvmlDeviceGetSupportedClocksThrottleReasons (hashcat_ctx_t *h { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetSupportedClocksThrottleReasons()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetSupportedClocksThrottleReasons(): %s", string); return -1; } @@ -423,7 +423,7 @@ static int hm_NVML_nvmlDeviceSetComputeMode (hashcat_ctx_t *hashcat_ctx, nvmlDev { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceSetComputeMode()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceSetComputeMode(): %s", string); return -1; } @@ -445,7 +445,7 @@ static int hm_NVML_nvmlDeviceSetGpuOperationMode (hashcat_ctx_t *hashcat_ctx, nv { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceSetGpuOperationMode()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceSetGpuOperationMode(): %s", string); return -1; } @@ -466,7 +466,7 @@ static int hm_NVML_nvmlDeviceGetPowerManagementLimitConstraints (hashcat_ctx_t * { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetPowerManagementLimitConstraints()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetPowerManagementLimitConstraints(): %s", string); return -1; } @@ -486,7 +486,7 @@ static int hm_NVML_nvmlDeviceSetPowerManagementLimit (hashcat_ctx_t *hashcat_ctx { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceSetPowerManagementLimit()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceSetPowerManagementLimit(): %s", string); return -1; } @@ -506,7 +506,7 @@ static int hm_NVML_nvmlDeviceGetPowerManagementLimit (hashcat_ctx_t *hashcat_ctx { const char *string = hm_NVML_nvmlErrorString (nvml, nvml_rc); - event_log_error (hashcat_ctx, "%s %d %s\n", "nvmlDeviceGetPowerManagementLimit()", nvml_rc, string); + event_log_error (hashcat_ctx, "nvmlDeviceGetPowerManagementLimit(): %s", string); return -1; } @@ -537,7 +537,7 @@ static int nvapi_init (hashcat_ctx_t *hashcat_ctx) if (!nvapi->lib) { //if (user_options->quiet == false) - // event_log_error (hashcat_ctx, "load NVAPI library failed, proceed without NVAPI HWMon enabled."); + // event_log_error (hashcat_ctx, "load NVAPI library failed, proceed without NVAPI HWMon enabled"); return -1; } @@ -591,7 +591,7 @@ static int hm_NvAPI_Initialize (hashcat_ctx_t *hashcat_ctx) hm_NvAPI_GetErrorMessage (nvapi, NvAPI_rc, string); - event_log_error (hashcat_ctx, "%s %d %s\n", "NvAPI_Initialize()", NvAPI_rc, string); + event_log_error (hashcat_ctx, "NvAPI_Initialize(): %s", string); return -1; } @@ -613,7 +613,7 @@ static int hm_NvAPI_Unload (hashcat_ctx_t *hashcat_ctx) hm_NvAPI_GetErrorMessage (nvapi, NvAPI_rc, string); - event_log_error (hashcat_ctx, "%s %d %s\n", "NvAPI_Unload()", NvAPI_rc, string); + event_log_error (hashcat_ctx, "NvAPI_Unload(): %s", string); return -1; } @@ -635,7 +635,7 @@ static int hm_NvAPI_EnumPhysicalGPUs (hashcat_ctx_t *hashcat_ctx, NvPhysicalGpuH hm_NvAPI_GetErrorMessage (nvapi, NvAPI_rc, string); - event_log_error (hashcat_ctx, "%s %d %s\n", "NvAPI_EnumPhysicalGPUs()", NvAPI_rc, string); + event_log_error (hashcat_ctx, "NvAPI_EnumPhysicalGPUs(): %s", string); return -1; } @@ -657,7 +657,7 @@ static int hm_NvAPI_GPU_GetPerfPoliciesInfo (hashcat_ctx_t *hashcat_ctx, NvPhysi hm_NvAPI_GetErrorMessage (nvapi, NvAPI_rc, string); - event_log_error (hashcat_ctx, "%s %d %s\n", "NvAPI_GPU_GetPerfPoliciesInfo()", NvAPI_rc, string); + event_log_error (hashcat_ctx, "NvAPI_GPU_GetPerfPoliciesInfo(): %s", string); return -1; } @@ -679,7 +679,7 @@ static int hm_NvAPI_GPU_GetPerfPoliciesStatus (hashcat_ctx_t *hashcat_ctx, NvPhy hm_NvAPI_GetErrorMessage (nvapi, NvAPI_rc, string); - event_log_error (hashcat_ctx, "%s %d %s\n", "NvAPI_GPU_GetPerfPoliciesStatus()", NvAPI_rc, string); + event_log_error (hashcat_ctx, "NvAPI_GPU_GetPerfPoliciesStatus(): %s", string); return -1; } @@ -701,7 +701,7 @@ static int hm_NvAPI_GPU_SetCoolerLevels (hashcat_ctx_t *hashcat_ctx, NvPhysicalG hm_NvAPI_GetErrorMessage (nvapi, NvAPI_rc, string); - event_log_error (hashcat_ctx, "%s %d %s\n", "NvAPI_GPU_SetCoolerLevels()", NvAPI_rc, string); + event_log_error (hashcat_ctx, "NvAPI_GPU_SetCoolerLevels(): %s", string); return -1; } @@ -723,7 +723,7 @@ static int hm_NvAPI_GPU_RestoreCoolerSettings (hashcat_ctx_t *hashcat_ctx, NvPhy hm_NvAPI_GetErrorMessage (nvapi, NvAPI_rc, string); - event_log_error (hashcat_ctx, "%s %d %s\n", "NvAPI_GPU_RestoreCoolerSettings()", NvAPI_rc, string); + event_log_error (hashcat_ctx, "NvAPI_GPU_RestoreCoolerSettings(): %s", string); return -1; } @@ -765,9 +765,8 @@ static int xnvctrl_init (hashcat_ctx_t *hashcat_ctx) if (xnvctrl->lib_x11 == NULL) { - //if (user_options->quiet == false) event_log_error (hashcat_ctx, "Failed loading the X11 library: %s", dlerror()); - //if (user_options->quiet == false) event_log_info (hashcat_ctx, " Please install libx11-dev package."); - //if (user_options->quiet == false) event_log_info (hashcat_ctx, ""); + //event_log_error (hashcat_ctx, "Failed loading the X11 library: %s", dlerror()); + //event_log_error (hashcat_ctx, "Please install libx11-dev package"); return -1; } @@ -776,9 +775,8 @@ static int xnvctrl_init (hashcat_ctx_t *hashcat_ctx) if (xnvctrl->lib_xnvctrl == NULL) { - //if (user_options->quiet == false) event_log_error (hashcat_ctx, "Failed loading the XNVCTRL library: %s", dlerror()); - //if (user_options->quiet == false) event_log_info (hashcat_ctx, " Please install libxnvctrl-dev package."); - //if (user_options->quiet == false) event_log_info (hashcat_ctx, ""); + //event_log_error (hashcat_ctx, "Failed loading the XNVCTRL library: %s", dlerror()); + //event_log_error (hashcat_ctx, "Please install libxnvctrl-dev package"); return -1; } @@ -832,7 +830,7 @@ static int hm_XNVCTRL_XOpenDisplay (hashcat_ctx_t *hashcat_ctx) if (dpy == NULL) { - event_log_error (hashcat_ctx, "%s\n", "XOpenDisplay() failed"); + event_log_error (hashcat_ctx, "XOpenDisplay() failed"); return -1; } @@ -869,7 +867,7 @@ static int hm_XNVCTRL_get_fan_control (hashcat_ctx_t *hashcat_ctx, const int gpu if (rc == false) { - event_log_error (hashcat_ctx, "%s\n", "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_COOLER_MANUAL_CONTROL) failed"); + event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_COOLER_MANUAL_CONTROL) failed"); return -1; } @@ -919,7 +917,7 @@ static int hm_XNVCTRL_get_core_threshold (hashcat_ctx_t *hashcat_ctx, const int if (rc == false) { - event_log_error (hashcat_ctx, "%s\n", "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_CORE_THRESHOLD) failed"); + event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_CORE_THRESHOLD) failed"); return -1; } @@ -942,7 +940,7 @@ static int hm_XNVCTRL_get_fan_speed_current (hashcat_ctx_t *hashcat_ctx, const i if (rc == false) { - event_log_error (hashcat_ctx, "%s\n", "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL) failed"); + event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL) failed"); return -1; } @@ -964,7 +962,7 @@ static int hm_XNVCTRL_get_fan_speed_target (hashcat_ctx_t *hashcat_ctx, const in if (rc == false) { - event_log_error (hashcat_ctx, "%s\n", "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_LEVEL) failed"); + event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_LEVEL) failed"); return -1; } @@ -1023,7 +1021,7 @@ static int adl_init (hashcat_ctx_t *hashcat_ctx) if (!adl->lib) { //if (user_options->quiet == false) - // event_log_error (hashcat_ctx, "load ADL library failed, proceed without ADL HWMon enabled."); + // event_log_error (hashcat_ctx, "load ADL library failed, proceed without ADL HWMon enabled"); return -1; } @@ -1091,7 +1089,7 @@ static int hm_ADL_Main_Control_Destroy (hashcat_ctx_t *hashcat_ctx) if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Main_Control_Destroy()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Main_Control_Destroy(): %d", ADL_rc); return -1; } @@ -1109,7 +1107,7 @@ static int hm_ADL_Main_Control_Create (hashcat_ctx_t *hashcat_ctx, ADL_MAIN_MALL if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Main_Control_Create()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Main_Control_Create(): %d", ADL_rc); return -1; } @@ -1127,7 +1125,7 @@ static int hm_ADL_Adapter_NumberOfAdapters_Get (hashcat_ctx_t *hashcat_ctx, int if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Adapter_NumberOfAdapters_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Adapter_NumberOfAdapters_Get(): %d", ADL_rc); return -1; } @@ -1145,7 +1143,7 @@ static int hm_ADL_Adapter_AdapterInfo_Get (hashcat_ctx_t *hashcat_ctx, LPAdapter if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Adapter_AdapterInfo_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Adapter_AdapterInfo_Get(): %d", ADL_rc); return -1; } @@ -1164,7 +1162,7 @@ static int hm_ADL_Display_DisplayInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdap if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Display_DisplayInfo_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Display_DisplayInfo_Get(): %d", ADL_rc); return -1; } @@ -1184,7 +1182,7 @@ static int hm_ADL_Adapter_ID_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Adapter_ID_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Adapter_ID_Get(): %d", ADL_rc); return -1; } @@ -1204,7 +1202,7 @@ static int hm_ADL_Adapter_VideoBiosInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAd if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Adapter_VideoBiosInfo_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Adapter_VideoBiosInfo_Get(): %d", ADL_rc); return -1; } @@ -1224,7 +1222,7 @@ static int hm_ADL_Overdrive_ThermalDevices_Enum (hashcat_ctx_t *hashcat_ctx, int if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_ThermalDevices_Enum()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_ThermalDevices_Enum(): %d", ADL_rc); return -1; } @@ -1243,7 +1241,7 @@ static int hm_ADL_Overdrive5_Temperature_Get (hashcat_ctx_t *hashcat_ctx, int iA if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_Temperature_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_Temperature_Get(): %d", ADL_rc); return -1; } @@ -1261,7 +1259,7 @@ static int hm_ADL_Overdrive6_Temperature_Get (hashcat_ctx_t *hashcat_ctx, int iA if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_Temperature_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_Temperature_Get(): %d", ADL_rc); return -1; } @@ -1279,7 +1277,7 @@ static int hm_ADL_Overdrive_CurrentActivity_Get (hashcat_ctx_t *hashcat_ctx, int if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_CurrentActivity_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_CurrentActivity_Get(): %d", ADL_rc); return -1; } @@ -1297,7 +1295,7 @@ static int hm_ADL_Overdrive5_FanSpeedInfo_Get (hashcat_ctx_t *hashcat_ctx, int i if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_FanSpeedInfo_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_FanSpeedInfo_Get(): %d", ADL_rc); return -1; } @@ -1315,7 +1313,7 @@ static int hm_ADL_Overdrive5_FanSpeed_Get (hashcat_ctx_t *hashcat_ctx, int iAdap if ((ADL_rc != ADL_OK) && (ADL_rc != ADL_ERR_NOT_SUPPORTED)) // exception allowed only here { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_FanSpeed_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_FanSpeed_Get(): %d", ADL_rc); return -1; } @@ -1333,7 +1331,7 @@ static int hm_ADL_Overdrive6_FanSpeed_Get (hashcat_ctx_t *hashcat_ctx, int iAdap if ((ADL_rc != ADL_OK) && (ADL_rc != ADL_ERR_NOT_SUPPORTED)) // exception allowed only here { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_FanSpeed_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_FanSpeed_Get(): %d", ADL_rc); return -1; } @@ -1351,7 +1349,7 @@ static int hm_ADL_Overdrive5_FanSpeed_Set (hashcat_ctx_t *hashcat_ctx, int iAdap if ((ADL_rc != ADL_OK) && (ADL_rc != ADL_ERR_NOT_SUPPORTED)) // exception allowed only here { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_FanSpeed_Set()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_FanSpeed_Set(): %d", ADL_rc); return -1; } @@ -1369,7 +1367,7 @@ static int hm_ADL_Overdrive6_FanSpeed_Set (hashcat_ctx_t *hashcat_ctx, int iAdap if ((ADL_rc != ADL_OK) && (ADL_rc != ADL_ERR_NOT_SUPPORTED)) // exception allowed only here { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_FanSpeed_Set()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_FanSpeed_Set(): %d", ADL_rc); return -1; } @@ -1387,7 +1385,7 @@ static int hm_ADL_Overdrive5_FanSpeedToDefault_Set (hashcat_ctx_t *hashcat_ctx, if ((ADL_rc != ADL_OK) && (ADL_rc != ADL_ERR_NOT_SUPPORTED)) // exception allowed only here { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_FanSpeedToDefault_Set()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_FanSpeedToDefault_Set(): %d", ADL_rc); return -1; } @@ -1406,7 +1404,7 @@ static int hm_ADL_Overdrive_ODParameters_Get (hashcat_ctx_t *hashcat_ctx, int iA if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_ODParameters_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_ODParameters_Get(): %d", ADL_rc); return -1; } @@ -1426,7 +1424,7 @@ static int hm_ADL_Overdrive_ODPerformanceLevels_Get (hashcat_ctx_t *hashcat_ctx, if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_ODPerformanceLevels_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_ODPerformanceLevels_Get(): %d", ADL_rc); return -1; } @@ -1446,7 +1444,7 @@ static int hm_ADL_Overdrive_ODPerformanceLevels_Set (hashcat_ctx_t *hashcat_ctx, if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive5_ODPerformanceLevels_Set()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive5_ODPerformanceLevels_Set(): %d", ADL_rc); return -1; } @@ -1465,7 +1463,7 @@ static int hm_ADL_Overdrive_PowerControlInfo_Get (hashcat_ctx_t *hashcat_ctx, in if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_PowerControlInfo_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_PowerControlInfo_Get(): %d", ADL_rc); return -1; } @@ -1485,7 +1483,7 @@ static int hm_ADL_Overdrive_PowerControl_Get (hashcat_ctx_t *hashcat_ctx, int iA if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_PowerControl_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_PowerControl_Get(): %d", ADL_rc); return -1; } @@ -1527,7 +1525,7 @@ static int hm_ADL_Overdrive_PowerControl_Set (hashcat_ctx_t *hashcat_ctx, int iA if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_PowerControl_Set()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_PowerControl_Set(): %d", ADL_rc); return -1; } @@ -1546,7 +1544,7 @@ static int hm_ADL_Adapter_Active_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIn if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Adapter_Active_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Adapter_Active_Get(): %d", ADL_rc); return -1; } @@ -1566,7 +1564,7 @@ static int hm_ADL_DisplayEnable_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterInd if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_DisplayEnable_Set()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_DisplayEnable_Set(): %d", ADL_rc); return -1; } @@ -1585,7 +1583,7 @@ static int hm_ADL_Overdrive_Caps (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive_Caps()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive_Caps(): %d", ADL_rc); return -1; } @@ -1603,7 +1601,7 @@ static int hm_ADL_Overdrive6_PowerControl_Caps (hashcat_ctx_t *hashcat_ctx, int if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_PowerControl_Caps()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_PowerControl_Caps(): %d", ADL_rc); return -1; } @@ -1621,7 +1619,7 @@ static int hm_ADL_Overdrive_Capabilities_Get (hashcat_ctx_t *hashcat_ctx, int iA if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_Capabilities_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_Capabilities_Get(): %d", ADL_rc); return -1; } @@ -1686,7 +1684,7 @@ static int hm_ADL_Overdrive_StateInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdap } else { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_StateInfo_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_StateInfo_Get(): %d", ADL_rc); return -1; } @@ -1705,7 +1703,7 @@ static int hm_ADL_Overdrive_CurrentStatus_Get (hashcat_ctx_t *hashcat_ctx, int i if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_CurrentStatus_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_CurrentStatus_Get(): %d", ADL_rc); return -1; } @@ -1760,7 +1758,7 @@ static int hm_ADL_Overdrive_State_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterI if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_State_Set()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_State_Set(): %d", ADL_rc); return -1; } @@ -1778,7 +1776,7 @@ static int hm_ADL_Overdrive6_TargetTemperatureData_Get (hashcat_ctx_t *hashcat_c if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_TargetTemperatureData_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_TargetTemperatureData_Get(): %d", ADL_rc); return -1; } @@ -1797,7 +1795,7 @@ static int hm_ADL_Overdrive6_TargetTemperatureRangeInfo_Get (hashcat_ctx_t *hash if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_TargetTemperatureRangeInfo_Get()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_TargetTemperatureRangeInfo_Get(): %d", ADL_rc); return -1; } @@ -1816,7 +1814,7 @@ static int hm_ADL_Overdrive6_FanSpeed_Reset (hashcat_ctx_t *hashcat_ctx, int iAd if (ADL_rc != ADL_OK) { - event_log_error (hashcat_ctx, "%s: %d\n", "ADL_Overdrive6_FanSpeed_Reset()", ADL_rc); + event_log_error (hashcat_ctx, "ADL_Overdrive6_FanSpeed_Reset(): %d", ADL_rc); return -1; } @@ -1834,7 +1832,7 @@ static int get_adapters_num_adl (hashcat_ctx_t *hashcat_ctx, int *iNumberAdapter if (iNumberAdapters == 0) { - event_log_error (hashcat_ctx, "No ADL adapters found."); + event_log_error (hashcat_ctx, "No ADL adapters found"); return -1; } @@ -2975,7 +2973,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if ((ADL_rc = hm_ADL_Overdrive6_PowerControl_Caps (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, &powertune_supported)) == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to get ADL PowerControl Capabilities"); + event_log_error (hashcat_ctx, "Failed to get ADL PowerControl Capabilities"); return -1; } @@ -2995,14 +2993,14 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if (ADL_rc == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to get current ADL PowerControl settings"); + event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl settings"); return -1; } if ((ADL_rc = hm_ADL_Overdrive_PowerControl_Set (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, powertune.iMaxValue)) == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to set new ADL PowerControl values"); + event_log_error (hashcat_ctx, "Failed to set new ADL PowerControl values"); return -1; } @@ -3015,7 +3013,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if ((ADL_rc = hm_ADL_Overdrive_StateInfo_Get (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, ADL_OD6_GETSTATEINFO_CUSTOM_PERFORMANCE, &hwmon_ctx->od_clock_mem_status[device_id])) == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to get ADL memory and engine clock frequency"); + event_log_error (hashcat_ctx, "Failed to get ADL memory and engine clock frequency"); return -1; } @@ -3026,7 +3024,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if ((ADL_rc = hm_ADL_Overdrive_Capabilities_Get (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, &caps)) == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to get ADL device capabilities"); + event_log_error (hashcat_ctx, "Failed to get ADL device capabilities"); return -1; } @@ -3063,7 +3061,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if ((ADL_rc = hm_ADL_Overdrive_State_Set (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, ADL_OD6_SETSTATE_PERFORMANCE, performance_state)) == -1) { - event_log_info (hashcat_ctx, "ERROR: Failed to set ADL performance state"); + event_log_info (hashcat_ctx, "Failed to set ADL performance state"); return -1; } @@ -3080,14 +3078,14 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) if ((ADL_rc = hm_ADL_Overdrive_PowerControlInfo_Get (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, &powertune)) == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to get current ADL PowerControl settings"); + event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl settings"); return -1; } if ((ADL_rc = hm_ADL_Overdrive_PowerControl_Set (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, powertune.iMaxValue)) == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to set new ADL PowerControl values"); + event_log_error (hashcat_ctx, "Failed to set new ADL PowerControl values"); return -1; } @@ -3258,7 +3256,7 @@ void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx) if ((hm_ADL_Overdrive6_PowerControl_Caps (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, &powertune_supported)) == -1) { - event_log_error (hashcat_ctx, "ERROR: Failed to get ADL PowerControl Capabilities"); + event_log_error (hashcat_ctx, "Failed to get ADL PowerControl Capabilities"); continue; } @@ -3269,7 +3267,7 @@ void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx) if ((hm_ADL_Overdrive_PowerControl_Set (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, hwmon_ctx->od_power_control_status[device_id])) == -1) { - event_log_info (hashcat_ctx, "ERROR: Failed to restore the ADL PowerControl values"); + event_log_info (hashcat_ctx, "Failed to restore the ADL PowerControl values"); continue; } @@ -3287,7 +3285,7 @@ void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx) if ((hm_ADL_Overdrive_State_Set (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, ADL_OD6_SETSTATE_PERFORMANCE, performance_state)) == -1) { - event_log_info (hashcat_ctx, "ERROR: Failed to restore ADL performance state"); + event_log_info (hashcat_ctx, "Failed to restore ADL performance state"); continue; } diff --git a/src/induct.c b/src/induct.c index 5d98a43f5..b2abf03a6 100644 --- a/src/induct.c +++ b/src/induct.c @@ -64,14 +64,14 @@ int induct_ctx_init (hashcat_ctx_t *hashcat_ctx) if (rename (root_directory, root_directory_mv) != 0) { - event_log_error (hashcat_ctx, "ERROR: Rename directory %s to %s: %s", root_directory, root_directory_mv, strerror (errno)); + event_log_error (hashcat_ctx, "Rename directory %s to %s: %s", root_directory, root_directory_mv, strerror (errno)); return -1; } } else { - event_log_error (hashcat_ctx, "ERROR: %s: %s", root_directory, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", root_directory, strerror (errno)); return -1; } @@ -79,7 +79,7 @@ int induct_ctx_init (hashcat_ctx_t *hashcat_ctx) if (hc_mkdir (root_directory, 0700) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", root_directory, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", root_directory, strerror (errno)); return -1; } @@ -142,7 +142,7 @@ void induct_ctx_destroy (hashcat_ctx_t *hashcat_ctx) } else { - event_log_error (hashcat_ctx, "ERROR: %s: %s", induct_ctx->root_directory, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", induct_ctx->root_directory, strerror (errno)); //return -1; } diff --git a/src/interface.c b/src/interface.c index 6cd957295..821fb245d 100644 --- a/src/interface.c +++ b/src/interface.c @@ -19577,7 +19577,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->dgst_pos3 = 3; break; - default: event_log_error (hashcat_ctx, "ERROR: Unknown hash-type '%u' selected", hashconfig->hash_mode); + default: event_log_error (hashcat_ctx, "Unknown hash-type '%u' selected", hashconfig->hash_mode); return -1; } @@ -19589,7 +19589,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) } else { - event_log_error (hashcat_ctx, "ERROR: Parameter hex-salt not valid for hash-type %u", hashconfig->hash_mode); + event_log_error (hashcat_ctx, "Parameter hex-salt not valid for hash-type %u", hashconfig->hash_mode); return -1; } diff --git a/src/logfile.c b/src/logfile.c index 0fc3804d9..05aff8bc6 100644 --- a/src/logfile.c +++ b/src/logfile.c @@ -90,7 +90,7 @@ int logfile_init (hashcat_ctx_t *hashcat_ctx) if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", logfile_ctx->logfile, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", logfile_ctx->logfile, strerror (errno)); return -1; } diff --git a/src/loopback.c b/src/loopback.c index afbc66941..7da270eee 100644 --- a/src/loopback.c +++ b/src/loopback.c @@ -105,7 +105,7 @@ int loopback_write_open (hashcat_ctx_t *hashcat_ctx) if (loopback_ctx->fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", loopback_ctx->filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", loopback_ctx->filename, strerror (errno)); return -1; } diff --git a/src/memory.c b/src/memory.c index e02093692..fd04c4ab7 100644 --- a/src/memory.c +++ b/src/memory.c @@ -14,7 +14,7 @@ void *hccalloc (hashcat_ctx_t *hashcat_ctx, const size_t nmemb, const size_t sz) if (p == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s", MSG_ENOMEM); + event_log_error (hashcat_ctx, "%s", MSG_ENOMEM); exit (-1); } @@ -28,7 +28,7 @@ void *hcmalloc (hashcat_ctx_t *hashcat_ctx, const size_t sz) if (p == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s", MSG_ENOMEM); + event_log_error (hashcat_ctx, "%s", MSG_ENOMEM); exit (-1); } @@ -44,7 +44,7 @@ void *hcrealloc (hashcat_ctx_t *hashcat_ctx, void *ptr, const size_t oldsz, cons if (p == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s", MSG_ENOMEM); + event_log_error (hashcat_ctx, "%s", MSG_ENOMEM); exit (-1); } diff --git a/src/monitor.c b/src/monitor.c index edfd24642..69e006daa 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -157,7 +157,7 @@ static int monitor (hashcat_ctx_t *hashcat_ctx) if (temperature > (int) user_options->gpu_temp_abort) { - event_log_error (hashcat_ctx, "ERROR: Temperature limit on GPU %d reached, aborting...", device_id + 1); + event_log_error (hashcat_ctx, "Temperature limit on GPU %d reached, aborting...", device_id + 1); myabort (hashcat_ctx); @@ -271,7 +271,7 @@ static int monitor (hashcat_ctx_t *hashcat_ctx) { if (user_options->benchmark == false) { - if (user_options->quiet == false) event_log_info (hashcat_ctx, "\nNOTE: Runtime limit reached, aborting...\n"); + if (user_options->quiet == false) event_log_info (hashcat_ctx, "NOTE: Runtime limit reached, aborting..."); } myabort (hashcat_ctx); diff --git a/src/mpsp.c b/src/mpsp.c index 8ac698b9b..800fcfb5c 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -167,7 +167,7 @@ static int mp_css_to_uniq_tbl (hashcat_ctx_t *hashcat_ctx, u32 css_cnt, cs_t *cs if (css_cnt > SP_PW_MAX) { - event_log_error (hashcat_ctx, "ERROR: Mask length is too long"); + event_log_error (hashcat_ctx, "Mask length is too long"); return -1; } @@ -259,16 +259,16 @@ static int mp_expand (hashcat_ctx_t *hashcat_ctx, char *in_buf, size_t in_len, c break; case 'b': mp_add_cs_buf (hashcat_ctx, mp_sys[5].cs_buf, mp_sys[5].cs_len, mp_usr, mp_usr_offset); break; - case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 1 is undefined"); return -1; } + case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 1 is undefined"); return -1; } mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, mp_usr, mp_usr_offset); break; - case '2': if (mp_usr[1].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 2 is undefined"); return -1; } + case '2': if (mp_usr[1].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 2 is undefined"); return -1; } mp_add_cs_buf (hashcat_ctx, mp_usr[1].cs_buf, mp_usr[1].cs_len, mp_usr, mp_usr_offset); break; - case '3': if (mp_usr[2].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 3 is undefined"); return -1; } + case '3': if (mp_usr[2].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 3 is undefined"); return -1; } mp_add_cs_buf (hashcat_ctx, mp_usr[2].cs_buf, mp_usr[2].cs_len, mp_usr, mp_usr_offset); break; - case '4': if (mp_usr[3].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 4 is undefined"); return -1; } + case '4': if (mp_usr[3].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 4 is undefined"); return -1; } mp_add_cs_buf (hashcat_ctx, mp_usr[3].cs_buf, mp_usr[3].cs_len, mp_usr, mp_usr_offset); break; case '?': mp_add_cs_buf (hashcat_ctx, &p0, 1, mp_usr, mp_usr_offset); @@ -285,7 +285,7 @@ static int mp_expand (hashcat_ctx_t *hashcat_ctx, char *in_buf, size_t in_len, c if (in_pos == in_len) { - event_log_error (hashcat_ctx, "ERROR: The hex-charset option always expects couples of exactly 2 hexadecimal chars, failed mask: %s", in_buf); + event_log_error (hashcat_ctx, "The hex-charset option always expects couples of exactly 2 hexadecimal chars, failed mask: %s", in_buf); return -1; } @@ -294,7 +294,7 @@ static int mp_expand (hashcat_ctx_t *hashcat_ctx, char *in_buf, size_t in_len, c if ((is_valid_hex_char ((u8) p0) == false) || (is_valid_hex_char ((u8) p1) == false)) { - event_log_error (hashcat_ctx, "ERROR: Invalid hex character detected in mask %s", in_buf); + event_log_error (hashcat_ctx, "Invalid hex character detected in mask %s", in_buf); return -1; } @@ -355,21 +355,21 @@ static cs_t *mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask break; case 'b': mp_add_cs_buf (hashcat_ctx, mp_sys[5].cs_buf, mp_sys[5].cs_len, css, css_pos); break; - case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 1 is undefined\n"); return NULL; } + case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 1 is undefined"); return NULL; } mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, css, css_pos); break; - case '2': if (mp_usr[1].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 2 is undefined\n"); return NULL; } + case '2': if (mp_usr[1].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 2 is undefined"); return NULL; } mp_add_cs_buf (hashcat_ctx, mp_usr[1].cs_buf, mp_usr[1].cs_len, css, css_pos); break; - case '3': if (mp_usr[2].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 3 is undefined\n"); return NULL; } + case '3': if (mp_usr[2].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 3 is undefined"); return NULL; } mp_add_cs_buf (hashcat_ctx, mp_usr[2].cs_buf, mp_usr[2].cs_len, css, css_pos); break; - case '4': if (mp_usr[3].cs_len == 0) { event_log_error (hashcat_ctx, "ERROR: Custom-charset 4 is undefined\n"); return NULL; } + case '4': if (mp_usr[3].cs_len == 0) { event_log_error (hashcat_ctx, "Custom-charset 4 is undefined"); return NULL; } mp_add_cs_buf (hashcat_ctx, mp_usr[3].cs_buf, mp_usr[3].cs_len, css, css_pos); break; case '?': mp_add_cs_buf (hashcat_ctx, &chr, 1, css, css_pos); break; - default: event_log_error (hashcat_ctx, "ERROR: Syntax error: %s", mask_buf); + default: event_log_error (hashcat_ctx, "Syntax error: %s", mask_buf); return NULL; } } @@ -383,7 +383,7 @@ static cs_t *mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask if (mask_pos == mask_len) { - event_log_error (hashcat_ctx, "ERROR: The hex-charset option always expects couples of exactly 2 hexadecimal chars, failed mask: %s", mask_buf); + event_log_error (hashcat_ctx, "The hex-charset option always expects couples of exactly 2 hexadecimal chars, failed mask: %s", mask_buf); return NULL; } @@ -394,7 +394,7 @@ static cs_t *mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask if ((is_valid_hex_char ((u8) p0) == false) || (is_valid_hex_char ((u8) p1) == false)) { - event_log_error (hashcat_ctx, "ERROR: Invalid hex character detected in mask %s", mask_buf); + event_log_error (hashcat_ctx, "Invalid hex character detected in mask %s", mask_buf); return NULL; } @@ -417,7 +417,7 @@ static cs_t *mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask if (css_pos == 0) { - event_log_error (hashcat_ctx, "ERROR: Invalid mask length (0)"); + event_log_error (hashcat_ctx, "Invalid mask length (0)"); return NULL; } @@ -461,7 +461,7 @@ static char *mp_get_truncated_mask (hashcat_ctx_t *hashcat_ctx, const char *mask if (mask_pos == mask_len) { - event_log_error (hashcat_ctx, "ERROR: The hex-charset option always expects couples of exactly 2 hexadecimal chars, failed mask: %s", mask_buf); + event_log_error (hashcat_ctx, "The hex-charset option always expects couples of exactly 2 hexadecimal chars, failed mask: %s", mask_buf); return NULL; } @@ -472,7 +472,7 @@ static char *mp_get_truncated_mask (hashcat_ctx_t *hashcat_ctx, const char *mask if ((is_valid_hex_char ((u8) p0) == false) || (is_valid_hex_char ((u8) p1) == false)) { - event_log_error (hashcat_ctx, "ERROR: Invalid hex character detected in mask: %s", mask_buf); + event_log_error (hashcat_ctx, "Invalid hex character detected in mask: %s", mask_buf); return NULL; } @@ -1136,7 +1136,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (arg, &file_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", arg, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", arg, strerror (errno)); return -1; } @@ -1147,7 +1147,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) if (mask_fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", arg, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", arg, strerror (errno)); return -1; } @@ -1171,7 +1171,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) } else { - event_log_error (hashcat_ctx, "ERROR: %s: unsupported file-type", arg); + event_log_error (hashcat_ctx, "%s: unsupported file-type", arg); return -1; } @@ -1216,7 +1216,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) if (mask_fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", arg, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", arg, strerror (errno)); return -1; } @@ -1240,7 +1240,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) } else { - event_log_error (hashcat_ctx, "ERROR: %s: unsupported file-type", arg); + event_log_error (hashcat_ctx, "%s: unsupported file-type", arg); return -1; } @@ -1270,7 +1270,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) if (mask_fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", arg, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", arg, strerror (errno)); return -1; } @@ -1294,7 +1294,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) } else { - event_log_error (hashcat_ctx, "ERROR: %s: unsupported file-type", arg); + event_log_error (hashcat_ctx, "%s: unsupported file-type", arg); return -1; } @@ -1303,7 +1303,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) if (mask_ctx->masks_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: Invalid mask"); + event_log_error (hashcat_ctx, "Invalid mask"); return -1; } @@ -1390,7 +1390,7 @@ int mask_ctx_parse_maskfile (hashcat_ctx_t *hashcat_ctx) if (mf_cnt >= MAX_MFS) { - event_log_error (hashcat_ctx, "ERROR: Invalid line '%s' in maskfile", mask_buf); + event_log_error (hashcat_ctx, "Invalid line '%s' in maskfile", mask_buf); return -1; } diff --git a/src/opencl.c b/src/opencl.c index a8abf5efb..de78d8c6b 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -114,7 +114,7 @@ static int setup_opencl_platforms_filter (hashcat_ctx_t *hashcat_ctx, const char if (platform < 1 || platform > 32) { - event_log_error (hashcat_ctx, "ERROR: Invalid OpenCL platform %u specified", platform); + event_log_error (hashcat_ctx, "Invalid OpenCL platform %u specified", platform); return -1; } @@ -151,7 +151,7 @@ static int setup_devices_filter (hashcat_ctx_t *hashcat_ctx, const char *opencl_ if (device_id < 1 || device_id > 32) { - event_log_error (hashcat_ctx, "ERROR: Invalid device_id %u specified", device_id); + event_log_error (hashcat_ctx, "Invalid device_id %u specified", device_id); return -1; } @@ -188,7 +188,7 @@ static int setup_device_types_filter (hashcat_ctx_t *hashcat_ctx, const char *op if (device_type < 1 || device_type > 3) { - event_log_error (hashcat_ctx, "ERROR: Invalid device_type %u specified", device_type); + event_log_error (hashcat_ctx, "Invalid device_type %u specified", device_type); return -1; } @@ -230,7 +230,7 @@ static int read_kernel_binary (hashcat_ctx_t *hashcat_ctx, const char *kernel_fi if (num_read != (size_t) st.st_size) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", kernel_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", kernel_file, strerror (errno)); return -1; } @@ -248,7 +248,7 @@ static int read_kernel_binary (hashcat_ctx_t *hashcat_ctx, const char *kernel_fi } else { - event_log_error (hashcat_ctx, "ERROR: %s: %s", kernel_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", kernel_file, strerror (errno)); return -1; } @@ -264,7 +264,7 @@ static int write_kernel_binary (hashcat_ctx_t *hashcat_ctx, char *kernel_file, c if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", kernel_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", kernel_file, strerror (errno)); return -1; } @@ -382,7 +382,7 @@ int hc_clEnqueueNDRangeKernel (hashcat_ctx_t *hashcat_ctx, cl_command_queue comm if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueNDRangeKernel(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueNDRangeKernel(): %s", val2cstr_cl (CL_err)); return -1; } @@ -400,7 +400,7 @@ int hc_clGetEventInfo (hashcat_ctx_t *hashcat_ctx, cl_event event, cl_event_info if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetEventInfo(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetEventInfo(): %s", val2cstr_cl (CL_err)); return -1; } @@ -418,7 +418,7 @@ int hc_clFlush (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue) if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clFlush(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clFlush(): %s", val2cstr_cl (CL_err)); return -1; } @@ -436,7 +436,7 @@ int hc_clFinish (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue) if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clFinish(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clFinish(): %s", val2cstr_cl (CL_err)); return -1; } @@ -454,7 +454,7 @@ int hc_clSetKernelArg (hashcat_ctx_t *hashcat_ctx, cl_kernel kernel, cl_uint arg if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clSetKernelArg(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clSetKernelArg(): %s", val2cstr_cl (CL_err)); return -1; } @@ -472,7 +472,7 @@ int hc_clEnqueueWriteBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue comman if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueWriteBuffer(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueWriteBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -490,7 +490,7 @@ int hc_clEnqueueCopyBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue command if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueCopyBuffer(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueCopyBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -508,7 +508,7 @@ int hc_clEnqueueReadBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue command if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueReadBuffer(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueReadBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -526,7 +526,7 @@ int hc_clGetPlatformIDs (hashcat_ctx_t *hashcat_ctx, cl_uint num_entries, cl_pla if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetPlatformIDs(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetPlatformIDs(): %s", val2cstr_cl (CL_err)); return -1; } @@ -544,7 +544,7 @@ int hc_clGetPlatformInfo (hashcat_ctx_t *hashcat_ctx, cl_platform_id platform, c if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetPlatformInfo(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetPlatformInfo(): %s", val2cstr_cl (CL_err)); return -1; } @@ -562,7 +562,7 @@ int hc_clGetDeviceIDs (hashcat_ctx_t *hashcat_ctx, cl_platform_id platform, cl_d if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetDeviceIDs(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetDeviceIDs(): %s", val2cstr_cl (CL_err)); return -1; } @@ -580,7 +580,7 @@ int hc_clGetDeviceInfo (hashcat_ctx_t *hashcat_ctx, cl_device_id device, cl_devi if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetDeviceInfo(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetDeviceInfo(): %s", val2cstr_cl (CL_err)); return -1; } @@ -600,7 +600,7 @@ int hc_clCreateContext (hashcat_ctx_t *hashcat_ctx, cl_context_properties *prope if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clCreateContext(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clCreateContext(): %s", val2cstr_cl (CL_err)); return -1; } @@ -620,7 +620,7 @@ int hc_clCreateCommandQueue (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_ if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clCreateCommandQueue(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clCreateCommandQueue(): %s", val2cstr_cl (CL_err)); return -1; } @@ -640,7 +640,7 @@ int hc_clCreateBuffer (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_mem_fl if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clCreateBuffer(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clCreateBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -660,7 +660,7 @@ int hc_clCreateProgramWithSource (hashcat_ctx_t *hashcat_ctx, cl_context context if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clCreateProgramWithSource(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clCreateProgramWithSource(): %s", val2cstr_cl (CL_err)); return -1; } @@ -680,7 +680,7 @@ int hc_clCreateProgramWithBinary (hashcat_ctx_t *hashcat_ctx, cl_context context if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clCreateProgramWithBinary(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clCreateProgramWithBinary(): %s", val2cstr_cl (CL_err)); return -1; } @@ -698,7 +698,7 @@ int hc_clBuildProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint n if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clBuildProgram(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clBuildProgram(): %s", val2cstr_cl (CL_err)); return -1; } @@ -718,7 +718,7 @@ int hc_clCreateKernel (hashcat_ctx_t *hashcat_ctx, cl_program program, const cha if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clCreateKernel(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clCreateKernel(): %s", val2cstr_cl (CL_err)); return -1; } @@ -736,7 +736,7 @@ int hc_clReleaseMemObject (hashcat_ctx_t *hashcat_ctx, cl_mem mem) if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clReleaseMemObject(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clReleaseMemObject(): %s", val2cstr_cl (CL_err)); return -1; } @@ -754,7 +754,7 @@ int hc_clReleaseKernel (hashcat_ctx_t *hashcat_ctx, cl_kernel kernel) if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clReleaseKernel(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clReleaseKernel(): %s", val2cstr_cl (CL_err)); return -1; } @@ -772,7 +772,7 @@ int hc_clReleaseProgram (hashcat_ctx_t *hashcat_ctx, cl_program program) if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clReleaseProgram(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clReleaseProgram(): %s", val2cstr_cl (CL_err)); return -1; } @@ -790,7 +790,7 @@ int hc_clReleaseCommandQueue (hashcat_ctx_t *hashcat_ctx, cl_command_queue comma if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clReleaseCommandQueue(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clReleaseCommandQueue(): %s", val2cstr_cl (CL_err)); return -1; } @@ -808,7 +808,7 @@ int hc_clReleaseContext (hashcat_ctx_t *hashcat_ctx, cl_context context) if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clReleaseContext(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clReleaseContext(): %s", val2cstr_cl (CL_err)); return -1; } @@ -828,7 +828,7 @@ int hc_clEnqueueMapBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_ if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueMapBuffer(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueMapBuffer(): %s", val2cstr_cl (CL_err)); return -1; } @@ -846,7 +846,7 @@ int hc_clEnqueueUnmapMemObject (hashcat_ctx_t *hashcat_ctx, cl_command_queue com if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clEnqueueUnmapMemObject(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clEnqueueUnmapMemObject(): %s", val2cstr_cl (CL_err)); return -1; } @@ -864,7 +864,7 @@ int hc_clGetKernelWorkGroupInfo (hashcat_ctx_t *hashcat_ctx, cl_kernel kernel, c if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetKernelWorkGroupInfo(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetKernelWorkGroupInfo(): %s", val2cstr_cl (CL_err)); return -1; } @@ -882,7 +882,7 @@ int hc_clGetProgramBuildInfo (hashcat_ctx_t *hashcat_ctx, cl_program program, cl if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetProgramBuildInfo(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetProgramBuildInfo(): %s", val2cstr_cl (CL_err)); return -1; } @@ -900,7 +900,7 @@ int hc_clGetProgramInfo (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_prog if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetProgramInfo(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetProgramInfo(): %s", val2cstr_cl (CL_err)); return -1; } @@ -918,7 +918,7 @@ int hc_clWaitForEvents (hashcat_ctx_t *hashcat_ctx, cl_uint num_events, const cl if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clWaitForEvents(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clWaitForEvents(): %s", val2cstr_cl (CL_err)); return -1; } @@ -936,7 +936,7 @@ int hc_clGetEventProfilingInfo (hashcat_ctx_t *hashcat_ctx, cl_event event, cl_p if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clGetEventProfilingInfo(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clGetEventProfilingInfo(): %s", val2cstr_cl (CL_err)); return -1; } @@ -954,7 +954,7 @@ int hc_clReleaseEvent (hashcat_ctx_t *hashcat_ctx, cl_event event) if (CL_err != CL_SUCCESS) { - event_log_error (hashcat_ctx, "ERROR: clReleaseEvent(): %s", val2cstr_cl (CL_err)); + event_log_error (hashcat_ctx, "clReleaseEvent(): %s", val2cstr_cl (CL_err)); return -1; } @@ -1970,7 +1970,7 @@ int opencl_ctx_init (hashcat_ctx_t *hashcat_ctx) if (opencl_platforms_filter > platform_cnt_mask) { - event_log_error (hashcat_ctx, "ERROR: The platform selected by the --opencl-platforms parameter is larger than the number of available platforms (%d)", platforms_cnt); + event_log_error (hashcat_ctx, "The platform selected by the --opencl-platforms parameter is larger than the number of available platforms (%d)", platforms_cnt); return -1; } @@ -2148,7 +2148,7 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) if (CL_err != CL_SUCCESS) { - //event_log_error (hashcat_ctx, "ERROR: clGetDeviceIDs(): %s", val2cstr_cl (CL_err)); + //event_log_error (hashcat_ctx, "clGetDeviceIDs(): %s", val2cstr_cl (CL_err)); //return -1; @@ -2774,7 +2774,7 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) if (devices_active == 0) { - event_log_error (hashcat_ctx, "ERROR: No devices found/left"); + event_log_error (hashcat_ctx, "No devices found/left"); return -1; } @@ -2787,7 +2787,7 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) if (opencl_ctx->devices_filter > devices_cnt_mask) { - event_log_error (hashcat_ctx, "ERROR: The device specified by the --opencl-devices parameter is larger than the number of available devices (%d)", devices_cnt); + event_log_error (hashcat_ctx, "The device specified by the --opencl-devices parameter is larger than the number of available devices (%d)", devices_cnt); return -1; } @@ -3156,7 +3156,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) || (hashes->salts_buf[i].scrypt_r != scrypt_r) || (hashes->salts_buf[i].scrypt_p != scrypt_p)) { - event_log_error (hashcat_ctx, "ERROR: Mixed scrypt settings not supported"); + event_log_error (hashcat_ctx, "Mixed scrypt settings not supported"); return -1; } @@ -3217,14 +3217,14 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if ((size_scrypt / 4) > device_param->device_maxmem_alloc) { - event_log_info (hashcat_ctx, "WARNING: Not enough single-block device memory allocatable to use --scrypt-tmto %d, increasing...", tmto); + event_log_info (hashcat_ctx, "Not enough single-block device memory allocatable to use --scrypt-tmto %d, increasing...", tmto); continue; } if (size_scrypt > device_param->device_global_mem) { - event_log_info (hashcat_ctx, "WARNING: Not enough total device memory allocatable to use --scrypt-tmto %d, increasing...", tmto); + event_log_info (hashcat_ctx, "Not enough total device memory allocatable to use --scrypt-tmto %d, increasing...", tmto); continue; } @@ -3239,7 +3239,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (tmto == tmto_stop) { - event_log_error (hashcat_ctx, "ERROR: Can't allocate enough device memory"); + event_log_error (hashcat_ctx, "Can't allocate enough device memory"); return -1; } @@ -3372,7 +3372,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (chdir (folder_config->cpath_real) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", folder_config->cpath_real, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", folder_config->cpath_real, strerror (errno)); return -1; } @@ -3416,7 +3416,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (fd == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: fopen(): %s", files_names[i], strerror (errno)); + event_log_error (hashcat_ctx, "%s: fopen(): %s", files_names[i], strerror (errno)); return -1; } @@ -3427,7 +3427,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (n != 1) { - event_log_error (hashcat_ctx, "ERROR: %s: fread(): %s", files_names[i], strerror (errno)); + event_log_error (hashcat_ctx, "%s: fread(): %s", files_names[i], strerror (errno)); return -1; } @@ -3468,7 +3468,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (stat (source_file, &sst) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", source_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", source_file, strerror (errno)); return -1; } @@ -3672,7 +3672,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (stat (source_file, &sst) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", source_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", source_file, strerror (errno)); return -1; } @@ -3813,7 +3813,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (stat (source_file, &sst) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", source_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", source_file, strerror (errno)); return -1; } @@ -3936,7 +3936,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) if (chdir (folder_config->cwd) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", folder_config->cwd, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", folder_config->cwd, strerror (errno)); return -1; } diff --git a/src/outfile.c b/src/outfile.c index 85f250749..29f13cacd 100644 --- a/src/outfile.c +++ b/src/outfile.c @@ -300,7 +300,7 @@ int outfile_write_open (hashcat_ctx_t *hashcat_ctx) if (outfile_ctx->fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", outfile_ctx->filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", outfile_ctx->filename, strerror (errno)); return -1; } @@ -487,7 +487,7 @@ int outfile_and_hashfile (hashcat_ctx_t *hashcat_ctx) if (memcmp (&tmpstat_outfile, &tmpstat_hashfile, sizeof (hc_stat)) == 0) { - event_log_error (hashcat_ctx, "ERROR: Hashfile and Outfile are not allowed to point to the same file"); + event_log_error (hashcat_ctx, "Hashfile and Outfile are not allowed to point to the same file"); return -1; } diff --git a/src/outfile_check.c b/src/outfile_check.c index 37b0a7e5c..d4abf49a0 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -356,7 +356,7 @@ int outcheck_ctx_init (hashcat_ctx_t *hashcat_ctx) if (is_dir == 0) { - event_log_error (hashcat_ctx, "ERROR: Directory specified in outfile-check '%s' is not a valid directory", outcheck_ctx->root_directory); + event_log_error (hashcat_ctx, "Directory specified in outfile-check '%s' is not a valid directory", outcheck_ctx->root_directory); return -1; } @@ -365,7 +365,7 @@ int outcheck_ctx_init (hashcat_ctx_t *hashcat_ctx) { if (hc_mkdir (outcheck_ctx->root_directory, 0700) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", outcheck_ctx->root_directory, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", outcheck_ctx->root_directory, strerror (errno)); return -1; } @@ -394,7 +394,7 @@ void outcheck_ctx_destroy (hashcat_ctx_t *hashcat_ctx) } else { - event_log_error (hashcat_ctx, "ERROR: %s: %s", outcheck_ctx->root_directory, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", outcheck_ctx->root_directory, strerror (errno)); //return -1; } diff --git a/src/potfile.c b/src/potfile.c index 797977a6f..39f5d40e9 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -250,7 +250,7 @@ int potfile_read_open (hashcat_ctx_t *hashcat_ctx) if (potfile_ctx->fp == NULL) { - //log_error ("ERROR: %s: %s", potfile_ctx->filename, strerror (errno)); + //log_error ("%s: %s", potfile_ctx->filename, strerror (errno)); return -1; } @@ -389,7 +389,7 @@ int potfile_write_open (hashcat_ctx_t *hashcat_ctx) if (potfile_ctx->fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", potfile_ctx->filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", potfile_ctx->filename, strerror (errno)); return -1; } diff --git a/src/restore.c b/src/restore.c index 0f708a934..08a89458c 100644 --- a/src/restore.c +++ b/src/restore.c @@ -68,7 +68,7 @@ static int check_running_process (hashcat_ctx_t *hashcat_ctx) if (nread != 1) { - event_log_error (hashcat_ctx, "ERROR: Cannot read %s", eff_restore_file); + event_log_error (hashcat_ctx, "Cannot read %s", eff_restore_file); return -1; } @@ -104,7 +104,7 @@ static int check_running_process (hashcat_ctx_t *hashcat_ctx) if (strcmp (argv0_r, pidbin_r) == 0) { - event_log_error (hashcat_ctx, "ERROR: Already an instance %s running on pid %d", pidbin, rd->pid); + event_log_error (hashcat_ctx, "Already an instance %s running on pid %d", pidbin, rd->pid); return -1; } @@ -127,7 +127,7 @@ static int check_running_process (hashcat_ctx_t *hashcat_ctx) { if (strcmp (pidbin, pidbin2) == 0) { - event_log_error (hashcat_ctx, "ERROR: Already an instance %s running on pid %d", pidbin2, rd->pid); + event_log_error (hashcat_ctx, "Already an instance %s running on pid %d", pidbin2, rd->pid); return -1; } @@ -142,7 +142,7 @@ static int check_running_process (hashcat_ctx_t *hashcat_ctx) if (rd->version < RESTORE_VERSION_MIN) { - event_log_error (hashcat_ctx, "ERROR: Cannot use outdated %s. Please remove it.", eff_restore_file); + event_log_error (hashcat_ctx, "Cannot use outdated %s. Please remove it.", eff_restore_file); return -1; } @@ -177,7 +177,7 @@ static int init_restore (hashcat_ctx_t *hashcat_ctx) if (getcwd (rd->cwd, 255) == NULL) { - event_log_error (hashcat_ctx, "ERROR: getcwd(): %s", strerror (errno)); + event_log_error (hashcat_ctx, "getcwd(): %s", strerror (errno)); return -1; } @@ -197,7 +197,7 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx) if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: Restore file '%s': %s", eff_restore_file, strerror (errno)); + event_log_error (hashcat_ctx, "Restore file '%s': %s", eff_restore_file, strerror (errno)); return -1; } @@ -206,7 +206,7 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx) if (fread (rd, sizeof (restore_data_t), 1, fp) != 1) { - event_log_error (hashcat_ctx, "ERROR: Can't read %s", eff_restore_file); + event_log_error (hashcat_ctx, "Can't read %s", eff_restore_file); return -1; } @@ -219,7 +219,7 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx) { if (fgets (buf, HCBUFSIZ_LARGE - 1, fp) == NULL) { - event_log_error (hashcat_ctx, "ERROR: Can't read %s", eff_restore_file); + event_log_error (hashcat_ctx, "Can't read %s", eff_restore_file); return -1; } @@ -239,10 +239,11 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx) if (chdir (rd->cwd)) { - event_log_error (hashcat_ctx, "ERROR: The directory '%s' does not exist. It is needed to restore (--restore) the session.\n" - " You could either create this directory (or link it) or update the .restore file using e.g. the analyze_hc_restore.pl tool:\n" - " https://github.com/philsmd/analyze_hc_restore\n" - " The directory must be relative to (or contain) all files/folders mentioned within the command line.", rd->cwd); + event_log_error (hashcat_ctx, + "The directory '%s' does not exist. It is needed to restore (--restore) the session.\n" + "You could either create this directory or update the .restore file using e.g. the analyze_hc_restore.pl tool:\n" + "https://github.com/philsmd/analyze_hc_restore\n" + "The directory must contain all files and folders mentioned within the command line.", rd->cwd); return -1; } @@ -268,14 +269,14 @@ static int write_restore (hashcat_ctx_t *hashcat_ctx) if (fp == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", new_restore_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", new_restore_file, strerror (errno)); return -1; } if (setvbuf (fp, NULL, _IONBF, 0)) { - event_log_error (hashcat_ctx, "ERROR: setvbuf file '%s': %s", new_restore_file, strerror (errno)); + event_log_error (hashcat_ctx, "setvbuf file '%s': %s", new_restore_file, strerror (errno)); return -1; } @@ -434,7 +435,7 @@ int restore_ctx_init (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) if (rd->version < RESTORE_VERSION_MIN) { - event_log_error (hashcat_ctx, "ERROR: Incompatible restore-file version"); + event_log_error (hashcat_ctx, "Incompatible restore-file version"); return -1; } diff --git a/src/rp.c b/src/rp.c index 61b47ed5d..b9b84a199 100644 --- a/src/rp.c +++ b/src/rp.c @@ -756,7 +756,7 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32 if ((fp = fopen (rp_file, "rb")) == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", rp_file, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", rp_file, strerror (errno)); return -1; } @@ -860,7 +860,7 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32 if (kernel_rules_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: No valid rules left"); + event_log_error (hashcat_ctx, "No valid rules left"); return -1; } diff --git a/src/status.c b/src/status.c index 40b152b4a..28d981a85 100644 --- a/src/status.c +++ b/src/status.c @@ -159,14 +159,14 @@ void status_display_machine_readable (hashcat_ctx_t *hashcat_ctx) if (status_ctx->devices_status == STATUS_INIT) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during initialization phase"); + event_log_error (hashcat_ctx, "status view is not available during initialization phase"); return; } if (status_ctx->devices_status == STATUS_AUTOTUNE) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during autotune phase"); + event_log_error (hashcat_ctx, "status view is not available during autotune phase"); return; } @@ -326,14 +326,14 @@ void status_display (hashcat_ctx_t *hashcat_ctx) if (status_ctx->devices_status == STATUS_INIT) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during initialization phase"); + event_log_error (hashcat_ctx, "status view is not available during initialization phase"); return; } if (status_ctx->devices_status == STATUS_AUTOTUNE) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during autotune phase"); + event_log_error (hashcat_ctx, "status view is not available during autotune phase"); return; } @@ -1184,14 +1184,14 @@ void status_benchmark_automate (hashcat_ctx_t *hashcat_ctx) if (status_ctx->devices_status == STATUS_INIT) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during initialization phase"); + event_log_error (hashcat_ctx, "status view is not available during initialization phase"); return; } if (status_ctx->devices_status == STATUS_AUTOTUNE) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during autotune phase"); + event_log_error (hashcat_ctx, "status view is not available during autotune phase"); return; } @@ -1243,14 +1243,14 @@ void status_benchmark (hashcat_ctx_t *hashcat_ctx) if (status_ctx->devices_status == STATUS_INIT) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during initialization phase"); + event_log_error (hashcat_ctx, "status view is not available during initialization phase"); return; } if (status_ctx->devices_status == STATUS_AUTOTUNE) { - event_log_error (hashcat_ctx, "ERROR: status view is not available during autotune phase"); + event_log_error (hashcat_ctx, "status view is not available during autotune phase"); return; } diff --git a/src/stdout.c b/src/stdout.c index 96d668e7c..a5f7a37ec 100644 --- a/src/stdout.c +++ b/src/stdout.c @@ -62,7 +62,7 @@ int process_stdout (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, } else { - event_log_error (hashcat_ctx, "ERROR: %s: %s", filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", filename, strerror (errno)); out.fp = stdout; } diff --git a/src/straight.c b/src/straight.c index 97132d7ca..a9a2609a5 100644 --- a/src/straight.c +++ b/src/straight.c @@ -71,7 +71,7 @@ int straight_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) if (fd2 == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", straight_ctx->dict, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", straight_ctx->dict, strerror (errno)); return -1; } @@ -99,7 +99,7 @@ int straight_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) if (fd2 == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", combinator_ctx->dict1, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", combinator_ctx->dict1, strerror (errno)); return -1; } @@ -114,7 +114,7 @@ int straight_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) if (fd2 == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", combinator_ctx->dict2, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", combinator_ctx->dict2, strerror (errno)); return -1; } @@ -153,7 +153,7 @@ int straight_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) if (fd2 == NULL) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", straight_ctx->dict, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", straight_ctx->dict, strerror (errno)); return -1; } @@ -274,7 +274,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (l0_filename, &l0_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", l0_filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", l0_filename, strerror (errno)); return -1; } @@ -297,7 +297,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (l1_filename, &l1_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", l1_filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", l1_filename, strerror (errno)); return -1; } @@ -319,7 +319,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (straight_ctx->dicts_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: No usable dictionary file found."); + event_log_error (hashcat_ctx, "No usable dictionary file found."); return -1; } @@ -343,7 +343,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (l0_filename, &l0_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", l0_filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", l0_filename, strerror (errno)); return -1; } @@ -366,7 +366,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (l1_filename, &l1_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", l1_filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", l1_filename, strerror (errno)); return -1; } @@ -388,7 +388,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (straight_ctx->dicts_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: No usable dictionary file found."); + event_log_error (hashcat_ctx, "No usable dictionary file found."); return -1; } @@ -403,7 +403,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (l0_filename, &l0_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", l0_filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", l0_filename, strerror (errno)); return -1; } @@ -426,7 +426,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (stat (l1_filename, &l1_stat) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", l1_filename, strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", l1_filename, strerror (errno)); return -1; } @@ -448,7 +448,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) if (straight_ctx->dicts_cnt == 0) { - event_log_error (hashcat_ctx, "ERROR: No usable dictionary file found."); + event_log_error (hashcat_ctx, "No usable dictionary file found."); return -1; } diff --git a/src/terminal.c b/src/terminal.c index e8505166b..09b084045 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -70,21 +70,21 @@ int setup_console (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx) if (_setmode (_fileno (stdin), _O_BINARY) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", "stdin", strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", "stdin", strerror (errno)); return -1; } if (_setmode (_fileno (stdout), _O_BINARY) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", "stdout", strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", "stdout", strerror (errno)); return -1; } if (_setmode (_fileno (stderr), _O_BINARY) == -1) { - event_log_error (hashcat_ctx, "ERROR: %s: %s", "stderr", strerror (errno)); + event_log_error (hashcat_ctx, "%s: %s", "stderr", strerror (errno)); return -1; } diff --git a/src/user_options.c b/src/user_options.c index af4271028..9c4ef6549 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -320,7 +320,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) default: { - event_log_error (hashcat_ctx, "ERROR: Invalid argument specified"); + event_log_error (hashcat_ctx, "Invalid argument specified"); return -1; } @@ -329,7 +329,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) if (optopt != 0) { - event_log_error (hashcat_ctx, "ERROR: Invalid argument specified"); + event_log_error (hashcat_ctx, "Invalid argument specified"); return -1; } @@ -348,14 +348,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->hc_argc < 0) { - event_log_error (hashcat_ctx, "ERROR: hc_argc %d is invalid", user_options->hc_argc); + event_log_error (hashcat_ctx, "hc_argc %d is invalid", user_options->hc_argc); return -1; } if (user_options->hc_argv == NULL) { - event_log_error (hashcat_ctx, "ERROR: hc_argv is NULL"); + event_log_error (hashcat_ctx, "hc_argv is NULL"); return -1; } @@ -367,21 +367,21 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) && (user_options->attack_mode != ATTACK_MODE_HYBRID2) && (user_options->attack_mode != ATTACK_MODE_NONE)) { - event_log_error (hashcat_ctx, "ERROR: Invalid attack-mode specified"); + event_log_error (hashcat_ctx, "Invalid attack-mode specified"); return -1; } if (user_options->runtime_chgd == true && user_options->runtime == 0) { - event_log_error (hashcat_ctx, "ERROR: Invalid runtime specified"); + event_log_error (hashcat_ctx, "Invalid runtime specified"); return -1; } if (user_options->hash_mode > 14100) { - event_log_error (hashcat_ctx, "ERROR: Invalid hash-type specified"); + event_log_error (hashcat_ctx, "Invalid hash-type specified"); return -1; } @@ -393,7 +393,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) || ((user_options->hash_mode >= 6200) && (user_options->hash_mode <= 6299)) || ((user_options->hash_mode >= 13700) && (user_options->hash_mode <= 13799))) { - event_log_error (hashcat_ctx, "ERROR: Mixing support for user names and hashes of type %s is not supported", strhashtype (user_options->hash_mode)); + event_log_error (hashcat_ctx, "Mixing support for user names and hashes of type %s is not supported", strhashtype (user_options->hash_mode)); return -1; } @@ -401,7 +401,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->outfile_format > 16) { - event_log_error (hashcat_ctx, "ERROR: Invalid outfile-format specified"); + event_log_error (hashcat_ctx, "Invalid outfile-format specified"); return -1; } @@ -410,7 +410,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->outfile_format_chgd == true) { - event_log_error (hashcat_ctx, "ERROR: Mixing outfile-format > 1 with left parameter is not allowed"); + event_log_error (hashcat_ctx, "Mixing outfile-format > 1 with left parameter is not allowed"); return -1; } @@ -420,7 +420,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->outfile_format_chgd == true) { - event_log_error (hashcat_ctx, "ERROR: Mixing outfile-format > 7 with show parameter is not allowed"); + event_log_error (hashcat_ctx, "Mixing outfile-format > 7 with show parameter is not allowed"); return -1; } @@ -428,49 +428,49 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->increment_min < INCREMENT_MIN) { - event_log_error (hashcat_ctx, "ERROR: Invalid increment-min specified"); + event_log_error (hashcat_ctx, "Invalid increment-min specified"); return -1; } if (user_options->increment_max > INCREMENT_MAX) { - event_log_error (hashcat_ctx, "ERROR: Invalid increment-max specified"); + event_log_error (hashcat_ctx, "Invalid increment-max specified"); return -1; } if (user_options->increment_min > user_options->increment_max) { - event_log_error (hashcat_ctx, "ERROR: Invalid increment-min specified"); + event_log_error (hashcat_ctx, "Invalid increment-min specified"); return -1; } if ((user_options->increment == true) && (user_options->attack_mode == ATTACK_MODE_STRAIGHT)) { - event_log_error (hashcat_ctx, "ERROR: Increment is not allowed in attack-mode 0"); + event_log_error (hashcat_ctx, "Increment is not allowed in attack-mode 0"); return -1; } if ((user_options->increment == false) && (user_options->increment_min_chgd == true)) { - event_log_error (hashcat_ctx, "ERROR: Increment-min is only supported combined with increment switch"); + event_log_error (hashcat_ctx, "Increment-min is only supported combined with increment switch"); return -1; } if ((user_options->increment == false) && (user_options->increment_max_chgd == true)) { - event_log_error (hashcat_ctx, "ERROR: Increment-max is only supported combined with increment switch"); + event_log_error (hashcat_ctx, "Increment-max is only supported combined with increment switch"); return -1; } if (user_options->rp_files_cnt > 0 && user_options->rp_gen == true) { - event_log_error (hashcat_ctx, "ERROR: Use of both rules-file and rules-generate is not supported"); + event_log_error (hashcat_ctx, "Use of both rules-file and rules-generate is not supported"); return -1; } @@ -479,7 +479,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) { - event_log_error (hashcat_ctx, "ERROR: Use of rules-file or rules-generate only allowed in attack-mode 0"); + event_log_error (hashcat_ctx, "Use of rules-file or rules-generate only allowed in attack-mode 0"); return -1; } @@ -487,14 +487,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->bitmap_min > user_options->bitmap_max) { - event_log_error (hashcat_ctx, "ERROR: Invalid bitmap-min specified"); + event_log_error (hashcat_ctx, "Invalid bitmap-min specified"); return -1; } if (user_options->rp_gen_func_min > user_options->rp_gen_func_max) { - event_log_error (hashcat_ctx, "ERROR: Invalid rp-gen-func-min specified"); + event_log_error (hashcat_ctx, "Invalid rp-gen-func-min specified"); return -1; } @@ -513,14 +513,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->kernel_accel < 1) { - event_log_error (hashcat_ctx, "ERROR: Invalid kernel-accel specified"); + event_log_error (hashcat_ctx, "Invalid kernel-accel specified"); return -1; } if (user_options->kernel_accel > 1024) { - event_log_error (hashcat_ctx, "ERROR: Invalid kernel-accel specified"); + event_log_error (hashcat_ctx, "Invalid kernel-accel specified"); return -1; } @@ -540,14 +540,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->kernel_loops < 1) { - event_log_error (hashcat_ctx, "ERROR: Invalid kernel-loops specified"); + event_log_error (hashcat_ctx, "Invalid kernel-loops specified"); return -1; } if (user_options->kernel_loops > 1024) { - event_log_error (hashcat_ctx, "ERROR: Invalid kernel-loops specified"); + event_log_error (hashcat_ctx, "Invalid kernel-loops specified"); return -1; } @@ -555,7 +555,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if ((user_options->workload_profile < 1) || (user_options->workload_profile > 4)) { - event_log_error (hashcat_ctx, "ERROR: workload-profile %i not available", user_options->workload_profile); + event_log_error (hashcat_ctx, "workload-profile %i not available", user_options->workload_profile); return -1; } @@ -564,7 +564,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (is_power_of_2 (user_options->opencl_vector_width) == false || user_options->opencl_vector_width > 16) { - event_log_error (hashcat_ctx, "ERROR: opencl-vector-width %i not allowed", user_options->opencl_vector_width); + event_log_error (hashcat_ctx, "opencl-vector-width %i not allowed", user_options->opencl_vector_width); return -1; } @@ -574,14 +574,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->remove == true) { - event_log_error (hashcat_ctx, "ERROR: Mixing remove parameter not allowed with show parameter or left parameter"); + event_log_error (hashcat_ctx, "Mixing remove parameter not allowed with show parameter or left parameter"); return -1; } if (user_options->potfile_disable == true) { - event_log_error (hashcat_ctx, "ERROR: Mixing potfile-disable parameter not allowed with show parameter or left parameter"); + event_log_error (hashcat_ctx, "Mixing potfile-disable parameter not allowed with show parameter or left parameter"); return -1; } @@ -591,7 +591,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->outfile_autohex == false) { - event_log_error (hashcat_ctx, "ERROR: Mixing outfile-autohex-disable parameter not allowed with show parameter"); + event_log_error (hashcat_ctx, "Mixing outfile-autohex-disable parameter not allowed with show parameter"); return -1; } @@ -601,13 +601,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->show == true) { - event_log_error (hashcat_ctx, "ERROR: Combining show parameter with keyspace parameter is not allowed"); + event_log_error (hashcat_ctx, "Combining show parameter with keyspace parameter is not allowed"); return -1; } else if (user_options->left == true) { - event_log_error (hashcat_ctx, "ERROR: Combining left parameter with keyspace parameter is not allowed"); + event_log_error (hashcat_ctx, "Combining left parameter with keyspace parameter is not allowed"); return -1; } @@ -617,14 +617,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->remove == false) { - event_log_error (hashcat_ctx, "ERROR: Parameter remove-timer require parameter remove enabled"); + event_log_error (hashcat_ctx, "Parameter remove-timer require parameter remove enabled"); return -1; } if (user_options->remove_timer < 1) { - event_log_error (hashcat_ctx, "ERROR: Parameter remove-timer must have a value greater than or equal to 1"); + event_log_error (hashcat_ctx, "Parameter remove-timer must have a value greater than or equal to 1"); return -1; } @@ -636,14 +636,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if ((user_options->rp_files_cnt == 0) && (user_options->rp_gen == 0)) { - event_log_error (hashcat_ctx, "ERROR: Parameter loopback not allowed without rules-file or rules-generate"); + event_log_error (hashcat_ctx, "Parameter loopback not allowed without rules-file or rules-generate"); return -1; } } else { - event_log_error (hashcat_ctx, "ERROR: Parameter loopback allowed in attack-mode 0 only"); + event_log_error (hashcat_ctx, "Parameter loopback allowed in attack-mode 0 only"); return -1; } @@ -654,14 +654,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) { - event_log_error (hashcat_ctx, "ERROR: Parameter debug-mode option is only available with attack-mode 0"); + event_log_error (hashcat_ctx, "Parameter debug-mode option is only available with attack-mode 0"); return -1; } if ((user_options->rp_files_cnt == 0) && (user_options->rp_gen == 0)) { - event_log_error (hashcat_ctx, "ERROR: Parameter debug-mode not allowed without rules-file or rules-generate"); + event_log_error (hashcat_ctx, "Parameter debug-mode not allowed without rules-file or rules-generate"); return -1; } @@ -669,7 +669,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->debug_mode > 4) { - event_log_error (hashcat_ctx, "ERROR: Invalid debug-mode specified"); + event_log_error (hashcat_ctx, "Invalid debug-mode specified"); return -1; } @@ -678,7 +678,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->debug_mode < 1) { - event_log_error (hashcat_ctx, "ERROR: Parameter debug-file requires parameter debug-mode to be set"); + event_log_error (hashcat_ctx, "Parameter debug-file requires parameter debug-mode to be set"); return -1; } @@ -688,7 +688,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->attack_mode == ATTACK_MODE_BF) { - event_log_error (hashcat_ctx, "ERROR: Parameter induction-dir not allowed with brute-force attacks"); + event_log_error (hashcat_ctx, "Parameter induction-dir not allowed with brute-force attacks"); return -1; } @@ -698,7 +698,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if ((user_options->weak_hash_threshold != WEAK_HASH_THRESHOLD) && (user_options->weak_hash_threshold != 0)) { - event_log_error (hashcat_ctx, "ERROR: setting --weak-hash-threshold allowed only in straight-attack mode"); + event_log_error (hashcat_ctx, "setting --weak-hash-threshold allowed only in straight-attack mode"); return -1; } @@ -706,7 +706,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) if (user_options->nvidia_spin_damp > 100) { - event_log_error (hashcat_ctx, "ERROR: setting --nvidia-spin-damp must be between 0 and 100 (inclusive)"); + event_log_error (hashcat_ctx, "setting --nvidia-spin-damp must be between 0 and 100 (inclusive)"); return -1; } @@ -715,7 +715,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->gpu_temp_abort < user_options->gpu_temp_retain) { - event_log_error (hashcat_ctx, "ERROR: Invalid values for gpu-temp-abort. Parameter gpu-temp-abort is less than gpu-temp-retain."); + event_log_error (hashcat_ctx, "Invalid values for gpu-temp-abort. Parameter gpu-temp-abort is less than gpu-temp-retain."); return -1; } @@ -727,7 +727,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) { if (user_options->attack_mode != ATTACK_MODE_BF) { - event_log_error (hashcat_ctx, "ERROR: Only attack-mode 3 allowed in benchmark mode"); + event_log_error (hashcat_ctx, "Only attack-mode 3 allowed in benchmark mode"); return -1; }