Folder Management: Add support for XDG Base Directory specification if hashcat was installed using make install

pull/2806/head
Jens Steube 3 years ago
parent c9db099330
commit 23ba4f0b66

@ -35,6 +35,7 @@
- AES Crypt Plugin: Reduced max password length from 256 to 128 which improved performance by 22% - AES Crypt Plugin: Reduced max password length from 256 to 128 which improved performance by 22%
- CUDA Backend: Do not warn about missing CUDA SDK installation if --stdout is used - CUDA Backend: Do not warn about missing CUDA SDK installation if --stdout is used
- Folder Management: Add support for XDG Base Directory specification if hashcat was installed using make install
- OpenCL Backend: Use CL_DEVICE_BOARD_NAME_AMD instead of CL_DEVICE_NAME for device name in case OpenCL runtime supports this query - OpenCL Backend: Use CL_DEVICE_BOARD_NAME_AMD instead of CL_DEVICE_NAME for device name in case OpenCL runtime supports this query
- Performance Monitor: Add -S as a user suggestion to improve cracking performance in specific attack configurations - Performance Monitor: Add -S as a user suggestion to improve cracking performance in specific attack configurations
- RAR3-p (Compressed): Fix workaround in unrar library in AES constant table generation to enable multi-threading support - RAR3-p (Compressed): Fix workaround in unrar library in AES constant table generation to enable multi-threading support

@ -480,12 +480,10 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
cache_dir = NULL; cache_dir = NULL;
hcfree (session_dir); hcfree (session_dir);
session_dir = NULL; session_dir = NULL;
hcfree (cpath_real); hcfree (cpath_real);
cpath_real = NULL; cpath_real = NULL;
@ -571,25 +569,21 @@ int hc_mkdir (const char *name, MAYBE_UNUSED const int mode)
int hc_mkdir_rec (const char *path, MAYBE_UNUSED const int mode) int hc_mkdir_rec (const char *path, MAYBE_UNUSED const int mode)
{ {
char *subpath, *fullpath; char *fullpath = hcstrdup (path);
char *subpath = dirname (fullpath);
fullpath = hcstrdup (path);
subpath = dirname (fullpath);
if (strlen (subpath) > 1) if (strlen (subpath) > 1)
{ {
if (hc_mkdir_rec (subpath, mode) == -1) { if (hc_mkdir_rec (subpath, mode) == -1) return -1;
return -1;
};
} }
if (hc_mkdir (path, mode) == -1) if (hc_mkdir (path, mode) == -1)
{ {
if (errno != EEXIST) if (errno != EEXIST) return -1;
{
return -1;
}
} }
hcfree (fullpath); hcfree (fullpath);
return 0; return 0;
} }

Loading…
Cancel
Save