Make use of EVENT_CRACKER_HASH_CRACKED, do not print a cracked hash to stdout directly, let the client do it

This commit is contained in:
jsteube
2016-10-12 11:27:10 +02:00
parent 20832d29d6
commit 386efb7fb5
10 changed files with 112 additions and 153 deletions
+3 -3
View File
@@ -9,10 +9,10 @@
#include <stdio.h>
#include <stdarg.h>
int event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len);
void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len);
#define EVENT(id) { const int rc_event = event_call ((id), hashcat_ctx, NULL, 0); if (rc_event == -1) return -1; }
#define EVENT_DATA(id,buf,len) { const int rc_event = event_call ((id), hashcat_ctx, (buf), (len)); if (rc_event == -1) return -1; }
#define EVENT(id) event_call ((id), hashcat_ctx, NULL, 0)
#define EVENT_DATA(id,buf,len) event_call ((id), hashcat_ctx, (buf), (len))
size_t event_log_info_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
+1 -1
View File
@@ -8,7 +8,7 @@
int hashcat (hashcat_ctx_t *hashcat_ctx, char *install_folder, char *shared_folder, int argc, char **argv, const int comptime);
void hashcat_ctx_init (hashcat_ctx_t *hashcat_ctx, int (*event) (const u32, struct hashcat_ctx *, const void *, const size_t));
void hashcat_ctx_init (hashcat_ctx_t *hashcat_ctx, void (*event) (const u32, struct hashcat_ctx *, const void *, const size_t));
void hashcat_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
#endif // _HASHCAT_H
+1 -1
View File
@@ -18,7 +18,7 @@ int outfile_init (hashcat_ctx_t *hashcat_ctx);
void outfile_destroy (hashcat_ctx_t *hashcat_ctx);
int outfile_write_open (hashcat_ctx_t *hashcat_ctx);
void outfile_write_close (hashcat_ctx_t *hashcat_ctx);
void outfile_write (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len);
int outfile_write (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, char tmp_buf[HCBUFSIZ_LARGE]);
int outfile_and_hashfile (hashcat_ctx_t *hashcat_ctx);
#endif // _OUTFILE_H
+1 -1
View File
@@ -1435,7 +1435,7 @@ typedef struct hashcat_ctx
user_options_t *user_options;
wl_data_t *wl_data;
int (*event) (const u32, struct hashcat_ctx *, const void *, const size_t);
void (*event) (const u32, struct hashcat_ctx *, const void *, const size_t);
} hashcat_ctx_t;