mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
Merge pull request #2860 from Antiklesys/master
Fixed authentication read for iclass tear
This commit is contained in:
commit
428ee718d3
1 changed files with 6 additions and 1 deletions
|
@ -3137,6 +3137,8 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
||||||
auth = false;
|
auth = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool read_auth = auth;
|
||||||
|
|
||||||
// perform initial read here, repeat if failed or 00s
|
// perform initial read here, repeat if failed or 00s
|
||||||
uint8_t data_read_orig[8] = {0};
|
uint8_t data_read_orig[8] = {0};
|
||||||
uint8_t ff_data[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
uint8_t ff_data[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||||
|
@ -3218,7 +3220,10 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = iclass_read_block_ex(key, blockno, keyType, elite, rawkey, use_replay, verbose, auth, shallow_mod, data_read, false);
|
if (blockno == 1){
|
||||||
|
read_auth = false;
|
||||||
|
}
|
||||||
|
res = iclass_read_block_ex(key, blockno, keyType, elite, rawkey, use_replay, verbose, read_auth, shallow_mod, data_read, false);
|
||||||
if (res == PM3_SUCCESS && !reread) {
|
if (res == PM3_SUCCESS && !reread) {
|
||||||
if (memcmp(data_read, zeros, 8) == 0) {
|
if (memcmp(data_read, zeros, 8) == 0) {
|
||||||
reread = true;
|
reread = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue