mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-14 18:25:05 +00:00
Bodge: fix mfpreadsector
Looks like either I, or someone else, has never thought about encrypted mode enforcement in mfpreadsector. Now during readouts data is decrypted on the fly. Checked on real tag. Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "commonutil.h" // ARRAYLEN
|
||||
#include "comms.h" // DropField
|
||||
#include "cmdhf14a.h"
|
||||
#include "cmdhfmfp.h" // mfp_data_crypt
|
||||
#include "ui.h"
|
||||
#include "crypto/libpcrypto.h"
|
||||
|
||||
@@ -532,6 +533,9 @@ int mfpReadSector(uint8_t sectorNo, uint8_t keyType, uint8_t *key, uint8_t *data
|
||||
DropField();
|
||||
return 6;
|
||||
}
|
||||
|
||||
// Encrypted mode is always used. Doing an if to check will waste instructions
|
||||
mfp_data_crypt(&_session, &data[1], &data[1], true);
|
||||
|
||||
memcpy(&dataout[(n - firstBlockNo) * 16], &data[1], 16);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user