Merge pull request #17 from gkelly/fchk-keys

Populate emulator keys from `hf mf fchk`
This commit is contained in:
RFID Research Group 2018-08-23 20:12:31 +02:00 committed by GitHub
commit f39cc5b130
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1570,13 +1570,11 @@ out:
uint8_t block[16] = {0x00}; uint8_t block[16] = {0x00};
for (uint8_t i = 0; i < sectorsCnt; ++i ) { for (uint8_t i = 0; i < sectorsCnt; ++i ) {
mfEmlGetMem(block, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1); mfEmlGetMem(block, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1);
/*
if (e_sector[i].foundKey[0]) if (e_sector[i].foundKey[0])
memcpy(block, e_sector[i].keyA, 6); num_to_bytes(e_sector[i].Key[0], 6, block);
if (e_sector[i].foundKey[1]) if (e_sector[i].foundKey[1])
memcpy(block+10, e_sector[i].keyB, 6); num_to_bytes(e_sector[i].Key[1], 6, block+10);
mfEmlSetMem(block, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1); mfEmlSetMem(block, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1);
*/
} }
PrintAndLogEx(NORMAL, "Found keys have been transferred to the emulator memory"); PrintAndLogEx(NORMAL, "Found keys have been transferred to the emulator memory");
} }