mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-18 11:40:58 +00:00
Get rid of logfile_disable variable in data. context
This commit is contained in:
parent
83baf7fcf2
commit
479e93ae7d
@ -13,16 +13,16 @@
|
|||||||
|
|
||||||
// logfile_append() checks for logfile_disable internally to make it easier from here
|
// logfile_append() checks for logfile_disable internally to make it easier from here
|
||||||
|
|
||||||
#define logfile_top_msg(msg) logfile_append ("%s\t%s", data.topid, (msg));
|
#define logfile_top_msg(msg) logfile_append (user_options, "%s\t%s", data.topid, (msg));
|
||||||
#define logfile_sub_msg(msg) logfile_append ("%s\t%s\t%s", data.topid, data.subid, (msg));
|
#define logfile_sub_msg(msg) logfile_append (user_options, "%s\t%s\t%s", data.topid, data.subid, (msg));
|
||||||
#define logfile_top_var_uint64(var,val) logfile_append ("%s\t%s\t%" PRIu64 "", data.topid, (var), (val));
|
#define logfile_top_var_uint64(var,val) logfile_append (user_options, "%s\t%s\t%" PRIu64 "", data.topid, (var), (val));
|
||||||
#define logfile_sub_var_uint64(var,val) logfile_append ("%s\t%s\t%s\t%" PRIu64 "", data.topid, data.subid, (var), (val));
|
#define logfile_sub_var_uint64(var,val) logfile_append (user_options, "%s\t%s\t%s\t%" PRIu64 "", data.topid, data.subid, (var), (val));
|
||||||
#define logfile_top_var_uint(var,val) logfile_append ("%s\t%s\t%u", data.topid, (var), (val));
|
#define logfile_top_var_uint(var,val) logfile_append (user_options, "%s\t%s\t%u", data.topid, (var), (val));
|
||||||
#define logfile_sub_var_uint(var,val) logfile_append ("%s\t%s\t%s\t%u", data.topid, data.subid, (var), (val));
|
#define logfile_sub_var_uint(var,val) logfile_append (user_options, "%s\t%s\t%s\t%u", data.topid, data.subid, (var), (val));
|
||||||
#define logfile_top_var_char(var,val) logfile_append ("%s\t%s\t%c", data.topid, (var), (val));
|
#define logfile_top_var_char(var,val) logfile_append (user_options, "%s\t%s\t%c", data.topid, (var), (val));
|
||||||
#define logfile_sub_var_char(var,val) logfile_append ("%s\t%s\t%s\t%c", data.topid, data.subid, (var), (val));
|
#define logfile_sub_var_char(var,val) logfile_append (user_options, "%s\t%s\t%s\t%c", data.topid, data.subid, (var), (val));
|
||||||
#define logfile_top_var_string(var,val) if ((val) != NULL) logfile_append ("%s\t%s\t%s", data.topid, (var), (val));
|
#define logfile_top_var_string(var,val) if ((val) != NULL) logfile_append (user_options, "%s\t%s\t%s", data.topid, (var), (val));
|
||||||
#define logfile_sub_var_string(var,val) if ((val) != NULL) logfile_append ("%s\t%s\t%s\t%s", data.topid, data.subid, (var), (val));
|
#define logfile_sub_var_string(var,val) if ((val) != NULL) logfile_append (user_options, "%s\t%s\t%s\t%s", data.topid, data.subid, (var), (val));
|
||||||
|
|
||||||
#define logfile_top_uint64(var) logfile_top_var_uint64 (#var, (var));
|
#define logfile_top_uint64(var) logfile_top_var_uint64 (#var, (var));
|
||||||
#define logfile_sub_uint64(var) logfile_sub_var_uint64 (#var, (var));
|
#define logfile_sub_uint64(var) logfile_sub_var_uint64 (#var, (var));
|
||||||
@ -36,6 +36,6 @@
|
|||||||
char *logfile_generate_topid (void);
|
char *logfile_generate_topid (void);
|
||||||
char *logfile_generate_subid (void);
|
char *logfile_generate_subid (void);
|
||||||
|
|
||||||
void logfile_append (const char *fmt, ...);
|
void logfile_append (const user_options_t *user_options, const char *fmt, ...);
|
||||||
|
|
||||||
#endif // _LOGFILE_H
|
#endif // _LOGFILE_H
|
||||||
|
@ -936,7 +936,6 @@ typedef struct
|
|||||||
* logging
|
* logging
|
||||||
*/
|
*/
|
||||||
|
|
||||||
u32 logfile_disable;
|
|
||||||
char *logfile;
|
char *logfile;
|
||||||
char *topid;
|
char *topid;
|
||||||
char *subid;
|
char *subid;
|
||||||
|
@ -272,7 +272,6 @@ int main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
data.attack_mode = user_options->attack_mode;
|
data.attack_mode = user_options->attack_mode;
|
||||||
data.force = user_options->force;
|
data.force = user_options->force;
|
||||||
data.logfile_disable = user_options->logfile_disable;
|
|
||||||
data.quiet = user_options->quiet;
|
data.quiet = user_options->quiet;
|
||||||
data.attack_kern = user_options_extra->attack_kern;
|
data.attack_kern = user_options_extra->attack_kern;
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,9 @@ static void logfile_close (FILE *fp)
|
|||||||
fclose (fp);
|
fclose (fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void logfile_append (const char *fmt, ...)
|
void logfile_append (const user_options_t *user_options, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
if (data.logfile_disable == 1) return;
|
if (user_options->logfile_disable == true) return;
|
||||||
|
|
||||||
FILE *fp = logfile_open (data.logfile);
|
FILE *fp = logfile_open (data.logfile);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user