Skip to content

Commit

Permalink
zero padding please
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Dec 31, 2023
1 parent c54f6af commit 379baea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/src/cmdhfmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8940,7 +8940,7 @@ static int CmdHF14AMfInfo(const char *Cmd) {
uint8_t blockdata[MFBLOCK_SIZE] = {0};

if (e_sector[0].foundKey[MF_KEY_A]) {
PrintAndLogEx(SUCCESS, "Sector 0 key A... " _GREEN_("%12" PRIX64), e_sector[0].Key[MF_KEY_A]);
PrintAndLogEx(SUCCESS, "Sector 0 key A... " _GREEN_("%012" PRIX64), e_sector[0].Key[MF_KEY_A]);

num_to_bytes(e_sector[0].Key[MF_KEY_A], MIFARE_KEY_SIZE, fkey);
if (mfReadBlock(0, MF_KEY_A, key, blockdata) == PM3_SUCCESS) {
Expand All @@ -8949,7 +8949,7 @@ static int CmdHF14AMfInfo(const char *Cmd) {
}

if (e_sector[0].foundKey[MF_KEY_B]) {
PrintAndLogEx(SUCCESS, "Sector 0 key B... " _GREEN_("%12" PRIX64), e_sector[0].Key[MF_KEY_B]);
PrintAndLogEx(SUCCESS, "Sector 0 key B... " _GREEN_("%012" PRIX64), e_sector[0].Key[MF_KEY_B]);

if (fKeyType == 0xFF) {
num_to_bytes(e_sector[0].Key[MF_KEY_B], MIFARE_KEY_SIZE, fkey);
Expand Down Expand Up @@ -9010,21 +9010,21 @@ static int CmdHF14AMfInfo(const char *Cmd) {
if (keylen == MIFARE_KEY_SIZE) {
res = detect_classic_static_encrypted_nonce(blockn, keytype, key);
if (res == NONCE_STATIC) {
PrintAndLogEx(SUCCESS, "Static nested nonce... " _YELLOW_("yes"));
PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes"));
fKeyType = 0xFF; // dont detect twice
}
if (res == NONCE_STATIC_ENC) {
PrintAndLogEx(SUCCESS, "Static encrypted nonce... " _RED_("yes"));
PrintAndLogEx(SUCCESS, "Static enc nonce..... " _RED_("yes"));
fKeyType = 0xFF; // dont detect twice
}
}

if (fKeyType != 0xFF) {
res = detect_classic_static_encrypted_nonce(0, fKeyType, fkey);
if (res == NONCE_STATIC)
PrintAndLogEx(SUCCESS, "Static nested nonce... " _YELLOW_("yes"));
PrintAndLogEx(SUCCESS, "Static nonce......... " _YELLOW_("yes"));
if (res == NONCE_STATIC_ENC)
PrintAndLogEx(SUCCESS, "Static encrypted nonce... " _RED_("yes"));
PrintAndLogEx(SUCCESS, "Static enc nonce..... " _RED_("yes"));
}

if (do_nack_test) {
Expand Down

0 comments on commit 379baea

Please sign in to comment.