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
|
|
|
|
*/
|
|
|
|
|
2023-01-30 14:41:12 +00:00
|
|
|
#ifndef HC_FOLDER_H
|
|
|
|
#define HC_FOLDER_H
|
2020-10-23 15:29:39 +00:00
|
|
|
|
2016-09-06 16:23:26 +00:00
|
|
|
#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
|
|
|
|
2017-02-23 23:55:06 +00:00
|
|
|
#if defined (_WIN)
|
|
|
|
#include <windows.h>
|
|
|
|
#include <direct.h>
|
|
|
|
#else
|
2016-09-06 16:23:26 +00:00
|
|
|
#include <sys/types.h>
|
2016-09-22 09:05:04 +00:00
|
|
|
#include <pwd.h>
|
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__
|
2017-02-23 23:55:06 +00:00
|
|
|
#endif // _WIN
|
2016-09-06 16:23:26 +00:00
|
|
|
|
|
|
|
#define DOT_HASHCAT ".hashcat"
|
|
|
|
#define SESSIONS_FOLDER "sessions"
|
|
|
|
|
2016-09-07 10:45:08 +00:00
|
|
|
int count_dictionaries (char **dictionary_files);
|
|
|
|
|
2016-11-05 22:19:13 +00:00
|
|
|
char *first_file_in_directory (const char *path);
|
|
|
|
|
2016-11-20 21:54:52 +00:00
|
|
|
char **scan_directory (const char *path);
|
2016-09-21 21:06:11 +00:00
|
|
|
|
2016-10-10 07:12:36 +00:00
|
|
|
int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *install_folder, MAYBE_UNUSED const char *shared_folder);
|
2016-10-06 14:17:29 +00:00
|
|
|
void folder_config_destroy (hashcat_ctx_t *hashcat_ctx);
|
2016-10-01 11:51:06 +00:00
|
|
|
|
2016-10-10 07:12:36 +00:00
|
|
|
int hc_mkdir (const char *name, MAYBE_UNUSED const int mode);
|
2021-06-05 18:48:03 +00:00
|
|
|
int hc_mkdir_rec (const char *path, MAYBE_UNUSED const int mode);
|
2020-10-23 15:29:39 +00:00
|
|
|
|
2023-01-30 14:41:12 +00:00
|
|
|
#endif // HC_FOLDER_H
|