added some easy test for saflok key generation

This commit is contained in:
iceman1001 2023-12-18 22:15:54 +01:00
commit 0a820bbb67
2 changed files with 20 additions and 1 deletions

View file

@ -3254,6 +3254,7 @@ static int CmdHF14AMfChk_fast(const char *Cmd) {
bool firstChunk = true, lastChunk = false; bool firstChunk = true, lastChunk = false;
int i = 0; int i = 0;
// time // time
uint64_t t1 = msclock(); uint64_t t1 = msclock();
@ -3288,6 +3289,7 @@ static int CmdHF14AMfChk_fast(const char *Cmd) {
// all keys, aborted // all keys, aborted
if (res == PM3_SUCCESS || res == 2) if (res == PM3_SUCCESS || res == 2)
goto out; goto out;
} // end chunks of keys } // end chunks of keys
firstChunk = true; firstChunk = true;
lastChunk = false; lastChunk = false;
@ -8906,6 +8908,21 @@ static int CmdHF14AMfInfo(const char *Cmd) {
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "--- " _CYAN_("Keys Information")); PrintAndLogEx(INFO, "--- " _CYAN_("Keys Information"));
/*
1. fast check for different KDF here
2. mew command "hf mf keygen"
" Vingcard algo");
PrintAndLogEx(INFO, " Saflok algo");
PrintAndLogEx(INFO, " SALTO algo");
uint64_t key = 0;
mfc_algo_saflok_one(uid, 1, 0, &key);
PrintAndLogEx(INFO, " Dorma Kaba algo | %012X" PRIX64, key);
PrintAndLogEx(INFO, " STiD algo");
PrintAndLogEx(INFO, "-------------------------------------");
*/
uint8_t fkey[MIFARE_KEY_SIZE] = {0}; uint8_t fkey[MIFARE_KEY_SIZE] = {0};
uint8_t fKeyType = 0xff; uint8_t fKeyType = 0xff;

View file

@ -3700,7 +3700,9 @@ static int CmdHF14AMfUPwdGen(const char *Cmd) {
} }
PrintAndLogEx(INFO, "--------------------+----------+-----"); PrintAndLogEx(INFO, "--------------------+----------+-----");
PrintAndLogEx(INFO, " Vingcard algo"); PrintAndLogEx(INFO, " Vingcard algo");
PrintAndLogEx(INFO, " Saflok algo"); uint64_t key = 0;
mfc_algo_saflok_one(uid, 0, 0, &key);
PrintAndLogEx(INFO, " Saflok algo | %012" PRIX64, key);
PrintAndLogEx(INFO, " SALTO algo"); PrintAndLogEx(INFO, " SALTO algo");
PrintAndLogEx(INFO, " Dorma Kaba algo"); PrintAndLogEx(INFO, " Dorma Kaba algo");
PrintAndLogEx(INFO, " STiD algo"); PrintAndLogEx(INFO, " STiD algo");