1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-24 23:48:39 +00:00

Merge pull request #1215 from roycewilliams/master

more event_log_* standardization
This commit is contained in:
Jens Steube 2017-04-02 15:53:46 +02:00 committed by GitHub
commit 418341b585
17 changed files with 227 additions and 225 deletions

View File

@ -86,7 +86,7 @@ int set_cpu_affinity (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx)
if (cpu_id > 32) if (cpu_id > 32)
{ {
event_log_error (hashcat_ctx, "Invalid cpu_id %d specified", cpu_id); event_log_error (hashcat_ctx, "Invalid cpu_id %d specified.", cpu_id);
hcfree (devices); hcfree (devices);
@ -109,7 +109,7 @@ int set_cpu_affinity (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx)
if (SetThreadAffinityMask (GetCurrentThread (), aff_mask) == 0) if (SetThreadAffinityMask (GetCurrentThread (), aff_mask) == 0)
{ {
event_log_error (hashcat_ctx, "%s", "SetThreadAffinityMask()"); event_log_error (hashcat_ctx, "%s", "SetThreadAffinityMask().");
return -1; return -1;
} }
@ -120,7 +120,7 @@ int set_cpu_affinity (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx)
if (pthread_setaffinity_np (thread, sizeof (cpu_set_t), &cpuset) == -1) if (pthread_setaffinity_np (thread, sizeof (cpu_set_t), &cpuset) == -1)
{ {
event_log_error (hashcat_ctx, "%s", "pthread_setaffinity_np()"); event_log_error (hashcat_ctx, "%s", "pthread_setaffinity_np().");
return -1; return -1;
} }

View File

@ -49,14 +49,14 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (hc_path_is_file (dictfile1) == false) if (hc_path_is_file (dictfile1) == false)
{ {
event_log_error (hashcat_ctx, "%s: Not a regular file", dictfile1); event_log_error (hashcat_ctx, "%s: Not a regular file.", dictfile1);
return -1; return -1;
} }
if (hc_path_is_file (dictfile2) == false) if (hc_path_is_file (dictfile2) == false)
{ {
event_log_error (hashcat_ctx, "%s: Not a regular file", dictfile2); event_log_error (hashcat_ctx, "%s: Not a regular file.", dictfile2);
return -1; return -1;
} }
@ -98,7 +98,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (words1_cnt == 0) if (words1_cnt == 0)
{ {
event_log_error (hashcat_ctx, "%s: empty file", dictfile1); event_log_error (hashcat_ctx, "%s: empty file.", dictfile1);
fclose (fp1); fclose (fp1);
fclose (fp2); fclose (fp2);
@ -124,7 +124,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (words2_cnt == 0) if (words2_cnt == 0)
{ {
event_log_error (hashcat_ctx, "%s: empty file", dictfile2); event_log_error (hashcat_ctx, "%s: empty file.", dictfile2);
fclose (fp1); fclose (fp1);
fclose (fp2); fclose (fp2);

View File

@ -110,7 +110,7 @@ int debugfile_init (hashcat_ctx_t *hashcat_ctx)
if (fp == NULL) if (fp == NULL)
{ {
event_log_error (hashcat_ctx, "Could not open debug-file for writing"); event_log_error (hashcat_ctx, "Could not open --debug-file file for writing.");
return -1; return -1;
} }

View File

@ -295,7 +295,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
if (rc == -1) if (rc == -1)
{ {
event_log_error (hashcat_ctx, "get_exec_path() failed"); event_log_error (hashcat_ctx, "get_exec_path() failed.");
hcfree (cwd); hcfree (cwd);
@ -399,10 +399,10 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
hcfree (exec_path); hcfree (exec_path);
/** /**
* There's alot of problem related to bad support -I parameters when building the kernel. * There are a lot of problems related to bad support of -I parameters when building the kernel.
* Each OpenCL runtime handles it slightly different. * Each OpenCL runtime handles it slightly differently.
* The most problematic is with new AMD drivers on Windows, which can not handle quote characters! * The most problematic is with new AMD drivers on Windows, which cannot handle quote characters!
* The best workaround found so far is to modify the TMP variable (only inside hashcat process) before the runtime is load * The best workaround found so far is to modify the TMP variable (only inside hashcat process) before the runtime is loaded.
*/ */
char *cpath; char *cpath;
@ -415,7 +415,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) if (GetFullPathName (cpath, HCBUFSIZ_TINY - 1, cpath_real, NULL) == 0)
{ {
event_log_error (hashcat_ctx, "%s: %s", cpath, "GetFullPathName()"); event_log_error (hashcat_ctx, "%s: %s", cpath, "GetFullPathName().");
hcfree (cwd); hcfree (cwd);

View File

@ -138,7 +138,7 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
if (status_ctx->words_off > status_ctx->words_base) if (status_ctx->words_off > status_ctx->words_base)
{ {
event_log_error (hashcat_ctx, "Restore value greater keyspace"); event_log_error (hashcat_ctx, "Restore value greater keyspace.");
return -1; return -1;
} }
@ -424,7 +424,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
{ {
if (hashes->hashes_cnt == 0) if (hashes->hashes_cnt == 0)
{ {
event_log_error (hashcat_ctx, "No hashes loaded"); event_log_error (hashcat_ctx, "No hashes loaded.");
return -1; return -1;
} }
@ -593,7 +593,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
{ {
if ((mask_ctx->masks_cnt > 1) || (straight_ctx->dicts_cnt > 1)) if ((mask_ctx->masks_cnt > 1) || (straight_ctx->dicts_cnt > 1))
{ {
event_log_error (hashcat_ctx, "--skip/--limit are not supported with --increment or mask files"); event_log_error (hashcat_ctx, "Use of --skip/--limit is not supported with --increment or mask files.");
return -1; return -1;
} }
@ -607,7 +607,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
{ {
if ((mask_ctx->masks_cnt > 1) || (straight_ctx->dicts_cnt > 1)) if ((mask_ctx->masks_cnt > 1) || (straight_ctx->dicts_cnt > 1))
{ {
event_log_error (hashcat_ctx, "--keyspace is not supported with --increment or mask files"); event_log_error (hashcat_ctx, "Use of --keyspace is not supported with --increment or mask files.");
return -1; return -1;
} }
@ -672,7 +672,7 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
if (device_param == NULL) if (device_param == NULL)
{ {
event_log_error (hashcat_ctx, "No device found for weak-hash-check"); event_log_error (hashcat_ctx, "No device found for weak-hash check.");
return -1; return -1;
} }

View File

@ -485,7 +485,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (rc == 1) if (rc == 1)
{ {
event_log_error (hashcat_ctx, "%s: Old hccap file format detected! You need to update: https://hashcat.net/forum/thread-6273.html", hashes->hashfile); event_log_error (hashcat_ctx, "%s: Old hccap format detected! You need to update: https://hashcat.net/q/hccapx", hashes->hashfile);
return -1; return -1;
} }
@ -536,7 +536,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (hashes_avail == 0) if (hashes_avail == 0)
{ {
event_log_error (hashcat_ctx, "hashfile is empty or corrupt"); event_log_error (hashcat_ctx, "hashfile is empty or corrupt.");
fclose (fp); fclose (fp);
@ -547,7 +547,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if ((user_options->remove == true) && (hashlist_format != HLFMT_HASHCAT)) if ((user_options->remove == true) && (hashlist_format != HLFMT_HASHCAT))
{ {
event_log_error (hashcat_ctx, "remove not supported in native hashfile-format mode"); event_log_error (hashcat_ctx, "Use of --remove is not supported in native hashfile-format mode.");
fclose (fp); fclose (fp);
@ -705,7 +705,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (hash_fmt_error) if (hash_fmt_error)
{ {
event_log_warning (hashcat_ctx, "Failed to parse hashes using the '%s' format", strhlfmt (hashlist_format)); event_log_warning (hashcat_ctx, "Failed to parse hashes using the '%s' format.", strhlfmt (hashlist_format));
} }
else else
{ {
@ -758,7 +758,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (hashes_avail == hashes_cnt) if (hashes_avail == hashes_cnt)
{ {
event_log_warning (hashcat_ctx, "Hashfile '%s': File changed during runtime, skipping new data", hash_buf); event_log_warning (hashcat_ctx, "Hashfile '%s': File changed during runtime. Skipping new data.", hash_buf);
break; break;
} }
@ -924,7 +924,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (hashes_avail == hashes_cnt) if (hashes_avail == hashes_cnt)
{ {
event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u: File changed during runtime, skipping new data", hashes->hashfile, line_num); event_log_warning (hashcat_ctx, "Hashfile '%s' on line %u: File changed during runtime. Skipping new data.", hashes->hashfile, line_num);
break; break;
} }
@ -941,7 +941,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
if (hash_fmt_error) if (hash_fmt_error)
{ {
event_log_warning (hashcat_ctx, "failed to parse hashes using the '%s' format", strhlfmt (hashlist_format)); event_log_warning (hashcat_ctx, "Failed to parse hashes using the '%s' format.", strhlfmt (hashlist_format));
continue; continue;
} }

View File

@ -66,7 +66,7 @@ static char *hm_SYSFS_get_syspath_hwmon (hashcat_ctx_t *hashcat_ctx, const int d
if (syspath == NULL) if (syspath == NULL)
{ {
event_log_error (hashcat_ctx, "hm_SYSFS_get_syspath_device() failed"); event_log_error (hashcat_ctx, "hm_SYSFS_get_syspath_device() failed.");
return NULL; return NULL;
} }
@ -79,7 +79,7 @@ static char *hm_SYSFS_get_syspath_hwmon (hashcat_ctx_t *hashcat_ctx, const int d
if (hwmonN == NULL) if (hwmonN == NULL)
{ {
event_log_error (hashcat_ctx, "first_file_in_directory() failed"); event_log_error (hashcat_ctx, "First_file_in_directory() failed.");
hcfree (syspath); hcfree (syspath);
@ -130,7 +130,7 @@ static int hm_SYSFS_get_fan_speed_current (hashcat_ctx_t *hashcat_ctx, const int
{ {
fclose (fd_cur); fclose (fd_cur);
event_log_error (hashcat_ctx, "%s: unexpected data", path_cur); event_log_error (hashcat_ctx, "%s: unexpected data.", path_cur);
hcfree (path_cur); hcfree (path_cur);
hcfree (path_max); hcfree (path_max);
@ -158,7 +158,7 @@ static int hm_SYSFS_get_fan_speed_current (hashcat_ctx_t *hashcat_ctx, const int
{ {
fclose (fd_max); fclose (fd_max);
event_log_error (hashcat_ctx, "%s: unexpected data", path_max); event_log_error (hashcat_ctx, "%s: unexpected data.", path_max);
hcfree (path_cur); hcfree (path_cur);
hcfree (path_max); hcfree (path_max);
@ -170,7 +170,7 @@ static int hm_SYSFS_get_fan_speed_current (hashcat_ctx_t *hashcat_ctx, const int
if (pwm1_max == 0) if (pwm1_max == 0)
{ {
event_log_error (hashcat_ctx, "%s: pwm1_max can not be 0", path_max); event_log_error (hashcat_ctx, "%s: pwm1_max cannot be 0.", path_max);
hcfree (path_cur); hcfree (path_cur);
hcfree (path_max); hcfree (path_max);
@ -254,7 +254,7 @@ static int hm_SYSFS_set_fan_speed_target (hashcat_ctx_t *hashcat_ctx, const int
{ {
fclose (fd_max); fclose (fd_max);
event_log_error (hashcat_ctx, "%s: unexpected data", path_max); event_log_error (hashcat_ctx, "%s: unexpected data.", path_max);
hcfree (path); hcfree (path);
hcfree (path_max); hcfree (path_max);
@ -266,7 +266,7 @@ static int hm_SYSFS_set_fan_speed_target (hashcat_ctx_t *hashcat_ctx, const int
if (pwm1_max == 0) if (pwm1_max == 0)
{ {
event_log_error (hashcat_ctx, "%s: pwm1_max can not be 0", path_max); event_log_error (hashcat_ctx, "%s: pwm1_max cannot be 0.", path_max);
hcfree (path); hcfree (path);
hcfree (path_max); hcfree (path_max);
@ -327,7 +327,7 @@ static int hm_SYSFS_get_temperature_current (hashcat_ctx_t *hashcat_ctx, const i
{ {
fclose (fd); fclose (fd);
event_log_error (hashcat_ctx, "%s: unexpected data", path); event_log_error (hashcat_ctx, "%s: unexpected data.", path);
hcfree (path); hcfree (path);
@ -573,7 +573,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx)
else else
{ {
//if (user_options->quiet == false) //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. Proceeding without NVML HWMon enabled.");
return -1; return -1;
} }
@ -583,7 +583,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx)
else else
{ {
//if (user_options->quiet == false) //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. Proceeding without NVML HWMon enabled.");
return -1; return -1;
} }
@ -606,7 +606,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx)
if (nvml_lib == NULL) if (nvml_lib == NULL)
{ {
//if (user_options->quiet == false) //if (user_options->quiet == false)
// event_log_error (hashcat_ctx, "NVML library load failed: %m, proceed without NVML HWMon enabled"); // event_log_error (hashcat_ctx, "NVML library load failed: %m. Proceeding without NVML HWMon enabled.");
return -1; return -1;
} }
@ -630,7 +630,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx)
else else
{ {
//if (user_options->quiet == false) //if (user_options->quiet == false)
// event_log_error (hashcat_ctx, "Could not find NVML in the system, proceed without NVML HWMon enabled"); // event_log_error (hashcat_ctx, "Could not find NVML on this system. Proceeding without NVML HWMon enabled.");
return -1; return -1;
} }
@ -647,7 +647,7 @@ static int nvml_init (hashcat_ctx_t *hashcat_ctx)
if (!nvml->lib) if (!nvml->lib)
{ {
//if (user_options->quiet == false) //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. Proceeding without NVML HWMon enabled.");
return -1; return -1;
} }
@ -1169,7 +1169,7 @@ static int nvapi_init (hashcat_ctx_t *hashcat_ctx)
if (!nvapi->lib) if (!nvapi->lib)
{ {
//if (user_options->quiet == false) //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 of NVAPI library failed. Proceeding without NVAPI HWMon enabled.");
return -1; return -1;
} }
@ -1426,8 +1426,8 @@ static int xnvctrl_init (hashcat_ctx_t *hashcat_ctx)
if (xnvctrl->lib_x11 == NULL) if (xnvctrl->lib_x11 == NULL)
{ {
//event_log_error (hashcat_ctx, "Failed loading the X11 library: %s", dlerror()); //event_log_error (hashcat_ctx, "Failed to load the X11 library: %s", dlerror());
//event_log_error (hashcat_ctx, "Please install libx11-dev package"); //event_log_error (hashcat_ctx, "Please install the libx11-dev package.");
return -1; return -1;
} }
@ -1436,8 +1436,8 @@ static int xnvctrl_init (hashcat_ctx_t *hashcat_ctx)
if (xnvctrl->lib_xnvctrl == NULL) if (xnvctrl->lib_xnvctrl == NULL)
{ {
//event_log_error (hashcat_ctx, "Failed loading the XNVCTRL library: %s", dlerror()); //event_log_error (hashcat_ctx, "Failed to load the XNVCTRL library: %s", dlerror());
//event_log_error (hashcat_ctx, "Please install libxnvctrl-dev package"); //event_log_error (hashcat_ctx, "Please install the libxnvctrl-dev package.");
return -1; return -1;
} }
@ -1492,7 +1492,7 @@ static int hm_XNVCTRL_XOpenDisplay (hashcat_ctx_t *hashcat_ctx)
if (dpy == NULL) if (dpy == NULL)
{ {
event_log_error (hashcat_ctx, "XOpenDisplay() failed"); event_log_error (hashcat_ctx, "XOpenDisplay() failed.");
return -1; return -1;
} }
@ -1529,7 +1529,7 @@ static int hm_XNVCTRL_query_target_count (hashcat_ctx_t *hashcat_ctx, int *val)
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetCount() failed"); event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetCount() failed.");
return -1; return -1;
} }
@ -1551,12 +1551,13 @@ static int hm_XNVCTRL_get_fan_control (hashcat_ctx_t *hashcat_ctx, const int gpu
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute() failed"); event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute() failed.");
// help the user to fix the problem // help the user to fix the problem
event_log_warning (hashcat_ctx, "This error typically occurs when you did not setup NVidia Coolbits."); event_log_warning (hashcat_ctx, "This error typically occurs when you did not set up NVidia Coolbits.");
event_log_warning (hashcat_ctx, "Run the following command to fix: sudo nvidia-xconfig --cool-bits=12"); event_log_warning (hashcat_ctx, "To fix, run this command:");
event_log_warning (hashcat_ctx, " sudo nvidia-xconfig --cool-bits=12");
event_log_warning (hashcat_ctx, "Do not forget to restart X afterwards."); event_log_warning (hashcat_ctx, "Do not forget to restart X afterwards.");
event_log_warning (hashcat_ctx, NULL); event_log_warning (hashcat_ctx, NULL);
@ -1608,7 +1609,7 @@ static int hm_XNVCTRL_get_core_threshold (hashcat_ctx_t *hashcat_ctx, const int
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_CORE_THRESHOLD) failed"); event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_CORE_THRESHOLD) failed.");
return -1; return -1;
} }
@ -1632,7 +1633,7 @@ static int hm_XNVCTRL_get_fan_speed_current (hashcat_ctx_t *hashcat_ctx, const i
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL) failed"); event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_CURRENT_LEVEL) failed.");
return -1; return -1;
} }
@ -1655,7 +1656,7 @@ static int hm_XNVCTRL_get_fan_speed_target (hashcat_ctx_t *hashcat_ctx, const in
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_LEVEL) failed"); event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_THERMAL_COOLER_LEVEL) failed.");
return -1; return -1;
} }
@ -1704,7 +1705,7 @@ static int hm_XNVCTRL_get_pci_bus (hashcat_ctx_t *hashcat_ctx, const int gpu, in
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_PCI_BUS) failed"); event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_PCI_BUS) failed.");
return -1; return -1;
} }
@ -1726,7 +1727,7 @@ static int hm_XNVCTRL_get_pci_device (hashcat_ctx_t *hashcat_ctx, const int gpu,
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_PCI_DEVICE) failed"); event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_PCI_DEVICE) failed.");
return -1; return -1;
} }
@ -1748,7 +1749,7 @@ static int hm_XNVCTRL_get_pci_function (hashcat_ctx_t *hashcat_ctx, const int gp
if (rc == false) if (rc == false)
{ {
event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_PCI_FUNCTION) failed"); event_log_error (hashcat_ctx, "%s", "XNVCTRLQueryTargetAttribute(NV_CTRL_PCI_FUNCTION) failed.");
return -1; return -1;
} }
@ -1787,7 +1788,7 @@ static int adl_init (hashcat_ctx_t *hashcat_ctx)
if (!adl->lib) if (!adl->lib)
{ {
//if (user_options->quiet == false) //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 of ADL library failed. Proceeding without ADL HWMon enabled.");
return -1; return -1;
} }
@ -2117,21 +2118,21 @@ static int hm_ADL_Overdrive_PowerControl_Set (hashcat_ctx_t *hashcat_ctx, int iA
if (level < min || level > max) if (level < min || level > max)
{ {
event_log_error (hashcat_ctx, "ADL PowerControl level invalid"); event_log_error (hashcat_ctx, "ADL PowerControl level invalid.");
return -1; return -1;
} }
if (step == 0) if (step == 0)
{ {
event_log_error (hashcat_ctx, "ADL PowerControl step invalid"); event_log_error (hashcat_ctx, "ADL PowerControl step invalid.");
return -1; return -1;
} }
if (level % step != 0) if (level % step != 0)
{ {
event_log_error (hashcat_ctx, "ADL PowerControl step invalid"); event_log_error (hashcat_ctx, "ADL PowerControl step invalid.");
return -1; return -1;
} }
@ -2223,7 +2224,7 @@ static int hm_ADL_Overdrive_StateInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdap
if (state->state.aLevels[0].iEngineClock % caps.sEngineClockRange.iStep != 0) if (state->state.aLevels[0].iEngineClock % caps.sEngineClockRange.iStep != 0)
{ {
event_log_error (hashcat_ctx, "ADL engine step size invalid for performance level 1"); event_log_error (hashcat_ctx, "ADL engine step size invalid for performance level 1.");
//state->state.aLevels[0].iEngineClock -= state->state.aLevels[0].iEngineClock % caps.sEngineClockRange.iStep; //state->state.aLevels[0].iEngineClock -= state->state.aLevels[0].iEngineClock % caps.sEngineClockRange.iStep;
@ -2232,7 +2233,7 @@ static int hm_ADL_Overdrive_StateInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdap
if (state->state.aLevels[1].iEngineClock % caps.sEngineClockRange.iStep != 0) if (state->state.aLevels[1].iEngineClock % caps.sEngineClockRange.iStep != 0)
{ {
event_log_error (hashcat_ctx, "ADL engine step size invalid for performance level 2"); event_log_error (hashcat_ctx, "ADL engine step size invalid for performance level 2.");
//state->state.aLevels[1].iEngineClock -= state->state.aLevels[1].iEngineClock % caps.sEngineClockRange.iStep; //state->state.aLevels[1].iEngineClock -= state->state.aLevels[1].iEngineClock % caps.sEngineClockRange.iStep;
@ -2241,7 +2242,7 @@ static int hm_ADL_Overdrive_StateInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdap
if (state->state.aLevels[0].iMemoryClock % caps.sMemoryClockRange.iStep != 0) if (state->state.aLevels[0].iMemoryClock % caps.sMemoryClockRange.iStep != 0)
{ {
event_log_error (hashcat_ctx, "ADL memory step size invalid for performance level 1"); event_log_error (hashcat_ctx, "ADL memory step size invalid for performance level 1.");
//state->state.aLevels[0].iMemoryClock -= state->state.aLevels[0].iMemoryClock % caps.sMemoryClockRange.iStep; //state->state.aLevels[0].iMemoryClock -= state->state.aLevels[0].iMemoryClock % caps.sMemoryClockRange.iStep;
@ -2250,7 +2251,7 @@ static int hm_ADL_Overdrive_StateInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdap
if (state->state.aLevels[1].iMemoryClock % caps.sMemoryClockRange.iStep != 0) if (state->state.aLevels[1].iMemoryClock % caps.sMemoryClockRange.iStep != 0)
{ {
event_log_error (hashcat_ctx, "ADL memory step size invalid for performance level 2"); event_log_error (hashcat_ctx, "ADL memory step size invalid for performance level 2.");
//state->state.aLevels[1].iMemoryClock -= state->state.aLevels[1].iMemoryClock % caps.sMemoryClockRange.iStep; //state->state.aLevels[1].iMemoryClock -= state->state.aLevels[1].iMemoryClock % caps.sMemoryClockRange.iStep;
@ -2283,28 +2284,28 @@ static int hm_ADL_Overdrive_State_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterI
if (state->aLevels[0].iEngineClock < caps.sEngineClockRange.iMin || state->aLevels[1].iEngineClock > caps.sEngineClockRange.iMax) if (state->aLevels[0].iEngineClock < caps.sEngineClockRange.iMin || state->aLevels[1].iEngineClock > caps.sEngineClockRange.iMax)
{ {
event_log_error (hashcat_ctx, "ADL engine clock outside valid range"); event_log_error (hashcat_ctx, "ADL engine clock outside valid range.");
return -1; return -1;
} }
if (state->aLevels[1].iEngineClock % caps.sEngineClockRange.iStep != 0) if (state->aLevels[1].iEngineClock % caps.sEngineClockRange.iStep != 0)
{ {
event_log_error (hashcat_ctx, "ADL engine step size invalid"); event_log_error (hashcat_ctx, "ADL engine step size invalid.");
return -1; return -1;
} }
if (state->aLevels[0].iMemoryClock < caps.sMemoryClockRange.iMin || state->aLevels[1].iMemoryClock > caps.sMemoryClockRange.iMax) if (state->aLevels[0].iMemoryClock < caps.sMemoryClockRange.iMin || state->aLevels[1].iMemoryClock > caps.sMemoryClockRange.iMax)
{ {
event_log_error (hashcat_ctx, "ADL memory clock outside valid range"); event_log_error (hashcat_ctx, "ADL memory clock outside valid range.");
return -1; return -1;
} }
if (state->aLevels[1].iMemoryClock % caps.sMemoryClockRange.iStep != 0) if (state->aLevels[1].iMemoryClock % caps.sMemoryClockRange.iStep != 0)
{ {
event_log_error (hashcat_ctx, "ADL memory step size invalid"); event_log_error (hashcat_ctx, "ADL memory step size invalid.");
return -1; return -1;
} }
@ -2367,7 +2368,7 @@ static int get_adapters_num_adl (hashcat_ctx_t *hashcat_ctx, int *iNumberAdapter
if (iNumberAdapters == NULL) if (iNumberAdapters == NULL)
{ {
event_log_error (hashcat_ctx, "No ADL adapters found"); event_log_error (hashcat_ctx, "No ADL adapters found.");
return -1; return -1;
} }
@ -2383,7 +2384,7 @@ static int hm_get_adapter_index_nvapi (hashcat_ctx_t *hashcat_ctx, HM_ADAPTER_NV
if (pGpuCount == 0) if (pGpuCount == 0)
{ {
event_log_error (hashcat_ctx, "No NvAPI adapters found"); event_log_error (hashcat_ctx, "No NvAPI adapters found.");
return 0; return 0;
} }
@ -2399,7 +2400,7 @@ static int hm_get_adapter_index_nvml (hashcat_ctx_t *hashcat_ctx, HM_ADAPTER_NVM
if (deviceCount == 0) if (deviceCount == 0)
{ {
event_log_error (hashcat_ctx, "No NVML adapters found"); event_log_error (hashcat_ctx, "No NVML adapters found.");
return 0; return 0;
} }
@ -3867,7 +3868,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to get ADL PowerControl Capabilities"); event_log_error (hashcat_ctx, "Failed to get ADL PowerControl capabilities.");
return -1; return -1;
} }
@ -3884,7 +3885,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl values"); event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl values.");
return -1; return -1;
} }
@ -3893,7 +3894,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl values"); event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl values.");
return -1; return -1;
} }
@ -3902,7 +3903,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to set new ADL PowerControl values"); event_log_error (hashcat_ctx, "Failed to set new ADL PowerControl values.");
return -1; return -1;
} }
@ -3917,7 +3918,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "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; return -1;
} }
@ -3930,7 +3931,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to get ADL device capabilities"); event_log_error (hashcat_ctx, "Failed to get ADL device capabilities.");
return -1; return -1;
} }
@ -3948,12 +3949,12 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if ((engine_clock_max - engine_clock_profile_max) > warning_trigger_engine) if ((engine_clock_max - engine_clock_profile_max) > warning_trigger_engine)
{ {
event_log_error (hashcat_ctx, "The custom profile seems to have too low maximum engine clock values. You therefore may not reach full performance"); event_log_error (hashcat_ctx, "Custom profile has low maximum engine clock value. Expect reduced performance.");
} }
if ((memory_clock_max - memory_clock_profile_max) > warning_trigger_memory) if ((memory_clock_max - memory_clock_profile_max) > warning_trigger_memory)
{ {
event_log_error (hashcat_ctx, "The custom profile seems to have too low maximum memory clock values. You therefore may not reach full performance"); event_log_error (hashcat_ctx, "Custom profile has low maximum memory clock value. Expect reduced performance.");
} }
ADLOD6StateInfo *performance_state = (ADLOD6StateInfo*) hccalloc (1, sizeof (ADLOD6StateInfo) + sizeof (ADLOD6PerformanceLevel)); ADLOD6StateInfo *performance_state = (ADLOD6StateInfo*) hccalloc (1, sizeof (ADLOD6StateInfo) + sizeof (ADLOD6PerformanceLevel));
@ -3969,7 +3970,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to set ADL performance state"); event_log_error (hashcat_ctx, "Failed to set ADL performance state.");
return -1; return -1;
} }
@ -3988,7 +3989,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl settings"); event_log_error (hashcat_ctx, "Failed to get current ADL PowerControl settings.");
return -1; return -1;
} }
@ -3997,7 +3998,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (ADL_rc == ADL_ERR) if (ADL_rc == ADL_ERR)
{ {
event_log_error (hashcat_ctx, "Failed to set new ADL PowerControl values"); event_log_error (hashcat_ctx, "Failed to set new ADL PowerControl values.");
return -1; return -1;
} }
@ -4187,7 +4188,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) if ((hm_ADL_Overdrive6_PowerControl_Caps (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, &powertune_supported)) == -1)
{ {
//event_log_error (hashcat_ctx, "Failed to get ADL PowerControl Capabilities"); //event_log_error (hashcat_ctx, "Failed to get ADL PowerControl capabilities.");
continue; continue;
} }
@ -4198,7 +4199,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) 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_error (hashcat_ctx, "Failed to restore the ADL PowerControl values"); //event_log_error (hashcat_ctx, "Failed to restore the ADL PowerControl values.");
continue; continue;
} }
@ -4216,7 +4217,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) if ((hm_ADL_Overdrive_State_Set (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, ADL_OD6_SETSTATE_PERFORMANCE, performance_state)) == -1)
{ {
//event_log_error (hashcat_ctx, "Failed to restore ADL performance state"); //event_log_error (hashcat_ctx, "Failed to restore ADL performance state.");
continue; continue;
} }

View File

@ -22445,7 +22445,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
hashconfig->dgst_pos3 = 1; hashconfig->dgst_pos3 = 1;
break; break;
default: event_log_error (hashcat_ctx, "Unknown hash-type '%u' selected", hashconfig->hash_mode); default: event_log_error (hashcat_ctx, "Unknown hash-type '%u' selected.", hashconfig->hash_mode);
return -1; return -1;
} }

View File

@ -396,12 +396,12 @@ static void main_potfile_num_cracked (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, M
{ {
if (potfile_remove_cracks == 1) if (potfile_remove_cracks == 1)
{ {
event_log_info (hashcat_ctx, "INFO: Removed 1 hash found in potfile"); event_log_info (hashcat_ctx, "INFO: Removed 1 hash found in potfile.");
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
} }
else else
{ {
event_log_info (hashcat_ctx, "INFO: Removed %d hashes found in potfile", potfile_remove_cracks); event_log_info (hashcat_ctx, "INFO: Removed %d hashes found in potfile.", potfile_remove_cracks);
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
} }
} }
@ -413,7 +413,7 @@ static void main_potfile_all_cracked (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, M
if (user_options->quiet == true) return; if (user_options->quiet == true) return;
event_log_info (hashcat_ctx, "INFO: All hashes found in potfile! You can use --show to display them."); event_log_info (hashcat_ctx, "INFO: All hashes found in potfile! Use --show to display them.");
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
} }
@ -455,7 +455,7 @@ static void main_outerloop_mainscreen (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx,
if (hashconfig->opti_type) if (hashconfig->opti_type)
{ {
event_log_info (hashcat_ctx, "Applicable Optimizers:"); event_log_info (hashcat_ctx, "Applicable optimizers:");
for (u32 i = 0; i < 32; i++) for (u32 i = 0; i < 32; i++)
{ {
@ -473,7 +473,7 @@ static void main_outerloop_mainscreen (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx,
if (hwmon_ctx->enabled == false && user_options->gpu_temp_disable == false) if (hwmon_ctx->enabled == false && user_options->gpu_temp_disable == false)
{ {
event_log_info (hashcat_ctx, "Watchdog: Hardware Monitoring Interface not found on your system"); event_log_info (hashcat_ctx, "Watchdog: Hardware monitoring interface not found on your system.");
} }
if (hwmon_ctx->enabled == true && user_options->gpu_temp_abort > 0) if (hwmon_ctx->enabled == true && user_options->gpu_temp_abort > 0)
@ -482,7 +482,7 @@ static void main_outerloop_mainscreen (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx,
} }
else else
{ {
event_log_info (hashcat_ctx, "Watchdog: Temperature abort trigger disabled"); event_log_info (hashcat_ctx, "Watchdog: Temperature abort trigger disabled.");
} }
if (hwmon_ctx->enabled == true && user_options->gpu_temp_retain > 0) if (hwmon_ctx->enabled == true && user_options->gpu_temp_retain > 0)
@ -491,7 +491,7 @@ static void main_outerloop_mainscreen (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx,
} }
else else
{ {
event_log_info (hashcat_ctx, "Watchdog: Temperature retain trigger disabled"); event_log_info (hashcat_ctx, "Watchdog: Temperature retain trigger disabled.");
} }
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
@ -543,7 +543,7 @@ static void main_weak_hash_all_cracked (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx,
if (user_options->quiet == true) return; if (user_options->quiet == true) return;
event_log_info (hashcat_ctx, "INFO: All hashes found during weak hashes check! You can use --show to display them."); event_log_info (hashcat_ctx, "INFO: All hashes found during weak hashes check! Use --show to display them.");
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
} }
@ -573,7 +573,7 @@ static void main_set_kernel_power_final (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx
clear_prompt (); clear_prompt ();
event_log_advice (hashcat_ctx, "Approaching final keyspace, workload adjusted"); event_log_advice (hashcat_ctx, "Approaching final keyspace - workload adjusted.");
event_log_advice (hashcat_ctx, NULL); event_log_advice (hashcat_ctx, NULL);
send_prompt (); send_prompt ();
@ -593,7 +593,7 @@ static void main_monitor_throttle1 (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAY
u32 *device_id = (u32 *) buf; u32 *device_id = (u32 *) buf;
event_log_warning (hashcat_ctx, "Drivers temperature threshold hit on GPU #%u, expect performance to drop...", *device_id + 1); event_log_warning (hashcat_ctx, "Driver temperature threshold met on GPU #%u. Expect reduced performance.", *device_id + 1);
if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK))
{ {
@ -615,7 +615,7 @@ static void main_monitor_throttle2 (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAY
u32 *device_id = (u32 *) buf; u32 *device_id = (u32 *) buf;
event_log_warning (hashcat_ctx, "Drivers temperature threshold hit on GPU #%u, expect performance to drop...", *device_id + 1); event_log_warning (hashcat_ctx, "Driver temperature threshold met on GPU #%u. Expect reduced performance.", *device_id + 1);
if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK))
{ {
@ -637,7 +637,7 @@ static void main_monitor_throttle3 (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAY
u32 *device_id = (u32 *) buf; u32 *device_id = (u32 *) buf;
event_log_warning (hashcat_ctx, "Drivers temperature threshold hit on GPU #%u, expect performance to drop...", *device_id + 1); event_log_warning (hashcat_ctx, "Driver temperature threshold met on GPU #%u. Expect reduced performance.", *device_id + 1);
event_log_warning (hashcat_ctx, NULL); event_log_warning (hashcat_ctx, NULL);
if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK))
@ -660,18 +660,18 @@ static void main_monitor_performance_hint (MAYBE_UNUSED hashcat_ctx_t *hashcat_c
if (user_options->workload_profile < 3) if (user_options->workload_profile < 3)
{ {
event_log_advice (hashcat_ctx, "Cracking performance lower than expected? Append -w 3 to the commandline!"); event_log_advice (hashcat_ctx, "Cracking performance lower than expected? Append -w 3 to the commandline.");
event_log_advice (hashcat_ctx, NULL); event_log_advice (hashcat_ctx, NULL);
} }
else else
{ {
event_log_advice (hashcat_ctx, "Cracking performance lower than expected?"); event_log_advice (hashcat_ctx, "Cracking performance lower than expected?");
event_log_advice (hashcat_ctx, NULL); event_log_advice (hashcat_ctx, NULL);
event_log_advice (hashcat_ctx, "* Update your OpenCL runtime / Driver but the right way:"); event_log_advice (hashcat_ctx, "* Update your OpenCL runtime / driver the right way:");
event_log_advice (hashcat_ctx, " https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#i_may_have_the_wrong_driver_installed_what_should_i_do"); event_log_advice (hashcat_ctx, " https://hashcat.net/faq/wrongdriver");
event_log_advice (hashcat_ctx, NULL); event_log_advice (hashcat_ctx, NULL);
event_log_advice (hashcat_ctx, "* Create more work items to make use of your parallelization power:"); event_log_advice (hashcat_ctx, "* Create more work items to make use of your parallelization power:");
event_log_advice (hashcat_ctx, " https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_to_create_more_work_for_full_speed"); event_log_advice (hashcat_ctx, " https://hashcat.net/faq/morework");
event_log_advice (hashcat_ctx, NULL); event_log_advice (hashcat_ctx, NULL);
} }

View File

@ -152,7 +152,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) if (css_cnt > SP_PW_MAX)
{ {
event_log_error (hashcat_ctx, "Mask length is too long"); event_log_error (hashcat_ctx, "Mask length is too long.");
return -1; return -1;
} }
@ -252,16 +252,16 @@ static int mp_expand (hashcat_ctx_t *hashcat_ctx, char *in_buf, size_t in_len, c
break; break;
case 'H': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[7].cs_buf, mp_sys[7].cs_len, mp_usr, mp_usr_offset); case 'H': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[7].cs_buf, mp_sys[7].cs_len, mp_usr, mp_usr_offset);
break; break;
case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, mp_usr, mp_usr_offset); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, mp_usr, mp_usr_offset);
break; break;
case '2': if (mp_usr[1].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[1].cs_buf, mp_usr[1].cs_len, mp_usr, mp_usr_offset); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[1].cs_buf, mp_usr[1].cs_len, mp_usr, mp_usr_offset);
break; break;
case '3': if (mp_usr[2].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[2].cs_buf, mp_usr[2].cs_len, mp_usr, mp_usr_offset); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[2].cs_buf, mp_usr[2].cs_len, mp_usr, mp_usr_offset);
break; break;
case '4': if (mp_usr[3].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[3].cs_buf, mp_usr[3].cs_len, mp_usr, mp_usr_offset); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[3].cs_buf, mp_usr[3].cs_len, mp_usr, mp_usr_offset);
break; break;
case '?': rc = mp_add_cs_buf (hashcat_ctx, &p0, 1, mp_usr, mp_usr_offset); case '?': rc = mp_add_cs_buf (hashcat_ctx, &p0, 1, mp_usr, mp_usr_offset);
@ -280,7 +280,7 @@ static int mp_expand (hashcat_ctx_t *hashcat_ctx, char *in_buf, size_t in_len, c
if (in_pos == in_len) if (in_pos == in_len)
{ {
event_log_error (hashcat_ctx, "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 expects exactly 2 hexadecimal chars. Failed mask: %s", in_buf);
return -1; return -1;
} }
@ -358,16 +358,16 @@ static int mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask_l
break; break;
case 'H': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[7].cs_buf, mp_sys[7].cs_len, css_buf, css_pos); case 'H': rc = mp_add_cs_buf (hashcat_ctx, mp_sys[7].cs_buf, mp_sys[7].cs_len, css_buf, css_pos);
break; break;
case '1': if (mp_usr[0].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, css_buf, css_pos); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[0].cs_buf, mp_usr[0].cs_len, css_buf, css_pos);
break; break;
case '2': if (mp_usr[1].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[1].cs_buf, mp_usr[1].cs_len, css_buf, css_pos); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[1].cs_buf, mp_usr[1].cs_len, css_buf, css_pos);
break; break;
case '3': if (mp_usr[2].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[2].cs_buf, mp_usr[2].cs_len, css_buf, css_pos); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[2].cs_buf, mp_usr[2].cs_len, css_buf, css_pos);
break; break;
case '4': if (mp_usr[3].cs_len == 0) { event_log_error (hashcat_ctx, "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; }
rc = mp_add_cs_buf (hashcat_ctx, mp_usr[3].cs_buf, mp_usr[3].cs_len, css_buf, css_pos); rc = mp_add_cs_buf (hashcat_ctx, mp_usr[3].cs_buf, mp_usr[3].cs_len, css_buf, css_pos);
break; break;
case '?': rc = mp_add_cs_buf (hashcat_ctx, &chr, 1, css_buf, css_pos); case '?': rc = mp_add_cs_buf (hashcat_ctx, &chr, 1, css_buf, css_pos);
@ -388,7 +388,7 @@ static int mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask_l
if (mask_pos == mask_len) if (mask_pos == mask_len)
{ {
event_log_error (hashcat_ctx, "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 expects exactly 2 hexadecimal chars. Failed mask: %s", mask_buf);
return -1; return -1;
} }
@ -426,7 +426,7 @@ static int mp_gen_css (hashcat_ctx_t *hashcat_ctx, char *mask_buf, size_t mask_l
if (css_pos == 0) if (css_pos == 0)
{ {
event_log_error (hashcat_ctx, "Invalid mask length (0)"); event_log_error (hashcat_ctx, "Invalid mask length (0).");
return -1; return -1;
} }
@ -468,7 +468,7 @@ static int mp_get_truncated_mask (hashcat_ctx_t *hashcat_ctx, const char *mask_b
if (mask_pos == mask_len) if (mask_pos == mask_len)
{ {
event_log_error (hashcat_ctx, "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 expects exactly 2 hexadecimal chars. Failed mask: %s", mask_buf);
return -1; return -1;
} }
@ -549,7 +549,7 @@ static int mp_setup_usr (hashcat_ctx_t *hashcat_ctx, cs_t *mp_sys, cs_t *mp_usr,
if (!feof (fp)) if (!feof (fp))
{ {
event_log_error (hashcat_ctx, "%s: Custom charset file is too large", buf); event_log_error (hashcat_ctx, "%s: Custom charset file is too large.", buf);
fclose (fp); fclose (fp);
@ -562,7 +562,7 @@ static int mp_setup_usr (hashcat_ctx_t *hashcat_ctx, cs_t *mp_sys, cs_t *mp_usr,
if (nread == 0) if (nread == 0)
{ {
event_log_error (hashcat_ctx, "%s: Custom charset file is empty", buf); event_log_error (hashcat_ctx, "%s: Custom charset file is empty.", buf);
return -1; return -1;
} }
@ -573,7 +573,7 @@ static int mp_setup_usr (hashcat_ctx_t *hashcat_ctx, cs_t *mp_sys, cs_t *mp_usr,
if (len == 0) if (len == 0)
{ {
event_log_error (hashcat_ctx, "%s: Custom charset file is corrupted", buf); event_log_error (hashcat_ctx, "%s: Custom charset file is corrupted.", buf);
return -1; return -1;
} }
@ -665,7 +665,7 @@ static int sp_setup_tbl (hashcat_ctx_t *hashcat_ctx)
if (fread (root_stats_buf, sizeof (u64), SP_ROOT_CNT, fd) != SP_ROOT_CNT) if (fread (root_stats_buf, sizeof (u64), SP_ROOT_CNT, fd) != SP_ROOT_CNT)
{ {
event_log_error (hashcat_ctx, "%s: Could not load data", hcstat); event_log_error (hashcat_ctx, "%s: Could not load data.", hcstat);
fclose (fd); fclose (fd);
@ -674,7 +674,7 @@ static int sp_setup_tbl (hashcat_ctx_t *hashcat_ctx)
if (fread (markov_stats_buf, sizeof (u64), SP_MARKOV_CNT, fd) != SP_MARKOV_CNT) if (fread (markov_stats_buf, sizeof (u64), SP_MARKOV_CNT, fd) != SP_MARKOV_CNT)
{ {
event_log_error (hashcat_ctx, "%s: Could not load data", hcstat); event_log_error (hashcat_ctx, "%s: Could not load data.", hcstat);
fclose (fd); fclose (fd);
@ -1150,12 +1150,12 @@ int mask_ctx_update_loop (hashcat_ctx_t *hashcat_ctx)
{ {
if (mask_ctx->css_cnt < mask_min) if (mask_ctx->css_cnt < mask_min)
{ {
event_log_warning (hashcat_ctx, "Skipping mask '%s' because it is smaller than the minimum password length", mask_ctx->mask); event_log_warning (hashcat_ctx, "Skipping mask '%s' because it is smaller than the minimum password length.", mask_ctx->mask);
} }
if (mask_ctx->css_cnt > mask_max) if (mask_ctx->css_cnt > mask_max)
{ {
event_log_warning (hashcat_ctx, "Skipping mask '%s' because it is larger than the maximum password length", mask_ctx->mask); event_log_warning (hashcat_ctx, "Skipping mask '%s' because it is larger than the maximum password length.", mask_ctx->mask);
} }
// skip to next mask // skip to next mask
@ -1340,7 +1340,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx)
} }
else else
{ {
event_log_error (hashcat_ctx, "%s: unsupported file-type", arg); event_log_error (hashcat_ctx, "%s: unsupported file type.", arg);
return -1; return -1;
} }
@ -1433,7 +1433,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx)
} }
else else
{ {
event_log_error (hashcat_ctx, "%s: unsupported file-type", arg); event_log_error (hashcat_ctx, "%s: unsupported file type.", arg);
return -1; return -1;
} }
@ -1507,7 +1507,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx)
} }
else else
{ {
event_log_error (hashcat_ctx, "%s: unsupported file-type", arg); event_log_error (hashcat_ctx, "%s: unsupported file type.", arg);
return -1; return -1;
} }
@ -1516,7 +1516,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (mask_ctx->masks_cnt == 0) if (mask_ctx->masks_cnt == 0)
{ {
event_log_error (hashcat_ctx, "Invalid mask"); event_log_error (hashcat_ctx, "Invalid mask.");
return -1; return -1;
} }
@ -1603,7 +1603,7 @@ int mask_ctx_parse_maskfile (hashcat_ctx_t *hashcat_ctx)
if (mfs_cnt == MAX_MFS) if (mfs_cnt == MAX_MFS)
{ {
event_log_error (hashcat_ctx, "Invalid line '%s' in maskfile", mask_buf); event_log_error (hashcat_ctx, "Invalid line '%s' in maskfile.", mask_buf);
return -1; return -1;
} }

View File

@ -3895,7 +3895,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
if (kernel_accel_max < kernel_accel_min) if (kernel_accel_max < kernel_accel_min)
{ {
event_log_error (hashcat_ctx, "* Device #%u: Does not provide enough allocatable device memory for this attack.", device_id + 1); event_log_error (hashcat_ctx, "* Device #%u: Not enough allocatable device memory for this attack.", device_id + 1);
return -1; return -1;
} }

View File

@ -273,7 +273,7 @@ void potfile_write_append (hashcat_ctx_t *hashcat_ctx, const char *out_buf, u8 *
if (unlock_file (potfile_ctx->fp)) if (unlock_file (potfile_ctx->fp))
{ {
event_log_error (hashcat_ctx, "%s: Failed to unlock file", potfile_ctx->filename); event_log_error (hashcat_ctx, "%s: Failed to unlock file.", potfile_ctx->filename);
} }
} }

View File

@ -64,7 +64,7 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx)
if (fread (rd, sizeof (restore_data_t), 1, fp) != 1) if (fread (rd, sizeof (restore_data_t), 1, fp) != 1)
{ {
event_log_error (hashcat_ctx, "Can't read %s", eff_restore_file); event_log_error (hashcat_ctx, "Cannot read %s", eff_restore_file);
fclose (fp); fclose (fp);
@ -75,7 +75,7 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx)
if (rd->argc < 1) if (rd->argc < 1)
{ {
event_log_error (hashcat_ctx, "Unusual low number of arguments (argc) within the restore file %s", eff_restore_file); event_log_error (hashcat_ctx, "Unusually low number of arguments (argc) within restore file %s", eff_restore_file);
fclose (fp); fclose (fp);
@ -84,7 +84,7 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx)
if (rd->argc > 250) // some upper bound check is always good (with some dirs/dicts it could be a large string) if (rd->argc > 250) // some upper bound check is always good (with some dirs/dicts it could be a large string)
{ {
event_log_error (hashcat_ctx, "Unusual high number of arguments (argc) within the restore file %s", eff_restore_file); event_log_error (hashcat_ctx, "Unusually high number of arguments (argc) within restore file %s", eff_restore_file);
fclose (fp); fclose (fp);
@ -99,7 +99,7 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx)
{ {
if (fgets (buf, HCBUFSIZ_LARGE - 1, fp) == NULL) if (fgets (buf, HCBUFSIZ_LARGE - 1, fp) == NULL)
{ {
event_log_error (hashcat_ctx, "Can't read %s", eff_restore_file); event_log_error (hashcat_ctx, "Cannot read %s", eff_restore_file);
fclose (fp); fclose (fp);
@ -136,11 +136,12 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx)
if (chdir (rd->cwd)) if (chdir (rd->cwd))
{ {
event_log_error (hashcat_ctx, "The directory '%s' does not exist. It is needed to restore (--restore) the session.", rd->cwd); event_log_error (hashcat_ctx, "Directory '%s' needed to restore the session was not found.", rd->cwd);
event_log_warning (hashcat_ctx, "You could either create this directory or update the .restore file using e.g. the analyze_hc_restore.pl tool:"); event_log_warning (hashcat_ctx, "Either create the directory, or update the directory within the .restore file.");
event_log_warning (hashcat_ctx, "https://github.com/philsmd/analyze_hc_restore"); event_log_warning (hashcat_ctx, "Restore files can be analyzed and modified with analyze_hc_restore.pl:");
event_log_warning (hashcat_ctx, "The directory must contain all files and folders mentioned within the command line."); event_log_warning (hashcat_ctx, " https://github.com/philsmd/analyze_hc_restore");
event_log_warning (hashcat_ctx, "Directory must contain all files and folders from the original command line.");
event_log_warning (hashcat_ctx, NULL); event_log_warning (hashcat_ctx, NULL);
return -1; return -1;
@ -308,7 +309,7 @@ int restore_ctx_init (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
if (rd->version < RESTORE_VERSION_MIN) if (rd->version < RESTORE_VERSION_MIN)
{ {
event_log_error (hashcat_ctx, "Incompatible restore-file version"); event_log_error (hashcat_ctx, "Incompatible restore-file version.");
return -1; return -1;
} }

View File

@ -824,7 +824,7 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32
{ {
if (out_pos == RULES_MAX - 1) if (out_pos == RULES_MAX - 1)
{ {
// event_log_warning (hashcat_ctx, "Truncating chaining of rule %d and rule %d as maximum number of function calls per rule exceeded", i, in_off); // event_log_warning (hashcat_ctx, "Truncated chaining of rule %d and rule %d - maximum functions per rule exceeded.", i, in_off);
break; break;
} }
@ -841,7 +841,7 @@ int kernel_rules_load (hashcat_ctx_t *hashcat_ctx, kernel_rule_t **out_buf, u32
if (kernel_rules_cnt == 0) if (kernel_rules_cnt == 0)
{ {
event_log_error (hashcat_ctx, "No valid rules left"); event_log_error (hashcat_ctx, "No valid rules left.");
hcfree (kernel_rules_buf); hcfree (kernel_rules_buf);

View File

@ -186,7 +186,7 @@ static void keypress (hashcat_ctx_t *hashcat_ctx)
bypass (hashcat_ctx); bypass (hashcat_ctx);
event_log_info (hashcat_ctx, "Next dictionary / mask in queue selected, bypassing current one"); event_log_info (hashcat_ctx, "Next dictionary / mask in queue selected. Bypassing current one.");
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
@ -236,11 +236,11 @@ static void keypress (hashcat_ctx_t *hashcat_ctx)
if (status_ctx->checkpoint_shutdown == true) if (status_ctx->checkpoint_shutdown == true)
{ {
event_log_info (hashcat_ctx, "Checkpoint enabled: Will quit at next Restore Point update"); event_log_info (hashcat_ctx, "Checkpoint enabled. Will quit at next restore-point update.");
} }
else else
{ {
event_log_info (hashcat_ctx, "Checkpoint disabled: Restore Point updates will no longer be monitored"); event_log_info (hashcat_ctx, "Checkpoint disabled. Restore-point updates will no longer be monitored.");
} }
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
@ -583,7 +583,7 @@ void opencl_info_compact (hashcat_ctx_t *hashcat_ctx)
} }
else else
{ {
event_log_info (hashcat_ctx, "OpenCL Platform #%u: %s, skipped or no OpenCL compatible devices found", platforms_idx + 1, platform_vendor); event_log_info (hashcat_ctx, "OpenCL Platform #%u: %s, skipped or no OpenCL compatible devices found.", platforms_idx + 1, platform_vendor);
} }
for (cl_uint devices_idx = 0; devices_idx < devices_cnt; devices_idx++) for (cl_uint devices_idx = 0; devices_idx < devices_cnt; devices_idx++)
@ -608,7 +608,7 @@ void opencl_info_compact (hashcat_ctx_t *hashcat_ctx)
} }
else else
{ {
event_log_info (hashcat_ctx, "* Device #%u: %s, skipped", event_log_info (hashcat_ctx, "* Device #%u: %s, skipped.",
devices_idx + 1, devices_idx + 1,
device_name); device_name);
} }

View File

@ -254,7 +254,7 @@ int stop_at_checkpoint (hashcat_ctx_t *hashcat_ctx)
if (restore_ctx->enabled == false) if (restore_ctx->enabled == false)
{ {
event_log_warning (hashcat_ctx, "This feature is disabled when --restore-disable is specified"); event_log_warning (hashcat_ctx, "This feature is disabled when --restore-disable is specified.");
return -1; return -1;
} }

View File

@ -276,7 +276,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
if (hc_string_is_digit (optarg) == false) if (hc_string_is_digit (optarg) == false)
{ {
event_log_error (hashcat_ctx, "Not a number '%s'", optarg); event_log_error (hashcat_ctx, "The specified parameter cannot use '%s' as a value - must be a number.", optarg);
return -1; return -1;
} }
@ -285,7 +285,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
if (optopt != 0) if (optopt != 0)
{ {
event_log_error (hashcat_ctx, "Invalid argument specified"); event_log_error (hashcat_ctx, "Invalid argument specified.");
return -1; return -1;
} }
@ -404,7 +404,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
default: default:
{ {
event_log_error (hashcat_ctx, "Invalid argument specified"); event_log_error (hashcat_ctx, "Invalid argument specified.");
return -1; return -1;
} }
@ -413,7 +413,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
if (optopt != 0) if (optopt != 0)
{ {
event_log_error (hashcat_ctx, "Invalid argument specified"); event_log_error (hashcat_ctx, "Invalid argument specified.");
return -1; return -1;
} }
@ -432,14 +432,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->hc_argc < 0) if (user_options->hc_argc < 0)
{ {
event_log_error (hashcat_ctx, "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; return -1;
} }
if (user_options->hc_argv == NULL) if (user_options->hc_argv == NULL)
{ {
event_log_error (hashcat_ctx, "hc_argv is NULL"); event_log_error (hashcat_ctx, "hc_argv is NULL.");
return -1; return -1;
} }
@ -451,7 +451,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
&& (user_options->attack_mode != ATTACK_MODE_HYBRID2) && (user_options->attack_mode != ATTACK_MODE_HYBRID2)
&& (user_options->attack_mode != ATTACK_MODE_NONE)) && (user_options->attack_mode != ATTACK_MODE_NONE))
{ {
event_log_error (hashcat_ctx, "Invalid attack-mode specified"); event_log_error (hashcat_ctx, "Invalid attack mode (-a) value specified.");
return -1; return -1;
} }
@ -460,14 +460,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->remove == true) if (user_options->remove == true)
{ {
event_log_error (hashcat_ctx, "Mixing remove parameter not allowed with hccapx-message-pair parameter"); event_log_error (hashcat_ctx, "Combining --remove with --hccapx-message-pair is not allowed.");
return -1; return -1;
} }
if (user_options->hccapx_message_pair >= 6) if (user_options->hccapx_message_pair >= 6)
{ {
event_log_error (hashcat_ctx, "Invalid hccapx-message-pair specified"); event_log_error (hashcat_ctx, "Invalid --hccapx-message-pair value specified.");
return -1; return -1;
} }
@ -475,21 +475,21 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->runtime_chgd == true && user_options->runtime == 0) if (user_options->runtime_chgd == true && user_options->runtime == 0)
{ {
event_log_error (hashcat_ctx, "Invalid runtime specified"); event_log_error (hashcat_ctx, "Invalid --runtime value specified.");
return -1; return -1;
} }
if (user_options->runtime_chgd == true && user_options->loopback == true) if (user_options->runtime_chgd == true && user_options->loopback == true)
{ {
event_log_error (hashcat_ctx, "Runtime-Limit is not allowed in combination with --loopback"); event_log_error (hashcat_ctx, "Combining --limit with --loopback is not allowed.");
return -1; return -1;
} }
if (user_options->hash_mode > 99999) if (user_options->hash_mode > 99999)
{ {
event_log_error (hashcat_ctx, "Invalid hash-type specified"); event_log_error (hashcat_ctx, "Invalid -m (hash type) value specified.");
return -1; return -1;
} }
@ -502,7 +502,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
|| ((user_options->hash_mode >= 13700) && (user_options->hash_mode <= 13799)) || ((user_options->hash_mode >= 13700) && (user_options->hash_mode <= 13799))
|| (user_options->hash_mode == 9000)) || (user_options->hash_mode == 9000))
{ {
event_log_error (hashcat_ctx, "Mixing support for user names and hashes of type %s is not supported", strhashtype (user_options->hash_mode)); event_log_error (hashcat_ctx, "Combining --username with hashes of type %s is not supported.", strhashtype (user_options->hash_mode));
return -1; return -1;
} }
@ -510,7 +510,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->outfile_format > 16) if (user_options->outfile_format > 16)
{ {
event_log_error (hashcat_ctx, "Invalid outfile-format specified"); event_log_error (hashcat_ctx, "Invalid --outfile-format value specified.");
return -1; return -1;
} }
@ -521,7 +521,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->outfile_format > 1) if (user_options->outfile_format > 1)
{ {
event_log_error (hashcat_ctx, "Mixing outfile-format > 1 with left parameter is not allowed"); event_log_error (hashcat_ctx, "Combining --outfile-format > 1 with --left is not allowed.");
return -1; return -1;
} }
@ -534,7 +534,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->outfile_format > 7) if (user_options->outfile_format > 7)
{ {
event_log_error (hashcat_ctx, "Mixing outfile-format > 7 with show parameter is not allowed"); event_log_error (hashcat_ctx, "Combining --outfile-format > 7 with --show is not allowed.");
return -1; return -1;
} }
@ -543,63 +543,63 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->increment_min < INCREMENT_MIN) if (user_options->increment_min < INCREMENT_MIN)
{ {
event_log_error (hashcat_ctx, "Invalid increment-min specified"); event_log_error (hashcat_ctx, "Invalid --increment-min value specified.");
return -1; return -1;
} }
if (user_options->increment_max > INCREMENT_MAX) if (user_options->increment_max > INCREMENT_MAX)
{ {
event_log_error (hashcat_ctx, "Invalid increment-max specified"); event_log_error (hashcat_ctx, "Invalid --increment-max value specified.");
return -1; return -1;
} }
if (user_options->increment_min > user_options->increment_max) if (user_options->increment_min > user_options->increment_max)
{ {
event_log_error (hashcat_ctx, "Invalid increment-min specified"); event_log_error (hashcat_ctx, "Invalid --increment-min value specified - must be >= --increment-max.");
return -1; return -1;
} }
if ((user_options->increment == true) && (user_options->progress_only == true)) if ((user_options->increment == true) && (user_options->progress_only == true))
{ {
event_log_error (hashcat_ctx, "Increment is not allowed in combination with --progress-only"); event_log_error (hashcat_ctx, "Increment is not allowed in combination with --progress-only.");
return -1; return -1;
} }
if ((user_options->increment == true) && (user_options->speed_only == true)) if ((user_options->increment == true) && (user_options->speed_only == true))
{ {
event_log_error (hashcat_ctx, "Increment is not allowed in combination with --speed-only"); event_log_error (hashcat_ctx, "Increment is not allowed in combination with --speed-only.");
return -1; return -1;
} }
if ((user_options->increment == true) && (user_options->attack_mode == ATTACK_MODE_STRAIGHT)) if ((user_options->increment == true) && (user_options->attack_mode == ATTACK_MODE_STRAIGHT))
{ {
event_log_error (hashcat_ctx, "Increment is not allowed in attack-mode 0"); event_log_error (hashcat_ctx, "Increment is not allowed in attack mode 0 (straight).");
return -1; return -1;
} }
if ((user_options->increment == false) && (user_options->increment_min_chgd == true)) if ((user_options->increment == false) && (user_options->increment_min_chgd == true))
{ {
event_log_error (hashcat_ctx, "Increment-min is only supported combined with increment switch"); event_log_error (hashcat_ctx, "Increment-min is only supported when combined with -i/--increment.");
return -1; return -1;
} }
if ((user_options->increment == false) && (user_options->increment_max_chgd == true)) if ((user_options->increment == false) && (user_options->increment_max_chgd == true))
{ {
event_log_error (hashcat_ctx, "Increment-max is only supported combined with increment switch"); event_log_error (hashcat_ctx, "Increment-max is only supported combined with -i/--increment.");
return -1; return -1;
} }
if (user_options->rp_files_cnt > 0 && user_options->rp_gen == true) if (user_options->rp_files_cnt > 0 && user_options->rp_gen == true)
{ {
event_log_error (hashcat_ctx, "Use of both rules-file and rules-generate is not supported"); event_log_error (hashcat_ctx, "Combining -r/--rules-file and -g/--rules-generate is not supported.");
return -1; return -1;
} }
@ -608,7 +608,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) if (user_options->attack_mode != ATTACK_MODE_STRAIGHT)
{ {
event_log_error (hashcat_ctx, "Use of rules-file or rules-generate only allowed in attack-mode 0"); event_log_error (hashcat_ctx, "Use of -r/--rules-file and -g/--rules-generate only allowed in attack mode 0.");
return -1; return -1;
} }
@ -616,14 +616,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->bitmap_min > user_options->bitmap_max) if (user_options->bitmap_min > user_options->bitmap_max)
{ {
event_log_error (hashcat_ctx, "Invalid bitmap-min specified"); event_log_error (hashcat_ctx, "Invalid --bitmap-min value specified.");
return -1; return -1;
} }
if (user_options->rp_gen_func_min > user_options->rp_gen_func_max) if (user_options->rp_gen_func_min > user_options->rp_gen_func_max)
{ {
event_log_error (hashcat_ctx, "Invalid rp-gen-func-min specified"); event_log_error (hashcat_ctx, "Invalid --rp-gen-func-min value specified.");
return -1; return -1;
} }
@ -635,7 +635,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
event_log_error (hashcat_ctx, "The manual use of the -n option (or --kernel-accel) is outdated."); event_log_error (hashcat_ctx, "The manual use of the -n option (or --kernel-accel) is outdated.");
event_log_warning (hashcat_ctx, "Please consider using the -w option instead."); event_log_warning (hashcat_ctx, "Please consider using the -w option instead.");
event_log_warning (hashcat_ctx, "You can use --force to override this but do not post error reports if you do so."); event_log_warning (hashcat_ctx, "You can use --force to override this, but do not report related errors.");
event_log_warning (hashcat_ctx, NULL); event_log_warning (hashcat_ctx, NULL);
return -1; return -1;
@ -643,14 +643,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->kernel_accel < 1) if (user_options->kernel_accel < 1)
{ {
event_log_error (hashcat_ctx, "Invalid kernel-accel specified"); event_log_error (hashcat_ctx, "Invalid --kernel-accel value specified - must be greater than 0.");
return -1; return -1;
} }
if (user_options->kernel_accel > 1024) if (user_options->kernel_accel > 1024)
{ {
event_log_error (hashcat_ctx, "Invalid kernel-accel specified"); event_log_error (hashcat_ctx, "Invalid --kernel-accel value specified - must be <= 1024.");
return -1; return -1;
} }
@ -663,7 +663,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
event_log_error (hashcat_ctx, "The manual use of the -u option (or --kernel-loops) is outdated."); event_log_error (hashcat_ctx, "The manual use of the -u option (or --kernel-loops) is outdated.");
event_log_warning (hashcat_ctx, "Please consider using the -w option instead."); event_log_warning (hashcat_ctx, "Please consider using the -w option instead.");
event_log_warning (hashcat_ctx, "You can use --force to override this but do not post error reports if you do so."); event_log_warning (hashcat_ctx, "You can use --force to override this, but do not report related errors.");
event_log_warning (hashcat_ctx, NULL); event_log_warning (hashcat_ctx, NULL);
return -1; return -1;
@ -671,14 +671,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->kernel_loops < 1) if (user_options->kernel_loops < 1)
{ {
event_log_error (hashcat_ctx, "Invalid kernel-loops specified"); event_log_error (hashcat_ctx, "Invalid kernel-loops specified.");
return -1; return -1;
} }
if (user_options->kernel_loops > 1024) if (user_options->kernel_loops > 1024)
{ {
event_log_error (hashcat_ctx, "Invalid kernel-loops specified"); event_log_error (hashcat_ctx, "Invalid kernel-loops specified.");
return -1; return -1;
} }
@ -686,7 +686,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if ((user_options->workload_profile < 1) || (user_options->workload_profile > 4)) if ((user_options->workload_profile < 1) || (user_options->workload_profile > 4))
{ {
event_log_error (hashcat_ctx, "workload-profile %u not available", user_options->workload_profile); event_log_error (hashcat_ctx, "workload-profile %u is not available.", user_options->workload_profile);
return -1; return -1;
} }
@ -695,7 +695,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) if (is_power_of_2 (user_options->opencl_vector_width) == false || user_options->opencl_vector_width > 16)
{ {
event_log_error (hashcat_ctx, "opencl-vector-width %u not allowed", user_options->opencl_vector_width); event_log_error (hashcat_ctx, "opencl-vector-width %u is not allowed.", user_options->opencl_vector_width);
return -1; return -1;
} }
@ -705,14 +705,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->remove == true) if (user_options->remove == true)
{ {
event_log_error (hashcat_ctx, "Mixing remove parameter not allowed with show parameter or left parameter"); event_log_error (hashcat_ctx, "Mixing --remove not allowed with --show or --left.");
return -1; return -1;
} }
if (user_options->potfile_disable == true) if (user_options->potfile_disable == true)
{ {
event_log_error (hashcat_ctx, "Mixing potfile-disable parameter not allowed with show parameter or left parameter"); event_log_error (hashcat_ctx, "Mixing --potfile-disable is not allowed with --show or --left.");
return -1; return -1;
} }
@ -722,7 +722,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->outfile_autohex == false) if (user_options->outfile_autohex == false)
{ {
event_log_error (hashcat_ctx, "Mixing outfile-autohex-disable parameter not allowed with show parameter"); event_log_error (hashcat_ctx, "Mixing --outfile-autohex-disable is not allowed with --show.");
return -1; return -1;
} }
@ -732,13 +732,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->show == true) if (user_options->show == true)
{ {
event_log_error (hashcat_ctx, "Combining show parameter with keyspace parameter is not allowed"); event_log_error (hashcat_ctx, "Combining --show with --keyspace is not allowed.");
return -1; return -1;
} }
else if (user_options->left == true) else if (user_options->left == true)
{ {
event_log_error (hashcat_ctx, "Combining left parameter with keyspace parameter is not allowed"); event_log_error (hashcat_ctx, "Combining --left with --keyspace is not allowed.");
return -1; return -1;
} }
@ -748,14 +748,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->remove == false) if (user_options->remove == false)
{ {
event_log_error (hashcat_ctx, "Parameter remove-timer require parameter remove enabled"); event_log_error (hashcat_ctx, "The --remove-timer requires --remove.");
return -1; return -1;
} }
if (user_options->remove_timer < 1) if (user_options->remove_timer < 1)
{ {
event_log_error (hashcat_ctx, "Parameter remove-timer must have a value greater than or equal to 1"); event_log_error (hashcat_ctx, "The --remove-timer parameter must have a value greater than or equal to 1.");
return -1; return -1;
} }
@ -767,14 +767,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if ((user_options->rp_files_cnt == 0) && (user_options->rp_gen == 0)) if ((user_options->rp_files_cnt == 0) && (user_options->rp_gen == 0))
{ {
event_log_error (hashcat_ctx, "Parameter loopback not allowed without rules-file or rules-generate"); event_log_error (hashcat_ctx, "Parameter --loopback not allowed without -r/--rules-file or -g/--rules-generate.");
return -1; return -1;
} }
} }
else else
{ {
event_log_error (hashcat_ctx, "Parameter loopback allowed in attack-mode 0 only"); event_log_error (hashcat_ctx, "Parameter --loopback is only allowed in attack mode 0 (straight).");
return -1; return -1;
} }
@ -784,14 +784,14 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->attack_mode != ATTACK_MODE_STRAIGHT) if (user_options->attack_mode != ATTACK_MODE_STRAIGHT)
{ {
event_log_error (hashcat_ctx, "Parameter debug-mode option is only available with attack-mode 0"); event_log_error (hashcat_ctx, "Parameter --debug-mode option is only allowed in attack mode 0 (straight).");
return -1; return -1;
} }
if ((user_options->rp_files_cnt == 0) && (user_options->rp_gen == 0)) if ((user_options->rp_files_cnt == 0) && (user_options->rp_gen == 0))
{ {
event_log_error (hashcat_ctx, "Parameter debug-mode not allowed without rules-file or rules-generate"); event_log_error (hashcat_ctx, "Use of --debug-mode requires -r/--rules-file or -g/--rules-generate.");
return -1; return -1;
} }
@ -799,7 +799,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->debug_mode > 4) if (user_options->debug_mode > 4)
{ {
event_log_error (hashcat_ctx, "Invalid debug-mode specified"); event_log_error (hashcat_ctx, "Invalid --debug-mode value specified.");
return -1; return -1;
} }
@ -808,7 +808,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->debug_mode < 1) if (user_options->debug_mode < 1)
{ {
event_log_error (hashcat_ctx, "Parameter debug-file requires parameter debug-mode to be set"); event_log_error (hashcat_ctx, "Parameter --debug-file requires --debug-mode.");
return -1; return -1;
} }
@ -818,7 +818,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->attack_mode == ATTACK_MODE_BF) if (user_options->attack_mode == ATTACK_MODE_BF)
{ {
event_log_error (hashcat_ctx, "Parameter induction-dir not allowed with brute-force attacks"); event_log_error (hashcat_ctx, "Use of --induction-dir is not allowed in attack mode 3 (brute-force).");
return -1; return -1;
} }
@ -828,7 +828,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)) if ((user_options->weak_hash_threshold != WEAK_HASH_THRESHOLD) && (user_options->weak_hash_threshold != 0))
{ {
event_log_error (hashcat_ctx, "setting --weak-hash-threshold allowed only in straight-attack mode"); event_log_error (hashcat_ctx, "Use of --weak-hash-threshold is only allowed in attack mode 0 (straight).");
return -1; return -1;
} }
@ -836,7 +836,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (user_options->nvidia_spin_damp > 100) if (user_options->nvidia_spin_damp > 100)
{ {
event_log_error (hashcat_ctx, "setting --nvidia-spin-damp must be between 0 and 100 (inclusive)"); event_log_error (hashcat_ctx, "Values of --nvidia-spin-damp must be between 0 and 100 (inclusive).");
return -1; return -1;
} }
@ -845,7 +845,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->gpu_temp_abort < user_options->gpu_temp_retain) if (user_options->gpu_temp_abort < user_options->gpu_temp_retain)
{ {
event_log_error (hashcat_ctx, "Invalid values for gpu-temp-abort. Parameter gpu-temp-abort is less than gpu-temp-retain."); event_log_error (hashcat_ctx, "Value for --gpu-temp-abort must not be less than --gpu-temp-retain value.");
return -1; return -1;
} }
@ -857,7 +857,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->attack_mode != ATTACK_MODE_BF) if (user_options->attack_mode != ATTACK_MODE_BF)
{ {
event_log_error (hashcat_ctx, "Only attack-mode 3 allowed in benchmark mode"); event_log_error (hashcat_ctx, "Benchmark mode is only allowed in attack mode 3 (brute-force).");
return -1; return -1;
} }
@ -868,7 +868,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->markov_hcstat) == 0) if (strlen (user_options->markov_hcstat) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option markov-hcstat can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --markov-hcstat value - must not be empty.");
return -1; return -1;
} }
@ -878,7 +878,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->restore_file_path) == 0) if (strlen (user_options->restore_file_path) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option restore-file-path can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --restore-file-path value - must not be empty.");
return -1; return -1;
} }
@ -888,7 +888,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->outfile) == 0) if (strlen (user_options->outfile) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option outfile can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --outfile value - must not be empty.");
return -1; return -1;
} }
@ -898,7 +898,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->debug_file) == 0) if (strlen (user_options->debug_file) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option debug-file can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --debug-file value - must not be empty.");
return -1; return -1;
} }
@ -908,7 +908,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->session) == 0) if (strlen (user_options->session) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option session can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --session value - must not be empty.");
return -1; return -1;
} }
@ -918,7 +918,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->cpu_affinity) == 0) if (strlen (user_options->cpu_affinity) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option cpu-affinity can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --cpu-affinity value - must not be empty.");
return -1; return -1;
} }
@ -928,7 +928,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->opencl_platforms) == 0) if (strlen (user_options->opencl_platforms) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option opencl-platforms can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --opencl-platforms value - must not be empty.");
return -1; return -1;
} }
@ -938,7 +938,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->opencl_devices) == 0) if (strlen (user_options->opencl_devices) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option opencl-devices can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --opencl-devices value - must not be empty.");
return -1; return -1;
} }
@ -948,7 +948,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (strlen (user_options->opencl_device_types) == 0) if (strlen (user_options->opencl_device_types) == 0)
{ {
event_log_error (hashcat_ctx, "If selected, option opencl-device-types can not have length zero string"); event_log_error (hashcat_ctx, "Invalid --opencl-device-types value - must not be empty.");
return -1; return -1;
} }
@ -963,13 +963,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
{ {
if (user_options->attack_mode == ATTACK_MODE_STRAIGHT) if (user_options->attack_mode == ATTACK_MODE_STRAIGHT)
{ {
event_log_error (hashcat_ctx, "Custom-charsets not supported in attack-mode 0"); event_log_error (hashcat_ctx, "Custom charsets are not supported in attack mode 0 (straight).");
return -1; return -1;
} }
else if (user_options->attack_mode == ATTACK_MODE_COMBI) else if (user_options->attack_mode == ATTACK_MODE_COMBI)
{ {
event_log_error (hashcat_ctx, "Custom-charsets not supported in attack-mode 1"); event_log_error (hashcat_ctx, "Custom charsets re not supported in attack mode 1 (combination).");
return -1; return -1;
} }
@ -993,7 +993,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
if (mask_is_missing == true) if (mask_is_missing == true)
{ {
event_log_error (hashcat_ctx, "You need to specify a mask if you specify a custom-charset"); event_log_error (hashcat_ctx, "If you specify a custom charset, you must also specify a mask.");
return -1; return -1;
} }
@ -1594,7 +1594,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (user_options_extra->hc_hash) == true) if (hc_path_is_directory (user_options_extra->hc_hash) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as hashfile argument", user_options_extra->hc_hash); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a hashfile argument.", user_options_extra->hc_hash);
return -1; return -1;
} }
@ -1637,7 +1637,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
if (hc_path_is_directory (rp_file) == true) if (hc_path_is_directory (rp_file) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as rulefile argument", rp_file); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a rulefile argument.", rp_file);
return -1; return -1;
} }
@ -1668,7 +1668,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
if (hc_path_is_directory (dictfile1) == true) if (hc_path_is_directory (dictfile1) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as wordlist argument", dictfile1); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a wordlist argument.", dictfile1);
return -1; return -1;
} }
@ -1689,7 +1689,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
if (hc_path_is_directory (dictfile2) == true) if (hc_path_is_directory (dictfile2) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as wordlist argument", dictfile2); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a wordlist argument.", dictfile2);
return -1; return -1;
} }
@ -1714,7 +1714,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (maskfile) == true) if (hc_path_is_directory (maskfile) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as maskfile argument", maskfile); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a maskfile argument.", maskfile);
return -1; return -1;
} }
@ -1751,7 +1751,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (maskfile) == true) if (hc_path_is_directory (maskfile) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as maskfile argument", maskfile); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a maskfile argument.", maskfile);
return -1; return -1;
} }
@ -1788,7 +1788,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (maskfile) == true) if (hc_path_is_directory (maskfile) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as maskfile argument", maskfile); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a maskfile argument.", maskfile);
return -1; return -1;
} }
@ -1811,7 +1811,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (logfile_ctx->logfile) == true) if (hc_path_is_directory (logfile_ctx->logfile) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as logfile argument", logfile_ctx->logfile); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a logfile argument.", logfile_ctx->logfile);
return -1; return -1;
} }
@ -1842,7 +1842,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (outcheck_ctx->root_directory) == false) if (hc_path_is_directory (outcheck_ctx->root_directory) == false)
{ {
event_log_error (hashcat_ctx, "Directory specified in outfile-check '%s' is not a directory", outcheck_ctx->root_directory); event_log_error (hashcat_ctx, "Directory specified in outfile-check '%s' is not a directory.", outcheck_ctx->root_directory);
return -1; return -1;
} }
@ -1857,7 +1857,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (outfile_ctx->filename) == true) if (hc_path_is_directory (outfile_ctx->filename) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as outfile", outfile_ctx->filename); event_log_error (hashcat_ctx, "%s: A directory cannot be used as an outfile.", outfile_ctx->filename);
return -1; return -1;
} }
@ -1954,7 +1954,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
if (memcmp (&tmpstat_outfile, &tmpstat_hashfile, sizeof (hc_stat_t)) == 0) if (memcmp (&tmpstat_outfile, &tmpstat_hashfile, sizeof (hc_stat_t)) == 0)
{ {
event_log_error (hashcat_ctx, "Hashfile and Outfile are not allowed to point to the same file"); event_log_error (hashcat_ctx, "Hashfile and outfile cannot point to the same file.");
return -1; return -1;
} }
@ -1967,7 +1967,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (pidfile_ctx->filename) == true) if (hc_path_is_directory (pidfile_ctx->filename) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as pidfile argument", pidfile_ctx->filename); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a pidfile argument.", pidfile_ctx->filename);
return -1; return -1;
} }
@ -1997,7 +1997,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (potfile_ctx->filename) == true) if (hc_path_is_directory (potfile_ctx->filename) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as potfile argument", potfile_ctx->filename); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a potfile argument.", potfile_ctx->filename);
return -1; return -1;
} }
@ -2028,7 +2028,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
{ {
if (hc_path_is_directory (dictstat_ctx->filename) == true) if (hc_path_is_directory (dictstat_ctx->filename) == true)
{ {
event_log_error (hashcat_ctx, "%s: Can't use directory as dictstat argument", dictstat_ctx->filename); event_log_error (hashcat_ctx, "%s: A directory cannot be used as a dictstat argument.", dictstat_ctx->filename);
return -1; return -1;
} }