From e6db32748580bd9750fbf01d62220201b39794e0 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 30 Mar 2026 09:29:52 +0700 Subject: [PATCH] text --- common/generator.c | 58 ---------------------------------------------- common/generator.h | 3 --- doc/commands.json | 2 +- 3 files changed, 1 insertion(+), 62 deletions(-) diff --git a/common/generator.c b/common/generator.c index da0cf3d2b..e25e68cf0 100644 --- a/common/generator.c +++ b/common/generator.c @@ -659,63 +659,6 @@ int mfc_algo_vanderbilt_all(uint8_t *uid, uint8_t *keys) { return PM3_SUCCESS; } -// Kale -int mfc_algo_kale_one(uint8_t *uid, uint8_t sector, uint8_t keytype, uint64_t *key) { - if (uid == NULL) return PM3_EINVARG; - if (sector > 16) return PM3_EINVARG; - if (key == NULL) return PM3_EINVARG; - - *key = 0xFFFFFFFFFFFF; - - uint8_t tmp[MIFARE_KEY_SIZE] = {0}; - - if ( sector == 11 ) { - - - tmp[4] = uid[1] + 0x2A; - tmp[5] = uid[3] ^ 0x67; - - if ((uid[2] & 0x02) == 0x02) { - tmp[5] ^= (uid[1] ^ 0xFF); - } - - tmp[0] = tmp[5] ^ (uid[3] ^ 0xFF); - tmp[1] = tmp[5] + (uid[0] ^ 0xFF); - tmp[2] = tmp[4] ^ (uid[1] ^ 0xFF); - tmp[3] = tmp[1] + (uid[2] ^ 0xFF); - tmp[4] = tmp[4] + (tmp[0] ^ uid[0]); - tmp[5] = tmp[5] ^ (tmp[2] & uid[2]); - - *key = bytes_to_num(tmp, MIFARE_KEY_SIZE); - } - if ( sector == 1 ) { - - tmp[0] = uid[2] ^ 0x52 ^ uid[3] ^ 0xFF; - tmp[1] = (uid[2] ^ 0x52) + (uid[0] ^ 0xFF); - tmp[2] = (uid[1] + 0x1c) ^ uid[1] ^ 0xFF; - tmp[3] = tmp[1] + (uid[2] ^ 0xFF); - tmp[4] = (uid[0] ^ tmp[0]) + uid[1] + 0x1C; - tmp[5] = (uid[2] & tmp[2]) ^ uid[2] ^ 0x52; - - *key = bytes_to_num(tmp, MIFARE_KEY_SIZE); - } - - return PM3_SUCCESS; -} - -int mfc_algo_kale_all(uint8_t *uid, uint8_t *keys) { - if (uid == NULL) return PM3_EINVARG; - if (keys == NULL) return PM3_EINVARG; - - for (int keytype = 0; keytype < 2; keytype++) { - for (int sector = 0; sector < 16; sector++) { - uint64_t key = 0; - mfc_algo_kale_one(uid, sector, keytype, &key); - num_to_bytes(key, 6, keys + (keytype * 16 * 6) + (sector * 6)); - } - } - return PM3_SUCCESS; -} static kdf_t KDFTable[] = { {"Saflok / Maid", 16, mfc_algo_saflok_all, 4}, @@ -725,7 +668,6 @@ static kdf_t KDFTable[] = { {"Bambu Lab Filament Spool", 16, mfc_algo_bambu_all, 4}, {"Snapmaker Filament Spool", 16, mfc_algo_snapmaker_all, 4}, {"Vanderbilt ACT", 40, mfc_algo_vanderbilt_all, 0}, - {"Kale", 16, mfc_algo_kale_all, 4}, // {"Vinglock", 16, mfc_algo_ving_all, 4}, // not implemented // {"Yale Doorman", 16, mfc_algo_yale_all, 4}, // not implemented }; diff --git a/common/generator.h b/common/generator.h index 0839fd67b..0cd10b8ce 100644 --- a/common/generator.h +++ b/common/generator.h @@ -82,9 +82,6 @@ int mfc_algo_snapmaker_all(uint8_t *uid, uint8_t *keys); int mfc_algo_vanderbilt_one(uint8_t *uid, uint8_t sector, uint8_t keytype, uint64_t *key); int mfc_algo_vanderbilt_all(uint8_t *uid, uint8_t *keys); -int mfc_algo_kale_one(uint8_t *uid, uint8_t sector, uint8_t keytype, uint64_t *key); -int mfc_algo_kale_all(uint8_t *uid, uint8_t *keys); - uint32_t lf_t55xx_white_pwdgen(uint32_t id); int mfdes_kdf_input_gallagher(uint8_t *uid, uint8_t uidLen, uint8_t keyNo, uint32_t aid, uint8_t *kdfInputOut, uint8_t *kdfInputLen); diff --git a/doc/commands.json b/doc/commands.json index b6d53affc..8e3435d04 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -5528,7 +5528,7 @@ }, "hf mf keygen": { "command": "hf mf keygen", - "description": "Generate key table for some known KDFs Available KDFs: 0 - Saflok / Maid 1 - MIZIP 2 - Disney Infinity 3 - Skylanders 4 - Bambu Lab Filament Spool 5 - Snapmaker Filament Spool 6 - Vanderbilt ACT 7 - Kale", + "description": "Generate key table for some known KDFs Available KDFs: 0 - Saflok / Maid 1 - MIZIP 2 - Disney Infinity 3 - Skylanders 4 - Bambu Lab Filament Spool 5 - Snapmaker Filament Spool 6 - Vanderbilt ACT", "notes": [ "hf mf keygen -r -k 0", "hf mf keygen -r -d -k 0",