mirror of
https://github.com/hashcat/hashcat
synced 2024-12-23 14:13:43 +01:00
fix string
This commit is contained in:
parent
fee364ec7a
commit
21efc80975
@ -9,7 +9,7 @@
|
||||
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_session_init (hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_folder, int argc, char **argv, const int comptime);
|
||||
int hashcat_session_init (hashcat_ctx_t *hashcat_ctx, const char *install_folder, const char *shared_folder, int argc, char **argv, const int comptime);
|
||||
int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_session_pause (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashcat_session_resume (hashcat_ctx_t *hashcat_ctx);
|
||||
|
@ -1783,6 +1783,6 @@ u32 hashconfig_get_kernel_threads (hashcat_ctx_t *hashcat_ctx, const hc_devi
|
||||
u32 hashconfig_get_kernel_loops (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx);
|
||||
void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, void *esalt, void *hook_salt);
|
||||
char *hashconfig_benchmark_mask (hashcat_ctx_t *hashcat_ctx);
|
||||
const char *hashconfig_benchmark_mask (hashcat_ctx_t *hashcat_ctx);
|
||||
|
||||
#endif // _INTERFACE_H
|
||||
|
@ -35,7 +35,7 @@ char *status_get_guess_charset (const hashcat_ctx_t *hashcat_ctx)
|
||||
int status_get_guess_mask_length (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_guess_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
|
||||
char *status_get_hash_type (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx);
|
||||
const char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_digests_cnt (const hashcat_ctx_t *hashcat_ctx);
|
||||
double status_get_digests_percent (const hashcat_ctx_t *hashcat_ctx);
|
||||
|
@ -745,7 +745,7 @@ typedef struct logfile_ctx
|
||||
|
||||
typedef struct hashes
|
||||
{
|
||||
char *hashfile;
|
||||
const char *hashfile;
|
||||
|
||||
u32 hashlist_mode;
|
||||
u32 hashlist_format;
|
||||
@ -1356,7 +1356,7 @@ typedef struct tuning_db_alias
|
||||
|
||||
typedef struct tuning_db_entry
|
||||
{
|
||||
char *device_name;
|
||||
const char *device_name;
|
||||
int attack_mode;
|
||||
int hash_type;
|
||||
int workload_profile;
|
||||
@ -1394,7 +1394,7 @@ typedef struct wl_data
|
||||
|
||||
typedef struct user_options
|
||||
{
|
||||
char *hc_bin;
|
||||
const char *hc_bin;
|
||||
|
||||
int hc_argc;
|
||||
char **hc_argv;
|
||||
@ -1466,7 +1466,7 @@ typedef struct user_options
|
||||
char *rule_buf_l;
|
||||
char *rule_buf_r;
|
||||
char separator;
|
||||
char *session;
|
||||
const char *session;
|
||||
char *truecrypt_keyfiles;
|
||||
char *veracrypt_keyfiles;
|
||||
u32 attack_mode;
|
||||
@ -1665,7 +1665,7 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *hash_target;
|
||||
const char *hash_target;
|
||||
char *hash_type;
|
||||
int guess_mode;
|
||||
char *guess_base;
|
||||
|
@ -141,6 +141,7 @@ CFLAGS += -Winit-self
|
||||
CFLAGS += -Werror-implicit-function-declaration
|
||||
CFLAGS += -Wformat
|
||||
CFLAGS += -ftrapv
|
||||
CFLAGS += -Wwrite-strings
|
||||
|
||||
# the following compiler options produce warnings that should be fixed at some time
|
||||
|
||||
@ -148,7 +149,6 @@ CFLAGS += -ftrapv
|
||||
#CFLAGS += -Wcast-align
|
||||
#CFLAGS += -Wcast-qual
|
||||
#CFLAGS += -Wsign-conversion
|
||||
#CFLAGS += -Wwrite-strings
|
||||
#CFLAGS += -pedantic
|
||||
endif
|
||||
|
||||
|
@ -886,7 +886,7 @@ void hashcat_destroy (hashcat_ctx_t *hashcat_ctx)
|
||||
memset (hashcat_ctx, 0, sizeof (hashcat_ctx_t));
|
||||
}
|
||||
|
||||
int hashcat_session_init (hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_folder, int argc, char **argv, const int comptime)
|
||||
int hashcat_session_init (hashcat_ctx_t *hashcat_ctx, const char *install_folder, const char *shared_folder, int argc, char **argv, const int comptime)
|
||||
{
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
|
@ -118,7 +118,7 @@ int save_hash (hashcat_ctx_t *hashcat_ctx)
|
||||
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
char *hashfile = hashes->hashfile;
|
||||
const char *hashfile = hashes->hashfile;
|
||||
|
||||
char new_hashfile[256] = { 0 };
|
||||
char old_hashfile[256] = { 0 };
|
||||
@ -896,7 +896,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
else if (hashlist_mode == HL_MODE_FILE)
|
||||
{
|
||||
char *hashfile = hashes->hashfile;
|
||||
const char *hashfile = hashes->hashfile;
|
||||
|
||||
FILE *fp;
|
||||
|
||||
|
@ -509,7 +509,7 @@ static int hm_SYSFS_get_pp_dpm_pcie (hashcat_ctx_t *hashcat_ctx, const int devic
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hm_SYSFS_set_power_dpm_force_performance_level (hashcat_ctx_t *hashcat_ctx, const int device_id, char *val)
|
||||
static int hm_SYSFS_set_power_dpm_force_performance_level (hashcat_ctx_t *hashcat_ctx, const int device_id, const char *val)
|
||||
{
|
||||
char *syspath = hm_SYSFS_get_syspath_device (hashcat_ctx, device_id);
|
||||
|
||||
|
@ -15223,7 +15223,7 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const size_t out_le
|
||||
salt_t *salts_buf = hashes->salts_buf;
|
||||
void *esalts_buf = hashes->esalts_buf;
|
||||
hashinfo_t **hash_info = hashes->hash_info;
|
||||
char *hashfile = hashes->hashfile;
|
||||
const char *hashfile = hashes->hashfile;
|
||||
|
||||
const u32 hash_type = hashconfig->hash_type;
|
||||
const u32 hash_mode = hashconfig->hash_mode;
|
||||
@ -23256,11 +23256,11 @@ void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, vo
|
||||
}
|
||||
}
|
||||
|
||||
char *hashconfig_benchmark_mask (hashcat_ctx_t *hashcat_ctx)
|
||||
const char *hashconfig_benchmark_mask (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
|
||||
char *mask = NULL;
|
||||
const char *mask = NULL;
|
||||
|
||||
switch (hashconfig->hash_mode)
|
||||
{
|
||||
|
@ -954,8 +954,8 @@ int main (int argc, char **argv)
|
||||
|
||||
// install and shared folder need to be set to recognize "make install" use
|
||||
|
||||
char *install_folder = NULL;
|
||||
char *shared_folder = NULL;
|
||||
const char *install_folder = NULL;
|
||||
const char *shared_folder = NULL;
|
||||
|
||||
#if defined (INSTALL_FOLDER)
|
||||
install_folder = INSTALL_FOLDER;
|
||||
|
@ -240,7 +240,7 @@ char *status_get_hash_type (const hashcat_ctx_t *hashcat_ctx)
|
||||
return strhashtype (hashconfig->hash_mode);
|
||||
}
|
||||
|
||||
char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx)
|
||||
const char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
const hashes_t *hashes = hashcat_ctx->hashes;
|
||||
|
@ -266,7 +266,7 @@ void tuning_db_destroy (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
tuning_db_entry_t *entry = &tuning_db->entry_buf[i];
|
||||
|
||||
hcfree (entry->device_name);
|
||||
hcfree ((void *)entry->device_name);
|
||||
}
|
||||
|
||||
hcfree (tuning_db->alias_buf);
|
||||
|
Loading…
Reference in New Issue
Block a user