2016-09-06 16:23:26 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-06 16:23:26 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2016-09-22 09:05:04 +00:00
|
|
|
#include <stdlib.h>
|
2016-09-07 10:45:08 +00:00
|
|
|
#include <errno.h>
|
|
|
|
#include <dirent.h>
|
2016-09-06 16:23:26 +00:00
|
|
|
#include <unistd.h>
|
2016-09-22 09:05:04 +00:00
|
|
|
#include <limits.h>
|
2016-09-06 16:23:26 +00:00
|
|
|
|
2016-09-07 20:29:57 +00:00
|
|
|
#if defined (_POSIX)
|
2016-09-06 16:23:26 +00:00
|
|
|
#include <sys/types.h>
|
2016-09-22 09:05:04 +00:00
|
|
|
#include <pwd.h>
|
|
|
|
#endif
|
|
|
|
|
2016-09-07 20:29:57 +00:00
|
|
|
#if defined (__APPLE__)
|
2016-09-06 20:25:54 +00:00
|
|
|
#include <mach-o/dyld.h>
|
|
|
|
#endif // __APPLE__
|
2016-09-21 21:06:11 +00:00
|
|
|
|
2016-09-07 20:29:57 +00:00
|
|
|
#if defined (_WIN)
|
2016-09-06 16:23:26 +00:00
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define DOT_HASHCAT ".hashcat"
|
|
|
|
#define SESSIONS_FOLDER "sessions"
|
|
|
|
|
2016-09-11 08:53:29 +00:00
|
|
|
#if defined (_WIN)
|
|
|
|
#define mkdir(name,mode) mkdir (name)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int sort_by_stringptr (const void *p1, const void *p2);
|
|
|
|
|
2016-09-06 16:23:26 +00:00
|
|
|
char *get_exec_path (void);
|
|
|
|
char *get_install_dir (const char *progname);
|
|
|
|
char *get_profile_dir (const char *homedir);
|
|
|
|
char *get_session_dir (const char *profile_dir);
|
2016-09-07 10:45:08 +00:00
|
|
|
|
|
|
|
int count_dictionaries (char **dictionary_files);
|
|
|
|
|
|
|
|
char **scan_directory (const char *path);
|
2016-09-21 21:06:11 +00:00
|
|
|
|
|
|
|
int folder_config_init (folder_config_t *folder_config, const char *install_folder, const char *shared_folder);
|
|
|
|
void folder_config_destroy (folder_config_t *folder_config);
|