From 02e2ef63fba1be0e5a9f336dafc9eb2622c1ebb6 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Wed, 29 Jul 2020 11:26:45 +0200 Subject: [PATCH] Fixed unresolvable relative paths in hashcat.log --- docs/changes.txt | 6 ++++++ src/hashcat.c | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index f1b701f8b..0a4ccb304 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,5 +1,11 @@ * changes v6.1.0 -> v6.x.x +## +## Bugs +## + +- Fixed unresolvable relative paths in hashcat.log + * changes v6.0.0 -> v6.1.0 ## diff --git a/src/hashcat.c b/src/hashcat.c index 3648df812..4770734e9 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -1128,9 +1128,10 @@ int hashcat_session_init (hashcat_ctx_t *hashcat_ctx, const char *install_folder int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx) { - logfile_ctx_t *logfile_ctx = hashcat_ctx->logfile_ctx; - status_ctx_t *status_ctx = hashcat_ctx->status_ctx; - user_options_t *user_options = hashcat_ctx->user_options; + folder_config_t *folder_config = hashcat_ctx->folder_config; + logfile_ctx_t *logfile_ctx = hashcat_ctx->logfile_ctx; + status_ctx_t *status_ctx = hashcat_ctx->status_ctx; + user_options_t *user_options = hashcat_ctx->user_options; // start logfile entry @@ -1140,6 +1141,15 @@ int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx) logfile_top_msg ("START"); + // capture current working directory in session log + // https://github.com/hashcat/hashcat/issues/2453 + + logfile_top_string (folder_config->cwd); + logfile_top_string (folder_config->install_dir); + logfile_top_string (folder_config->profile_dir); + logfile_top_string (folder_config->session_dir); + logfile_top_string (folder_config->shared_dir); + // add all user options to logfile in case we want to debug some user session user_options_logger (hashcat_ctx);