Prepare hashcat_get_status()
This commit is contained in:
+11
-3
@@ -6,9 +6,17 @@
|
||||
#ifndef _HASHCAT_H
|
||||
#define _HASHCAT_H
|
||||
|
||||
int hashcat (hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_folder, int argc, char **argv, const int comptime);
|
||||
int hashcat_init (hashcat_ctx_t *hashcat_ctx, void (*event) (const u32, struct hashcat_ctx *, const void *, const size_t));
|
||||
void hashcat_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hashcat_ctx_init (hashcat_ctx_t *hashcat_ctx, void (*event) (const u32, struct hashcat_ctx *, const void *, const size_t));
|
||||
void hashcat_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_session_run (hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_folder, int argc, char **argv, const int comptime);
|
||||
int hashcat_session_pause (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_session_resume (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_session_bypass (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_session_checkpoint (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_session_quit (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
char *hashcat_get_log (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_status);
|
||||
|
||||
#endif // _HASHCAT_H
|
||||
|
||||
@@ -29,8 +29,6 @@ int cycle_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void unlink_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void stop_at_checkpoint (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int restore_ctx_init (hashcat_ctx_t *hashcat_ctx, int argc, char **argv);
|
||||
|
||||
void restore_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
+16
-9
@@ -12,16 +12,23 @@
|
||||
|
||||
double get_avg_exec_time (hc_device_param_t *device_param, const int last_num_entries);
|
||||
|
||||
void status_display_machine_readable (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_display (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_benchmark_automate (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_benchmark (hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_session (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_status_string (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_hash_type (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int status_progress_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_progress_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_progress_reset (hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_input_mode (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_input_base (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_input_mod (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_input_charset (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_input_masks_pos (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_input_masks_cnt (const hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int status_ctx_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
int status_progress_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_progress_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_progress_reset (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int status_ctx_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
#endif // _STATUS_H
|
||||
|
||||
@@ -42,3 +42,8 @@ int tty_getchar();
|
||||
int tty_fix();
|
||||
|
||||
#endif // _TERMINAL_H
|
||||
|
||||
void status_display_machine_readable (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_display (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_benchmark_automate (hashcat_ctx_t *hashcat_ctx);
|
||||
void status_benchmark (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
+7
-7
@@ -56,12 +56,12 @@ void hc_signal (void (callback) (int));
|
||||
#endif
|
||||
*/
|
||||
|
||||
void mycracked (hashcat_ctx_t *hashcat_ctx);
|
||||
void myabort (hashcat_ctx_t *hashcat_ctx);
|
||||
void myquit (hashcat_ctx_t *hashcat_ctx);
|
||||
void bypass (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void SuspendThreads (hashcat_ctx_t *hashcat_ctx);
|
||||
void ResumeThreads (hashcat_ctx_t *hashcat_ctx);
|
||||
int mycracked (hashcat_ctx_t *hashcat_ctx);
|
||||
int myabort (hashcat_ctx_t *hashcat_ctx);
|
||||
int myquit (hashcat_ctx_t *hashcat_ctx);
|
||||
int bypass (hashcat_ctx_t *hashcat_ctx);
|
||||
int SuspendThreads (hashcat_ctx_t *hashcat_ctx);
|
||||
int ResumeThreads (hashcat_ctx_t *hashcat_ctx);
|
||||
int stop_at_checkpoint (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
#endif // _THREAD_H
|
||||
|
||||
@@ -1452,6 +1452,49 @@ typedef struct hashcat_ctx
|
||||
|
||||
} hashcat_ctx_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool skipped;
|
||||
|
||||
|
||||
} device_info_t;
|
||||
|
||||
typedef enum input_mode
|
||||
{
|
||||
INPUT_MODE_NONE = 0,
|
||||
INPUT_MODE_STRAIGHT_FILE = 1,
|
||||
INPUT_MODE_STRAIGHT_FILE_RULES_FILE = 2,
|
||||
INPUT_MODE_STRAIGHT_FILE_RULES_GEN = 3,
|
||||
INPUT_MODE_STRAIGHT_STDIN = 4,
|
||||
INPUT_MODE_STRAIGHT_STDIN_RULES_FILE = 5,
|
||||
INPUT_MODE_STRAIGHT_STDIN_RULES_GEN = 6,
|
||||
INPUT_MODE_COMBINATOR_BASE_LEFT = 7,
|
||||
INPUT_MODE_COMBINATOR_BASE_RIGHT = 8,
|
||||
INPUT_MODE_MASK = 9,
|
||||
INPUT_MODE_MASK_CS = 10,
|
||||
INPUT_MODE_HYBRID1 = 11,
|
||||
INPUT_MODE_HYBRID1_CS = 12,
|
||||
INPUT_MODE_HYBRID2 = 13,
|
||||
INPUT_MODE_HYBRID2_CS = 14,
|
||||
|
||||
} input_mode_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *status;
|
||||
char *session;
|
||||
int input_mode;
|
||||
char *input_base;
|
||||
char *input_mod;
|
||||
char *input_charset;
|
||||
char *hash_type;
|
||||
char *hash_target;
|
||||
|
||||
device_info_t device_info_buf[DEVICES_MAX];
|
||||
int device_info_cnt;
|
||||
|
||||
} hashcat_status_t;
|
||||
|
||||
typedef struct thread_param
|
||||
{
|
||||
u32 tid;
|
||||
|
||||
Reference in New Issue
Block a user