fixed problem with cached word lists (dictstat2): nanoseconds must be considered/ignored too

This commit is contained in:
philsmd
2017-09-29 12:13:29 +02:00
parent 4a4eb0ef7f
commit d8e7f5f05c
4 changed files with 23 additions and 0 deletions
+4
View File
@@ -19,6 +19,10 @@ int sort_by_dictstat (const void *s1, const void *s2)
d2->stat.st_atime = d1->stat.st_atime;
#if defined (WITH_NANOSECONDS_IN_STAT)
d2->stat.st_atim.tv_nsec = d1->stat.st_atim.tv_nsec;
#endif
const int rc_from = strcmp (d1->encoding_from, d2->encoding_from);
if (rc_from != 0) return rc_from;
+4
View File
@@ -293,6 +293,10 @@ int count_words (hashcat_ctx_t *hashcat_ctx, FILE *fd, const char *dictfile, u64
d.stat.st_rdev = 0;
d.stat.st_atime = 0;
#if defined (WITH_NANOSECONDS_IN_STAT)
d.stat.st_atim.tv_nsec = 0;
#endif
#if defined (_POSIX)
d.stat.st_blksize = 0;
d.stat.st_blocks = 0;