1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-16 19:58:25 +00:00

this patch makes it much clearer where the sessions under ~/.hashcat are located

This commit is contained in:
philsmd 2016-01-03 17:11:36 +01:00
parent f9dd03eb79
commit d378319ea6
3 changed files with 7 additions and 5 deletions

View File

@ -1925,7 +1925,7 @@ void truecrypt_crc32 (char *file, unsigned char keytab[64]);
char *get_exec_path ();
char *get_install_dir (const char *progname);
char *get_profile_dir (const char *homedir);
char *get_session_dir (const char *profile_dir, const char *session);
char *get_session_dir (const char *profile_dir);
uint get_vliw_by_compute_capability (const uint major, const uint minor);
uint get_vliw_by_device_name (const char *device_name);

View File

@ -5333,7 +5333,7 @@ int main (int argc, char **argv)
const char *homedir = pw->pw_dir;
profile_dir = get_profile_dir (homedir);
session_dir = get_session_dir (profile_dir, session);
session_dir = get_session_dir (profile_dir);
shared_dir = strdup (SHARED_FOLDER);
mkdir (profile_dir, 0700);

View File

@ -4132,11 +4132,13 @@ char *get_profile_dir (const char *homedir)
return profile_dir;
}
char *get_session_dir (const char *profile_dir, const char *session)
char *get_session_dir (const char *profile_dir)
{
char *session_dir = (char *) mymalloc (strlen (profile_dir) + 1 + strlen (session) + 1);
#define SESSIONS_FOLDER "sessions"
sprintf (session_dir, "%s/%s", profile_dir, session);
char *session_dir = (char *) mymalloc (strlen (profile_dir) + 1 + strlen (SESSIONS_FOLDER) + 1);
sprintf (session_dir, "%s/%s", profile_dir, SESSIONS_FOLDER);
return session_dir;
}