mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Patch mf_write_sector 4k support
This commit is contained in:
parent
11becb8e20
commit
579ea6feb2
1 changed files with 2 additions and 2 deletions
|
@ -1016,8 +1016,8 @@ int mf_write_block(uint8_t blockno, uint8_t keyType, const uint8_t *key, uint8_t
|
|||
|
||||
int mf_write_sector(uint8_t sectorNo, uint8_t keyType, const uint8_t *key, uint8_t *sector) {
|
||||
int res;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
res = mf_write_block((sectorNo * 4) + i, keyType, key, sector + (i * MFBLOCK_SIZE));
|
||||
for (int i = 0; i < mfNumBlocksPerSector(sectorNo); i++) {
|
||||
res = mf_write_block((mfFirstBlockOfSector(sectorNo)) + i, keyType, key, sector + (i * MFBLOCK_SIZE));
|
||||
if (res != PM3_SUCCESS) {
|
||||
return (i == 0) ? PM3_EFAILED : PM3_EPARTIAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue