Output cracked hashes on Windows using \r\n and not \n

Replace RegGetValue() with RegQueryValueEx() to enable Windows XP 32 bit compatibility
This fixes https://github.com/hashcat/hashcat/issues/418
pull/443/head
jsteube 8 years ago
parent 62390b9cfa
commit 2b7e36b042

@ -16,6 +16,8 @@
- Get rid of exit() calls in OpenCL wrapper library with the goal to have a better control which error can be ignored under special circumstances
- Do not error and exit if an OpenCL platform has no devices, just print a warning and continue with the next platform
- Workaround OpenCL runtimes that do not accept -I parameter in the OpenCL kernel build options even if this is an OpenCL standard option
- Output cracked hashes on Windows using \r\n and not \n
- Replace RegGetValue() with RegQueryValueEx() to enable Windows XP 32 bit compatibility
##
## Bugs

@ -20,9 +20,35 @@ int nvml_init (NVML_PTR *nvml)
{
DWORD BufferSize = 1024;
char *Buffer = (char *) mymalloc (BufferSize);
DWORD Type = REG_SZ;
RegGetValue (HKEY_LOCAL_MACHINE, "SOFTWARE\\NVIDIA Corporation\\Global\\NVSMI", "NVSMIPATH", RRF_RT_ANY, NULL, (PVOID) Buffer, &BufferSize);
char *Buffer = (char *) mymalloc (BufferSize + 1);
HKEY hKey = 0;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\NVIDIA Corporation\\Global\\NVSMI"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
{
if (RegQueryValueEx (hKey, TEXT("NVSMIPATH"), NULL, &Type, (PVOID) Buffer, &BufferSize) == ERROR_SUCCESS)
{
Buffer[BufferSize] = 0;
}
else
{
if (data.quiet == 0)
log_info ("WARNING: NVML library load failed, proceed without NVML HWMon enabled.");
return -1;
}
RegCloseKey (hKey);
}
else
{
if (data.quiet == 0)
log_info ("WARNING: NVML library load failed, proceed without NVML HWMon enabled.");
return -1;
}
strcat (Buffer, "\\nvml.dll");

@ -5227,7 +5227,7 @@ void format_output (FILE *out_fp, char *out_buf, unsigned char *plain_ptr, const
#endif
}
fputc ('\n', out_fp);
fputs (EOL, out_fp);
}
void handle_show_request (pot_t *pot, uint pot_cnt, char *input_buf, int input_len, hash_t *hashes_buf, int (*sort_by_pot) (const void *, const void *), FILE *out_fp)

Loading…
Cancel
Save