mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 18:08:20 +00:00
Move from off_t to stat struct to avoid struggling with rarely available _off64_t in cache_git struct
This commit is contained in:
parent
6d2ce0d71a
commit
80b3f52952
@ -1635,7 +1635,13 @@ typedef struct cache_hit
|
||||
{
|
||||
char *dictfile;
|
||||
|
||||
off_t st_size;
|
||||
#if defined (_POSIX)
|
||||
struct stat stat;
|
||||
#endif
|
||||
|
||||
#if defined (_WIN)
|
||||
struct __stat64 stat;
|
||||
#endif
|
||||
|
||||
u64 cached_cnt;
|
||||
u64 keyspace;
|
||||
|
@ -661,7 +661,7 @@ static void main_wordlist_cache_hit (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MA
|
||||
|
||||
cache_hit_t *cache_hit = (cache_hit_t *) buf;
|
||||
|
||||
event_log_info (hashcat_ctx, "Cache-hit dictionary stats %s: %" PRIu64 " bytes, %" PRIu64 " words, %" PRIu64 " keyspace", cache_hit->dictfile, cache_hit->st_size, cache_hit->cached_cnt, cache_hit->keyspace);
|
||||
event_log_info (hashcat_ctx, "Cache-hit dictionary stats %s: %" PRIu64 " bytes, %" PRIu64 " words, %" PRIu64 " keyspace", cache_hit->dictfile, cache_hit->stat.st_size, cache_hit->cached_cnt, cache_hit->keyspace);
|
||||
event_log_info (hashcat_ctx, "");
|
||||
}
|
||||
|
||||
|
@ -324,10 +324,10 @@ u64 count_words (hashcat_ctx_t *hashcat_ctx, FILE *fd, const char *dictfile)
|
||||
|
||||
cache_hit_t cache_hit;
|
||||
|
||||
cache_hit.dictfile = (char *) dictfile;
|
||||
cache_hit.st_size = d.stat.st_size;
|
||||
cache_hit.cached_cnt = cached_cnt;
|
||||
cache_hit.keyspace = keyspace;
|
||||
cache_hit.dictfile = (char *) dictfile;
|
||||
cache_hit.stat.st_size = d.stat.st_size;
|
||||
cache_hit.cached_cnt = cached_cnt;
|
||||
cache_hit.keyspace = keyspace;
|
||||
|
||||
EVENT_DATA (EVENT_WORDLIST_CACHE_HIT, &cache_hit, sizeof (cache_hit));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user