Get rid of logging.c and most exit() calls replaced with return() for true library usage
This commit is contained in:
@@ -34,11 +34,11 @@ void *hc_dlsym (void *module, const char *symbol);
|
||||
if (noerr != -1) { \
|
||||
if (!ptr->name) { \
|
||||
if (noerr == 1) { \
|
||||
log_error ("ERROR: %s is missing from %s shared library.", #name, #libname); \
|
||||
exit (-1); \
|
||||
} else { \
|
||||
log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
|
||||
event_log_error (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return -1; \
|
||||
} else { \
|
||||
event_log_warning (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return 0; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
@@ -48,11 +48,11 @@ void *hc_dlsym (void *module, const char *symbol);
|
||||
if (noerr != -1) { \
|
||||
if (!ptr->name) { \
|
||||
if (noerr == 1) { \
|
||||
log_error ("ERROR: %s is missing from %s shared library.", #name, #libname); \
|
||||
exit (-1); \
|
||||
} else { \
|
||||
log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
|
||||
event_log_error (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return -1; \
|
||||
} else { \
|
||||
event_log_warning (hashcat_ctx, "%s is missing from %s shared library.", #name, #libname); \
|
||||
return 0; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
@@ -61,13 +61,12 @@ void *hc_dlsym (void *module, const char *symbol);
|
||||
ptr->name = (type) (*ptr->func) (addr); \
|
||||
if (!ptr->name) { \
|
||||
if (noerr == 1) { \
|
||||
log_error ("ERROR: %s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
exit (-1); \
|
||||
} else { \
|
||||
log_error ("WARNING: %s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
event_log_error (hashcat_ctx, "%s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
return -1; \
|
||||
} else { \
|
||||
event_log_warning (hashcat_ctx, "%s at address %08x is missing from %s shared library.", #name, addr, #libname); \
|
||||
return 0; \
|
||||
} \
|
||||
}
|
||||
|
||||
#endif // _DYNALOADER_H
|
||||
|
||||
|
||||
@@ -352,44 +352,6 @@ typedef struct hm_adl_lib
|
||||
|
||||
typedef hm_adl_lib_t ADL_PTR;
|
||||
|
||||
int adl_init (ADL_PTR *lib);
|
||||
void adl_close (ADL_PTR *lib);
|
||||
|
||||
void *HC_API_CALL ADL_Main_Memory_Alloc (const int iSize);
|
||||
|
||||
int hm_ADL_Main_Control_Destroy (ADL_PTR *adl);
|
||||
int hm_ADL_Main_Control_Create (ADL_PTR *adl, ADL_MAIN_MALLOC_CALLBACK callback, int iEnumConnectedAdapters);
|
||||
int hm_ADL_Adapter_NumberOfAdapters_Get (ADL_PTR *adl, int *lpNumAdapters);
|
||||
int hm_ADL_Adapter_AdapterInfo_Get (ADL_PTR *adl, LPAdapterInfo lpInfo, int iInputSize);
|
||||
int hm_ADL_Display_DisplayInfo_Get (ADL_PTR *adl, int iAdapterIndex, int *iNumDisplays, ADLDisplayInfo **lppInfo, int iForceDetect);
|
||||
int hm_ADL_Overdrive5_Temperature_Get (ADL_PTR *adl, int iAdapterIndex, int iThermalControllerIndex, ADLTemperature *lpTemperature);
|
||||
int hm_ADL_Overdrive6_Temperature_Get (ADL_PTR *adl, int iAdapterIndex, int *iTemperature);
|
||||
int hm_ADL_Overdrive_CurrentActivity_Get (ADL_PTR *adl, int iAdapterIndex, ADLPMActivity *lpActivity);
|
||||
int hm_ADL_Overdrive_ThermalDevices_Enum (ADL_PTR *adl, int iAdapterIndex, int iThermalControllerIndex, ADLThermalControllerInfo *lpThermalControllerInfo);
|
||||
int hm_ADL_Adapter_ID_Get (ADL_PTR *adl, int iAdapterIndex, int *lpAdapterID);
|
||||
int hm_ADL_Adapter_VideoBiosInfo_Get (ADL_PTR *adl, int iAdapterIndex, ADLBiosInfo *lpBiosInfo);
|
||||
int hm_ADL_Overdrive5_FanSpeedInfo_Get (ADL_PTR *adl, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedInfo *lpFanSpeedInfo);
|
||||
int hm_ADL_Overdrive5_FanSpeed_Get (ADL_PTR *adl, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Get (ADL_PTR *adl, int iAdapterIndex, ADLOD6FanSpeedInfo *lpFanSpeedInfo);
|
||||
int hm_ADL_Overdrive5_FanSpeed_Set (ADL_PTR *adl, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Set (ADL_PTR *adl, int iAdapterIndex, ADLOD6FanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive5_FanSpeedToDefault_Set (ADL_PTR *adl, int iAdapterIndex, int iThermalControllerIndex);
|
||||
int hm_ADL_Overdrive_ODParameters_Get (ADL_PTR *adl, int iAdapterIndex, ADLODParameters *lpOdParameters);
|
||||
int hm_ADL_Overdrive_ODPerformanceLevels_Get (ADL_PTR *adl, int iAdapterIndex, int iDefault, ADLODPerformanceLevels *lpOdPerformanceLevels);
|
||||
int hm_ADL_Overdrive_ODPerformanceLevels_Set (ADL_PTR *adl, int iAdapterIndex, ADLODPerformanceLevels *lpOdPerformanceLevels);
|
||||
int hm_ADL_Overdrive_PowerControlInfo_Get (ADL_PTR *adl, int iAdapterIndex, ADLOD6PowerControlInfo *);
|
||||
int hm_ADL_Overdrive_PowerControl_Get (ADL_PTR *adl, int iAdapterIndex, int *level);
|
||||
int hm_ADL_Overdrive_PowerControl_Set (ADL_PTR *adl, int iAdapterIndex, int level);
|
||||
int hm_ADL_Adapter_Active_Get (ADL_PTR *adl, int iAdapterIndex, int *lpStatus);
|
||||
//int hm_ADL_DisplayEnable_Set (ADL_PTR *adl, int iAdapterIndex, int *lpDisplayIndexList, int iDisplayListSize, int bPersistOnly);
|
||||
int hm_ADL_Overdrive_Caps (ADL_PTR *adl, int iAdapterIndex, int *od_supported, int *od_enabled, int *od_version);
|
||||
int hm_ADL_Overdrive_CurrentStatus_Get (ADL_PTR *adl, int iAdapterIndex, ADLOD6CurrentStatus *status);
|
||||
int hm_ADL_Overdrive_StateInfo_Get (ADL_PTR *adl, int iAdapterIndex, int type, ADLOD6MemClockState *state);
|
||||
int hm_ADL_Overdrive_Capabilities_Get (ADL_PTR *adl, int iAdapterIndex, ADLOD6Capabilities *caps);
|
||||
int hm_ADL_Overdrive_State_Set (ADL_PTR *adl, int iAdapterIndex, int type, ADLOD6StateInfo *state);
|
||||
int hm_ADL_Overdrive6_PowerControl_Caps (ADL_PTR *adl, int iAdapterIndex, int *lpSupported);
|
||||
int hm_ADL_Overdrive6_TargetTemperatureData_Get (ADL_PTR *adl, int iAdapterIndex, int *cur_temp, int *default_temp);
|
||||
int hm_ADL_Overdrive6_TargetTemperatureRangeInfo_Get (ADL_PTR *adl, int iAdapterIndex, ADLOD6ParameterRange *lpTargetTemperatureInfo);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Reset (ADL_PTR *adl, int iAdapterIndex);
|
||||
|
||||
#endif // _EXT_ADL_H
|
||||
|
||||
@@ -109,40 +109,4 @@ typedef hc_opencl_lib_t OCL_PTR;
|
||||
|
||||
const char *val2cstr_cl (cl_int CL_err);
|
||||
|
||||
int ocl_init (OCL_PTR *ocl);
|
||||
void ocl_close (OCL_PTR *ocl);
|
||||
|
||||
cl_int hc_clBuildProgram (OCL_PTR *ocl, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data);
|
||||
cl_int hc_clCreateBuffer (OCL_PTR *ocl, cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_mem *mem);
|
||||
cl_int hc_clCreateCommandQueue (OCL_PTR *ocl, cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_command_queue *command_queue);
|
||||
cl_int hc_clCreateContext (OCL_PTR *ocl, cl_context_properties *properties, cl_uint num_devices, const cl_device_id *devices, void (CL_CALLBACK *pfn_notify) (const char *, const void *, size_t, void *), void *user_data, cl_context *context);
|
||||
cl_int hc_clCreateKernel (OCL_PTR *ocl, cl_program program, const char *kernel_name, cl_kernel *kernel);
|
||||
cl_int hc_clCreateProgramWithBinary (OCL_PTR *ocl, cl_context context, cl_uint num_devices, const cl_device_id *device_list, const size_t *lengths, const unsigned char **binaries, cl_int *binary_status, cl_program *program);
|
||||
cl_int hc_clCreateProgramWithSource (OCL_PTR *ocl, cl_context context, cl_uint count, const char **strings, const size_t *lengths, cl_program *program);
|
||||
cl_int hc_clEnqueueCopyBuffer (OCL_PTR *ocl, cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t cb, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
cl_int hc_clEnqueueMapBuffer (OCL_PTR *ocl, cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t cb, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event, void **buf);
|
||||
cl_int hc_clEnqueueNDRangeKernel (OCL_PTR *ocl, cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
cl_int hc_clEnqueueReadBuffer (OCL_PTR *ocl, cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t cb, void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
cl_int hc_clEnqueueUnmapMemObject (OCL_PTR *ocl, cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
cl_int hc_clEnqueueWriteBuffer (OCL_PTR *ocl, cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t cb, const void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
cl_int hc_clFinish (OCL_PTR *ocl, cl_command_queue command_queue);
|
||||
cl_int hc_clFlush (OCL_PTR *ocl, cl_command_queue command_queue);
|
||||
cl_int hc_clGetDeviceIDs (OCL_PTR *ocl, cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices);
|
||||
cl_int hc_clGetDeviceInfo (OCL_PTR *ocl, cl_device_id device, cl_device_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
cl_int hc_clGetEventInfo (OCL_PTR *ocl, cl_event event, cl_event_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
cl_int hc_clGetEventProfilingInfo (OCL_PTR *ocl, cl_event event, cl_profiling_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
cl_int hc_clGetKernelWorkGroupInfo (OCL_PTR *ocl, cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
cl_int hc_clGetPlatformIDs (OCL_PTR *ocl, cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms);
|
||||
cl_int hc_clGetPlatformInfo (OCL_PTR *ocl, cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
cl_int hc_clGetProgramBuildInfo (OCL_PTR *ocl, cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
cl_int hc_clGetProgramInfo (OCL_PTR *ocl, cl_program program, cl_program_info param_name, size_t param_value_size, void *param_value, size_t * param_value_size_ret);
|
||||
cl_int hc_clReleaseCommandQueue (OCL_PTR *ocl, cl_command_queue command_queue);
|
||||
cl_int hc_clReleaseContext (OCL_PTR *ocl, cl_context context);
|
||||
cl_int hc_clReleaseEvent (OCL_PTR *ocl, cl_event event);
|
||||
cl_int hc_clReleaseKernel (OCL_PTR *ocl, cl_kernel kernel);
|
||||
cl_int hc_clReleaseMemObject (OCL_PTR *ocl, cl_mem mem);
|
||||
cl_int hc_clReleaseProgram (OCL_PTR *ocl, cl_program program);
|
||||
cl_int hc_clSetKernelArg (OCL_PTR *ocl, cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value);
|
||||
cl_int hc_clWaitForEvents (OCL_PTR *ocl, cl_uint num_events, const cl_event *event_list);
|
||||
|
||||
#endif // _EXT_OPENCL_H
|
||||
|
||||
@@ -255,18 +255,4 @@ typedef struct hm_nvapi_lib
|
||||
|
||||
typedef hm_nvapi_lib_t NVAPI_PTR;
|
||||
|
||||
int nvapi_init (NVAPI_PTR *nvapi);
|
||||
void nvapi_close (NVAPI_PTR *nvapi);
|
||||
|
||||
int hm_NvAPI_QueryInterface (NVAPI_PTR *nvapi, unsigned int offset);
|
||||
int hm_NvAPI_GetErrorMessage (NVAPI_PTR *nvapi, NvAPI_Status nr, NvAPI_ShortString szDesc);
|
||||
|
||||
NvAPI_Status hm_NvAPI_Initialize (NVAPI_PTR *nvapi);
|
||||
NvAPI_Status hm_NvAPI_Unload (NVAPI_PTR *nvapi);
|
||||
NvAPI_Status hm_NvAPI_EnumPhysicalGPUs (NVAPI_PTR *nvapi, NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
|
||||
NvAPI_Status hm_NvAPI_GPU_GetPerfPoliciesInfo (NVAPI_PTR *nvapi, NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_INFO_PARAMS_V1 *perfPolicies_info);
|
||||
NvAPI_Status hm_NvAPI_GPU_GetPerfPoliciesStatus (NVAPI_PTR *nvapi, NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1 *perfPolicies_status);
|
||||
NvAPI_Status hm_NvAPI_GPU_SetCoolerLevels (NVAPI_PTR *nvapi, NvPhysicalGpuHandle hPhysicalGpu, NvU32 coolerIndex, NV_GPU_COOLER_LEVELS *pCoolerLevels);
|
||||
NvAPI_Status hm_NvAPI_GPU_RestoreCoolerSettings (NVAPI_PTR *nvapi, NvPhysicalGpuHandle hPhysicalGpu, NvU32 coolerIndex);
|
||||
|
||||
#endif // _EXT_NVAPI_H
|
||||
|
||||
@@ -221,28 +221,4 @@ typedef struct hm_nvml_lib
|
||||
|
||||
typedef hm_nvml_lib_t NVML_PTR;
|
||||
|
||||
int nvml_init (NVML_PTR *lib);
|
||||
void nvml_close (NVML_PTR *lib);
|
||||
|
||||
const char * hm_NVML_nvmlErrorString (NVML_PTR *nvml, nvmlReturn_t nvml_rc);
|
||||
nvmlReturn_t hm_NVML_nvmlInit (NVML_PTR *nvml);
|
||||
nvmlReturn_t hm_NVML_nvmlShutdown (NVML_PTR *nvml);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetName (NVML_PTR *nvml, int, nvmlDevice_t device, char *name, unsigned int length);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetHandleByIndex (NVML_PTR *nvml, int, unsigned int index, nvmlDevice_t *device);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetTemperature (NVML_PTR *nvml, int, nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetFanSpeed (NVML_PTR *nvml, int, nvmlDevice_t device, unsigned int *speed);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetPowerUsage (NVML_PTR *nvml, int, nvmlDevice_t device, unsigned int *power);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetUtilizationRates (NVML_PTR *nvml, int, nvmlDevice_t device, nvmlUtilization_t *utilization);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetClockInfo (NVML_PTR *nvml, int, nvmlDevice_t device, nvmlClockType_t type, unsigned int *clock);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetTemperatureThreshold (NVML_PTR *nvml, int, nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int *temp);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkGeneration (NVML_PTR *nvml, int, nvmlDevice_t device, unsigned int *currLinkGen);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetCurrPcieLinkWidth (NVML_PTR *nvml, int, nvmlDevice_t device, unsigned int *currLinkWidth);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetCurrentClocksThrottleReasons (NVML_PTR *nvml, int, nvmlDevice_t device, unsigned long long *clocksThrottleReasons);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetSupportedClocksThrottleReasons (NVML_PTR *nvml, int, nvmlDevice_t device, unsigned long long *supportedClocksThrottleReasons);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceSetComputeMode (NVML_PTR *nvml, int, nvmlDevice_t device, nvmlComputeMode_t mode);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceSetGpuOperationMode (NVML_PTR *nvml, int, nvmlDevice_t device, nvmlGpuOperationMode_t mode);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetPowerManagementLimitConstraints (NVML_PTR *nvml, int, nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceSetPowerManagementLimit (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int limit);
|
||||
nvmlReturn_t hm_NVML_nvmlDeviceGetPowerManagementLimit (NVML_PTR *nvml, int skip_warnings, nvmlDevice_t device, unsigned int *limit);
|
||||
|
||||
#endif // _NVML_H
|
||||
|
||||
@@ -72,19 +72,4 @@ typedef struct hm_xnvctrl_lib
|
||||
|
||||
typedef hm_xnvctrl_lib_t XNVCTRL_PTR;
|
||||
|
||||
int xnvctrl_init (XNVCTRL_PTR *xnvctrl);
|
||||
void xnvctrl_close (XNVCTRL_PTR *xnvctrl);
|
||||
|
||||
int hm_XNVCTRL_XOpenDisplay (XNVCTRL_PTR *xnvctrl);
|
||||
void hm_XNVCTRL_XCloseDisplay (XNVCTRL_PTR *xnvctrl);
|
||||
|
||||
int get_core_threshold (XNVCTRL_PTR *xnvctrl, int gpu, int *val);
|
||||
|
||||
int get_fan_control (XNVCTRL_PTR *xnvctrl, int gpu, int *val);
|
||||
int set_fan_control (XNVCTRL_PTR *xnvctrl, int gpu, int val);
|
||||
|
||||
int get_fan_speed_current (XNVCTRL_PTR *xnvctrl, int gpu, int *val);
|
||||
int get_fan_speed_target (XNVCTRL_PTR *xnvctrl, int gpu, int *val);
|
||||
int set_fan_speed_target (XNVCTRL_PTR *xnvctrl, int gpu, int val);
|
||||
|
||||
#endif // _EXT_XNVCTRL_H
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
int sort_by_stringptr (const void *p1, const void *p2);
|
||||
|
||||
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);
|
||||
|
||||
@@ -11,7 +11,7 @@ int sort_by_salt (const void *v1, const void *v2);
|
||||
int sort_by_hash (const void *v1, const void *v2, void *v3);
|
||||
int sort_by_hash_no_salt (const void *v1, const void *v2, void *v3);
|
||||
|
||||
void save_hash (hashcat_ctx_t *hashcat_ctx);
|
||||
int save_hash (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain);
|
||||
|
||||
|
||||
103
include/hwmon.h
103
include/hwmon.h
@@ -6,6 +6,109 @@
|
||||
#ifndef _HWMON_H
|
||||
#define _HWMON_H
|
||||
|
||||
// nvml functions
|
||||
|
||||
int nvml_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void nvml_close (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hm_NVML_nvmlInit (hashcat_ctx_t *hashcat_ctx);
|
||||
int hm_NVML_nvmlShutdown (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hm_NVML_nvmlDeviceGetHandleByIndex (hashcat_ctx_t *hashcat_ctx, unsigned int index, nvmlDevice_t *device);
|
||||
|
||||
int hm_NVML_nvmlDeviceGetName (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, char *name, unsigned int length);
|
||||
int hm_NVML_nvmlDeviceGetTemperature (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp);
|
||||
int hm_NVML_nvmlDeviceGetFanSpeed (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned int *speed);
|
||||
int hm_NVML_nvmlDeviceGetPowerUsage (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned int *power);
|
||||
int hm_NVML_nvmlDeviceGetUtilizationRates (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, nvmlUtilization_t *utilization);
|
||||
int hm_NVML_nvmlDeviceGetClockInfo (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, nvmlClockType_t type, unsigned int *clock);
|
||||
int hm_NVML_nvmlDeviceGetTemperatureThreshold (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int *temp);
|
||||
int hm_NVML_nvmlDeviceGetCurrPcieLinkGeneration (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned int *currLinkGen);
|
||||
int hm_NVML_nvmlDeviceGetCurrPcieLinkWidth (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned int *currLinkWidth);
|
||||
int hm_NVML_nvmlDeviceGetCurrentClocksThrottleReasons (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned long long *clocksThrottleReasons);
|
||||
int hm_NVML_nvmlDeviceGetSupportedClocksThrottleReasons (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned long long *supportedClocksThrottleReasons);
|
||||
int hm_NVML_nvmlDeviceSetComputeMode (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, nvmlComputeMode_t mode);
|
||||
int hm_NVML_nvmlDeviceSetGpuOperationMode (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, nvmlGpuOperationMode_t mode);
|
||||
int hm_NVML_nvmlDeviceGetPowerManagementLimitConstraints (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit);
|
||||
int hm_NVML_nvmlDeviceSetPowerManagementLimit (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned int limit);
|
||||
int hm_NVML_nvmlDeviceGetPowerManagementLimit (hashcat_ctx_t *hashcat_ctx, nvmlDevice_t device, unsigned int *limit);
|
||||
|
||||
// nvapi functions
|
||||
|
||||
int nvapi_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void nvapi_close (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hm_NvAPI_QueryInterface (hashcat_ctx_t *hashcat_ctx, unsigned int offset);
|
||||
|
||||
int hm_NvAPI_Initialize (hashcat_ctx_t *hashcat_ctx);
|
||||
int hm_NvAPI_Unload (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hm_NvAPI_EnumPhysicalGPUs (hashcat_ctx_t *hashcat_ctx, NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
|
||||
int hm_NvAPI_GPU_GetPerfPoliciesInfo (hashcat_ctx_t *hashcat_ctx, NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_INFO_PARAMS_V1 *perfPolicies_info);
|
||||
int hm_NvAPI_GPU_GetPerfPoliciesStatus (hashcat_ctx_t *hashcat_ctx, NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_STATUS_PARAMS_V1 *perfPolicies_status);
|
||||
int hm_NvAPI_GPU_SetCoolerLevels (hashcat_ctx_t *hashcat_ctx, NvPhysicalGpuHandle hPhysicalGpu, NvU32 coolerIndex, NV_GPU_COOLER_LEVELS *pCoolerLevels);
|
||||
int hm_NvAPI_GPU_RestoreCoolerSettings (hashcat_ctx_t *hashcat_ctx, NvPhysicalGpuHandle hPhysicalGpu, NvU32 coolerIndex);
|
||||
|
||||
// xnvctrl functions
|
||||
|
||||
int xnvctrl_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void xnvctrl_close (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hm_XNVCTRL_XOpenDisplay (hashcat_ctx_t *hashcat_ctx);
|
||||
void hm_XNVCTRL_XCloseDisplay (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int get_core_threshold (hashcat_ctx_t *hashcat_ctx, const int gpu, int *val);
|
||||
|
||||
int get_fan_control (hashcat_ctx_t *hashcat_ctx, const int gpu, int *val);
|
||||
int set_fan_control (hashcat_ctx_t *hashcat_ctx, const int gpu, int val);
|
||||
|
||||
int get_fan_speed_current (hashcat_ctx_t *hashcat_ctx, const int gpu, int *val);
|
||||
int get_fan_speed_target (hashcat_ctx_t *hashcat_ctx, const int gpu, int *val);
|
||||
int set_fan_speed_target (hashcat_ctx_t *hashcat_ctx, const int gpu, int val);
|
||||
|
||||
// ADL functions
|
||||
|
||||
int adl_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void adl_close (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hm_ADL_Main_Control_Destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
int hm_ADL_Main_Control_Create (hashcat_ctx_t *hashcat_ctx, ADL_MAIN_MALLOC_CALLBACK callback, int iEnumConnectedAdapters);
|
||||
|
||||
int hm_ADL_Adapter_NumberOfAdapters_Get (hashcat_ctx_t *hashcat_ctx, int *lpNumAdapters);
|
||||
int hm_ADL_Adapter_AdapterInfo_Get (hashcat_ctx_t *hashcat_ctx, LPAdapterInfo lpInfo, int iInputSize);
|
||||
int hm_ADL_Display_DisplayInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *iNumDisplays, ADLDisplayInfo **lppInfo, int iForceDetect);
|
||||
int hm_ADL_Overdrive5_Temperature_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex, ADLTemperature *lpTemperature);
|
||||
int hm_ADL_Overdrive6_Temperature_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *iTemperature);
|
||||
int hm_ADL_Overdrive_CurrentActivity_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLPMActivity *lpActivity);
|
||||
int hm_ADL_Overdrive_ThermalDevices_Enum (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex, ADLThermalControllerInfo *lpThermalControllerInfo);
|
||||
int hm_ADL_Adapter_ID_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *lpAdapterID);
|
||||
int hm_ADL_Adapter_VideoBiosInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLBiosInfo *lpBiosInfo);
|
||||
int hm_ADL_Overdrive5_FanSpeedInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedInfo *lpFanSpeedInfo);
|
||||
int hm_ADL_Overdrive5_FanSpeed_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLOD6FanSpeedInfo *lpFanSpeedInfo);
|
||||
int hm_ADL_Overdrive5_FanSpeed_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLOD6FanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive5_FanSpeedToDefault_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex);
|
||||
int hm_ADL_Overdrive_ODParameters_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLODParameters *lpOdParameters);
|
||||
int hm_ADL_Overdrive_ODPerformanceLevels_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int iDefault, ADLODPerformanceLevels *lpOdPerformanceLevels);
|
||||
int hm_ADL_Overdrive_ODPerformanceLevels_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLODPerformanceLevels *lpOdPerformanceLevels);
|
||||
int hm_ADL_Overdrive_PowerControlInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLOD6PowerControlInfo *);
|
||||
int hm_ADL_Overdrive_PowerControl_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *level);
|
||||
int hm_ADL_Overdrive_PowerControl_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int level);
|
||||
int hm_ADL_Adapter_Active_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *lpStatus);
|
||||
//int hm_ADL_DisplayEnable_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *lpDisplayIndexList, int iDisplayListSize, int bPersistOnly);
|
||||
int hm_ADL_Overdrive_Caps (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *od_supported, int *od_enabled, int *od_version);
|
||||
int hm_ADL_Overdrive_CurrentStatus_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLOD6CurrentStatus *status);
|
||||
int hm_ADL_Overdrive_StateInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int type, ADLOD6MemClockState *state);
|
||||
int hm_ADL_Overdrive_Capabilities_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLOD6Capabilities *caps);
|
||||
int hm_ADL_Overdrive_State_Set (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int type, ADLOD6StateInfo *state);
|
||||
int hm_ADL_Overdrive6_PowerControl_Caps (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *lpSupported);
|
||||
int hm_ADL_Overdrive6_TargetTemperatureData_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, int *cur_temp, int *default_temp);
|
||||
int hm_ADL_Overdrive6_TargetTemperatureRangeInfo_Get (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex, ADLOD6ParameterRange *lpTargetTemperatureInfo);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Reset (hashcat_ctx_t *hashcat_ctx, int iAdapterIndex);
|
||||
|
||||
// general functions
|
||||
|
||||
int hm_get_threshold_slowdown_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id);
|
||||
int hm_get_threshold_shutdown_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id);
|
||||
int hm_get_temperature_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id);
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
|
||||
#if defined (F_SETLKW)
|
||||
|
||||
void lock_file (FILE *fp);
|
||||
int lock_file (FILE *fp);
|
||||
void unlock_file (FILE *fp);
|
||||
|
||||
#else
|
||||
|
||||
#define lock_file(dummy) {}
|
||||
#define unlock_file(dummy) {}
|
||||
#define lock_file(dummy) 0
|
||||
#define unlock_file(dummy)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _LOGGING_H
|
||||
#define _LOGGING_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
int log_out_nn (FILE *fp, const char *fmt, ...);
|
||||
int log_info_nn (const char *fmt, ...);
|
||||
int log_error_nn (const char *fmt, ...);
|
||||
|
||||
int log_out (FILE *fp, const char *fmt, ...);
|
||||
int log_info (const char *fmt, ...);
|
||||
int log_error (const char *fmt, ...);
|
||||
|
||||
#endif // _LOGGING_H
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifndef _MEMORY_H
|
||||
#define _MEMORY_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@@ -23,20 +23,18 @@
|
||||
void mp_css_split_cnt (const mask_ctx_t *mask_ctx, const hashconfig_t *hashconfig, const u32 css_cnt_orig, u32 css_cnt_rl[2]);
|
||||
void mp_css_append_salt (mask_ctx_t *mask_ctx, salt_t *salt_buf);
|
||||
void mp_css_unicode_expand (mask_ctx_t *mask_ctx);
|
||||
void mp_css_to_uniq_tbl (u32 css_cnt, cs_t *css, u32 uniq_tbls[SP_PW_MAX][CHARSIZ]);
|
||||
int mp_css_to_uniq_tbl (hashcat_ctx_t *hashcat_ctx, u32 css_cnt, cs_t *css, u32 uniq_tbls[SP_PW_MAX][CHARSIZ]);
|
||||
void mp_cut_at (char *mask, u32 max);
|
||||
u32 mp_get_length (char *mask);
|
||||
void mp_exec (u64 val, char *buf, cs_t *css, int css_cnt);
|
||||
cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, u32 *css_cnt, const hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
u64 mp_get_sum (u32 css_cnt, cs_t *css);
|
||||
void mp_setup_sys (cs_t *mp_sys);
|
||||
void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, u32 index, const hashconfig_t *hashconfig, const user_options_t *user_options);
|
||||
int mp_setup_usr (hashcat_ctx_t *hashcat_ctx, cs_t *mp_sys, cs_t *mp_usr, char *buf, u32 index);
|
||||
void mp_reset_usr (cs_t *mp_usr, u32 index);
|
||||
|
||||
u64 sp_get_sum (u32 start, u32 stop, cs_t *root_css_buf);
|
||||
void sp_exec (u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u32 start, u32 stop);
|
||||
int sp_comp_val (const void *p1, const void *p2);
|
||||
void sp_setup_tbl (const char *install_dir, char *hcstat, u32 disable, u32 classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf);
|
||||
void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u32 threshold, u32 uniq_tbls[SP_PW_MAX][CHARSIZ]);
|
||||
void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out);
|
||||
void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out);
|
||||
|
||||
@@ -18,6 +18,42 @@ static const char CL_VENDOR_MESA[] = "Mesa";
|
||||
static const char CL_VENDOR_NV[] = "NVIDIA Corporation";
|
||||
static const char CL_VENDOR_POCL[] = "The pocl project";
|
||||
|
||||
int ocl_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void ocl_close (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
int hc_clBuildProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data);
|
||||
int hc_clCreateBuffer (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_mem *mem);
|
||||
int hc_clCreateCommandQueue (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_command_queue *command_queue);
|
||||
int hc_clCreateContext (hashcat_ctx_t *hashcat_ctx, cl_context_properties *properties, cl_uint num_devices, const cl_device_id *devices, void (CL_CALLBACK *pfn_notify) (const char *, const void *, size_t, void *), void *user_data, cl_context *context);
|
||||
int hc_clCreateKernel (hashcat_ctx_t *hashcat_ctx, cl_program program, const char *kernel_name, cl_kernel *kernel);
|
||||
int hc_clCreateProgramWithBinary (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_uint num_devices, const cl_device_id *device_list, const size_t *lengths, const unsigned char **binaries, cl_int *binary_status, cl_program *program);
|
||||
int hc_clCreateProgramWithSource (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_uint count, const char **strings, const size_t *lengths, cl_program *program);
|
||||
int hc_clEnqueueCopyBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t cb, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
int hc_clEnqueueMapBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t cb, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event, void **buf);
|
||||
int hc_clEnqueueNDRangeKernel (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
int hc_clEnqueueReadBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t cb, void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
int hc_clEnqueueUnmapMemObject (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
int hc_clEnqueueWriteBuffer (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t cb, const void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event);
|
||||
int hc_clFinish (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue);
|
||||
int hc_clFlush (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue);
|
||||
int hc_clGetDeviceIDs (hashcat_ctx_t *hashcat_ctx, cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices);
|
||||
int hc_clGetDeviceInfo (hashcat_ctx_t *hashcat_ctx, cl_device_id device, cl_device_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
int hc_clGetEventInfo (hashcat_ctx_t *hashcat_ctx, cl_event event, cl_event_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
int hc_clGetEventProfilingInfo (hashcat_ctx_t *hashcat_ctx, cl_event event, cl_profiling_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
int hc_clGetKernelWorkGroupInfo (hashcat_ctx_t *hashcat_ctx, cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
int hc_clGetPlatformIDs (hashcat_ctx_t *hashcat_ctx, cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms);
|
||||
int hc_clGetPlatformInfo (hashcat_ctx_t *hashcat_ctx, cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
int hc_clGetProgramBuildInfo (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
|
||||
int hc_clGetProgramInfo (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_program_info param_name, size_t param_value_size, void *param_value, size_t * param_value_size_ret);
|
||||
int hc_clReleaseCommandQueue (hashcat_ctx_t *hashcat_ctx, cl_command_queue command_queue);
|
||||
int hc_clReleaseContext (hashcat_ctx_t *hashcat_ctx, cl_context context);
|
||||
int hc_clReleaseEvent (hashcat_ctx_t *hashcat_ctx, cl_event event);
|
||||
int hc_clReleaseKernel (hashcat_ctx_t *hashcat_ctx, cl_kernel kernel);
|
||||
int hc_clReleaseMemObject (hashcat_ctx_t *hashcat_ctx, cl_mem mem);
|
||||
int hc_clReleaseProgram (hashcat_ctx_t *hashcat_ctx, cl_program program);
|
||||
int hc_clSetKernelArg (hashcat_ctx_t *hashcat_ctx, cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value);
|
||||
int hc_clWaitForEvents (hashcat_ctx_t *hashcat_ctx, cl_uint num_events, const cl_event *event_list);
|
||||
|
||||
int gidd_to_pw_t (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw);
|
||||
int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 highest_pw_len, const u32 pws_cnt, const u32 fast_iteration, const u32 salt_pos);
|
||||
int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u32 num, const u32 event_update, const u32 iteration);
|
||||
|
||||
@@ -25,13 +25,7 @@
|
||||
|
||||
u64 get_lowest_words_done (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void init_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void read_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void write_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void cycle_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
int cycle_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void unlink_restore (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
#include <pwd.h>
|
||||
#endif // _POSIX
|
||||
|
||||
void process_stdout (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 pws_cnt);
|
||||
int process_stdout (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 pws_cnt);
|
||||
|
||||
#endif // _STDOUT_H
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
void welcome_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const char *version_tag);
|
||||
void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const time_t proc_stop);
|
||||
|
||||
int setup_console ();
|
||||
int setup_console (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
void send_prompt ();
|
||||
void clear_prompt ();
|
||||
|
||||
@@ -56,12 +56,12 @@ void hc_signal (void (callback) (int));
|
||||
#endif
|
||||
*/
|
||||
|
||||
void mycracked (status_ctx_t *status_ctx);
|
||||
void myabort (status_ctx_t *status_ctx);
|
||||
void myquit (status_ctx_t *status_ctx);
|
||||
void bypass (status_ctx_t *status_ctx);
|
||||
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 (status_ctx_t *status_ctx);
|
||||
void ResumeThreads (status_ctx_t *status_ctx);
|
||||
void SuspendThreads (hashcat_ctx_t *hashcat_ctx);
|
||||
void ResumeThreads (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
#endif // _THREAD_H
|
||||
|
||||
@@ -37,12 +37,6 @@ typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
||||
#include "ext_OpenCL.h"
|
||||
#include "ext_ADL.h"
|
||||
#include "ext_nvapi.h"
|
||||
#include "ext_nvml.h"
|
||||
#include "ext_xnvctrl.h"
|
||||
|
||||
// timer
|
||||
|
||||
#if defined (_WIN)
|
||||
@@ -418,6 +412,7 @@ typedef enum parser_rc
|
||||
PARSER_TC_FILE_SIZE = -15,
|
||||
PARSER_VC_FILE_SIZE = -16,
|
||||
PARSER_SIP_AUTH_DIRECTIVE = -17,
|
||||
PARSER_HASH_FILE = -18,
|
||||
PARSER_UNKNOWN_ERROR = -255
|
||||
|
||||
} parser_rc_t;
|
||||
@@ -613,6 +608,8 @@ typedef struct wordr
|
||||
|
||||
} wordr_t;
|
||||
|
||||
#include "ext_OpenCL.h"
|
||||
|
||||
typedef struct hc_device_param
|
||||
{
|
||||
cl_device_id device;
|
||||
@@ -819,15 +816,51 @@ typedef struct opencl_ctx
|
||||
|
||||
double target_ms;
|
||||
|
||||
int need_adl;
|
||||
int need_nvml;
|
||||
int need_nvapi;
|
||||
int need_xnvctrl;
|
||||
bool need_adl;
|
||||
bool need_nvml;
|
||||
bool need_nvapi;
|
||||
bool need_xnvctrl;
|
||||
|
||||
int force_jit_compilation;
|
||||
|
||||
} opencl_ctx_t;
|
||||
|
||||
#include "ext_ADL.h"
|
||||
#include "ext_nvapi.h"
|
||||
#include "ext_nvml.h"
|
||||
#include "ext_xnvctrl.h"
|
||||
|
||||
typedef struct hm_attrs
|
||||
{
|
||||
HM_ADAPTER_ADL adl;
|
||||
HM_ADAPTER_NVML nvml;
|
||||
HM_ADAPTER_NVAPI nvapi;
|
||||
HM_ADAPTER_XNVCTRL xnvctrl;
|
||||
|
||||
int od_version;
|
||||
|
||||
bool fan_get_supported;
|
||||
bool fan_set_supported;
|
||||
|
||||
} hm_attrs_t;
|
||||
|
||||
typedef struct hwmon_ctx
|
||||
{
|
||||
bool enabled;
|
||||
|
||||
void *hm_adl;
|
||||
void *hm_nvml;
|
||||
void *hm_nvapi;
|
||||
void *hm_xnvctrl;
|
||||
|
||||
hm_attrs_t *hm_device;
|
||||
|
||||
ADLOD6MemClockState *od_clock_mem_status;
|
||||
int *od_power_control_status;
|
||||
unsigned int *nvml_power_limit;
|
||||
|
||||
} hwmon_ctx_t;
|
||||
|
||||
#if defined (__APPLE__)
|
||||
typedef struct cpu_set
|
||||
{
|
||||
@@ -888,20 +921,6 @@ typedef struct dictstat_ctx
|
||||
|
||||
} dictstat_ctx_t;
|
||||
|
||||
typedef struct hm_attrs
|
||||
{
|
||||
HM_ADAPTER_ADL adl;
|
||||
HM_ADAPTER_NVML nvml;
|
||||
HM_ADAPTER_NVAPI nvapi;
|
||||
HM_ADAPTER_XNVCTRL xnvctrl;
|
||||
|
||||
int od_version;
|
||||
|
||||
bool fan_get_supported;
|
||||
bool fan_set_supported;
|
||||
|
||||
} hm_attrs_t;
|
||||
|
||||
typedef struct loopback_ctx
|
||||
{
|
||||
bool enabled;
|
||||
@@ -1301,23 +1320,6 @@ typedef struct mask_ctx
|
||||
|
||||
} mask_ctx_t;
|
||||
|
||||
typedef struct hwmon_ctx
|
||||
{
|
||||
bool enabled;
|
||||
|
||||
void *hm_adl;
|
||||
void *hm_nvml;
|
||||
void *hm_nvapi;
|
||||
void *hm_xnvctrl;
|
||||
|
||||
hm_attrs_t *hm_device;
|
||||
|
||||
ADLOD6MemClockState *od_clock_mem_status;
|
||||
int *od_power_control_status;
|
||||
unsigned int *nvml_power_limit;
|
||||
|
||||
} hwmon_ctx_t;
|
||||
|
||||
typedef struct cpt_ctx
|
||||
{
|
||||
bool enabled;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#ifndef _USAGE_H
|
||||
#define _USAGE_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void usage_mini_print (const char *progname);
|
||||
void usage_big_print (const char *progname);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user