The Brain not working as expected (or is it me?)
#11
wow, great testing/analysis again.

This just shows how important it is to double-check the changes...

this is actually an independent second problem now...

the qsort () call here: https://github.com/hashcat/hashcat/blob/...ain.c#L129

should have performed a comparison of the underlying "char array"/string, while it was comparing pointers (the layer above).

I think a fix like this would work:
Code:
diff --git a/src/brain.c b/src/brain.c
index f659ea7d..11f21262 100644
--- a/src/brain.c
+++ b/src/brain.c
@@ -12,6 +12,7 @@
#include "convert.h"
#include "shared.h"
#include "hashes.h"
+#include "folder.h"
#include "brain.h"

static bool keep_running = true;
@@ -126,7 +127,7 @@ u32 brain_compute_session (hashcat_ctx_t *hashcat_ctx)

     hcfree (out_buf);

-    qsort (out_bufs, out_idx, sizeof (char *), sort_by_string);
+    qsort (out_bufs, out_idx, sizeof (char *), sort_by_stringptr);

     for (int i = 0; i < out_idx; i++)
     {

I'm going to suggest this improvement to atom (we will probably get rid of the "folder" include, because it doesn't make much sense in the brain code... we will probably try to refactor that part)... but the "sort_by_stringptr" fix should now also fix this "new" problem. Thx again



We have now fixed this problem with this commit: https://github.com/hashcat/hashcat/commi...fb94aba64f
beta version is up for testing: https://hashcat.net/beta/ . Thanks a lot
and do not hesitate to ask questions or report further findings/problems... these are some great discoveries that we really need to make hashcat better and more stable.
Reply


Messages In This Thread
RE: The Brain not working as expected (or is it me?) - by philsmd - 05-11-2020, 11:24 AM