Move debugfile related stuff to debugfile.c
This commit is contained in:
+5
-5
@@ -155,8 +155,7 @@ typedef struct
|
||||
uint runtime;
|
||||
uint remove;
|
||||
uint remove_timer;
|
||||
uint debug_mode;
|
||||
char *debug_file;
|
||||
|
||||
uint hex_charset;
|
||||
uint hex_salt;
|
||||
uint hex_wordlist;
|
||||
@@ -176,9 +175,10 @@ typedef struct
|
||||
|
||||
hashconfig_t *hashconfig;
|
||||
|
||||
outfile_ctx_t *outfile_ctx;
|
||||
potfile_ctx_t *potfile_ctx;
|
||||
loopback_ctx_t *loopback_ctx;
|
||||
outfile_ctx_t *outfile_ctx;
|
||||
potfile_ctx_t *potfile_ctx;
|
||||
loopback_ctx_t *loopback_ctx;
|
||||
debugfile_ctx_t *debugfile_ctx;
|
||||
|
||||
#if defined (HAVE_HWMON)
|
||||
uint gpu_temp_disable;
|
||||
|
||||
@@ -6,4 +6,21 @@
|
||||
#ifndef _DEBUGFILE_H
|
||||
#define _DEBUGFILE_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define DEBUG_MODE 0
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FILE *fp;
|
||||
char *filename;
|
||||
uint mode;
|
||||
|
||||
} debugfile_ctx_t;
|
||||
|
||||
int debugfile_init (debugfile_ctx_t *debugfile_ctx, const uint debug_mode, const char *debug_file);
|
||||
void debugfile_destroy (debugfile_ctx_t *debugfile_ctx);
|
||||
void debugfile_format_plain (debugfile_ctx_t *debugfile_ctx, const u8 *plain_ptr, const u32 plain_len);
|
||||
void debugfile_write_append (debugfile_ctx_t *debugfile_ctx, const u8 *rule_buf, const u32 rule_len, const u8 *mod_plain_ptr, const u32 mod_plain_len, const u8 *orig_plain_ptr, const u32 orig_plain_len);
|
||||
|
||||
#endif // _DEBUGFILE_H
|
||||
|
||||
Reference in New Issue
Block a user