Move tons of functions from hashcat.c into hash_management, interface, opencl, restore, status and weak_hash sources
This commit is contained in:
@@ -6,4 +6,12 @@
|
||||
#ifndef _HASH_MANAGEMENT_H
|
||||
#define _HASH_MANAGEMENT_H
|
||||
|
||||
#define USERNAME 0
|
||||
|
||||
void save_hash ();
|
||||
|
||||
void check_hash (hc_device_param_t *device_param, plain_t *plain);
|
||||
|
||||
int check_cracked (hc_device_param_t *device_param, const uint salt_pos, hashconfig_t *hashconfig);
|
||||
|
||||
#endif // _HASH_MANAGEMENT_H
|
||||
|
||||
@@ -1658,6 +1658,7 @@ int opencart_parse_hash (char *input_buf, uint input_len, hash_t *hash
|
||||
* output functions
|
||||
*/
|
||||
|
||||
char *stroptitype (const uint opti_type);
|
||||
char *strhashtype (const uint hash_mode);
|
||||
char *strparser (const uint parser_status);
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _KERNEL_H
|
||||
#define _KERNEL_H
|
||||
|
||||
#endif // _KERNEL_H
|
||||
+24
-2
@@ -11,6 +11,18 @@
|
||||
|
||||
#define PARAMCNT 64
|
||||
|
||||
|
||||
#define KERNEL_ACCEL 0
|
||||
#define KERNEL_LOOPS 0
|
||||
#define KERNEL_RULES 1024
|
||||
#define KERNEL_COMBS 1024
|
||||
#define KERNEL_BFS 1024
|
||||
#define KERNEL_THREADS_MAX 256
|
||||
#define KERNEL_THREADS_MAX_CPU 1
|
||||
#define WORKLOAD_PROFILE 2
|
||||
#define SCRYPT_TMTO 0
|
||||
#define NVIDIA_SPIN_DAMP 100
|
||||
|
||||
static const char CL_VENDOR_AMD[] = "Advanced Micro Devices, Inc.";
|
||||
static const char CL_VENDOR_AMD_USE_INTEL[] = "GenuineIntel";
|
||||
static const char CL_VENDOR_APPLE[] = "Apple";
|
||||
@@ -222,6 +234,16 @@ cl_device_type setup_device_types_filter (char *opencl_device_types);
|
||||
void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const u8 **kernel_sources);
|
||||
void writeProgramBin (char *dst, u8 *binary, size_t binary_size);
|
||||
|
||||
double get_avg_exec_time (hc_device_param_t *device_param, const int last_num_entries);
|
||||
|
||||
int gidd_to_pw_t (hc_device_param_t *device_param, const u64 gidd, pw_t *pw);
|
||||
|
||||
int choose_kernel (hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration);
|
||||
int run_kernel (const uint kern_run, hc_device_param_t *device_param, const uint num, const uint event_update, const uint iteration, hashconfig_t *hashconfig);
|
||||
int run_kernel_mp (const uint kern_run, hc_device_param_t *device_param, const uint num);
|
||||
int run_kernel_tm (hc_device_param_t *device_param);
|
||||
int run_kernel_amp (hc_device_param_t *device_param, const uint num);
|
||||
int run_kernel_memset (hc_device_param_t *device_param, cl_mem buf, const uint value, const uint num);
|
||||
int run_kernel_bzero (hc_device_param_t *device_param, cl_mem buf, const size_t size);
|
||||
|
||||
int run_copy (hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint pws_cnt);
|
||||
|
||||
int run_cracker (hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint pws_cnt);
|
||||
|
||||
@@ -57,4 +57,8 @@ void write_restore (const char *new_restore_file, restore_data_t *rd);
|
||||
|
||||
void cycle_restore ();
|
||||
|
||||
void check_checkpoint ();
|
||||
|
||||
void stop_at_checkpoint ();
|
||||
|
||||
#endif // _RESTORE_H
|
||||
|
||||
@@ -29,6 +29,8 @@ typedef enum status_rc
|
||||
|
||||
} status_rc_t;
|
||||
|
||||
double get_avg_exec_time (hc_device_param_t *device_param, const int last_num_entries);
|
||||
|
||||
void status_display_machine_readable ();
|
||||
void status_display ();
|
||||
void status_benchmark_automate ();
|
||||
|
||||
@@ -6,4 +6,8 @@
|
||||
#ifndef _WEAK_HASH_H
|
||||
#define _WEAK_HASH_H
|
||||
|
||||
#define WEAK_HASH_THRESHOLD 100
|
||||
|
||||
void weak_hash_check (hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint salt_pos);
|
||||
|
||||
#endif // _WEAK_HASH_H
|
||||
|
||||
Reference in New Issue
Block a user