From ea25e3ec2b5570d009fd64981b6681a68a8c5d7a Mon Sep 17 00:00:00 2001 From: Iceman Date: Wed, 7 Feb 2018 21:56:27 +0100 Subject: [PATCH] fix: hf mf mifare - populate keylist This will solve the long running of the attack, since all candidate keys will be tested. --- client/mifarehost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mifarehost.c b/client/mifarehost.c index a01d3b5f..2bd21077 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -201,9 +201,9 @@ int mfDarkside(uint64_t *key) int size = keycount - i > max_keys ? max_keys : keycount - i; for (int j = 0; j < size; j++) { if (par_list == 0) { - num_to_bytes(last_keylist[i*max_keys + j], 6, keyBlock); + num_to_bytes(last_keylist[i*max_keys + j], 6, keyBlock+(j*6)); } else { - num_to_bytes(keylist[i*max_keys + j], 6, keyBlock); + num_to_bytes(keylist[i*max_keys + j], 6, keyBlock+(j*6)); } } if (!mfCheckKeys(0, 0, false, size, keyBlock, key)) { -- 2.39.2