mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 06:13:51 -07:00
fix
This commit is contained in:
parent
a22e162ce9
commit
3db68e42b3
1 changed files with 7 additions and 4 deletions
|
@ -639,7 +639,10 @@ static int AuthCheckDesfire(DesfireContext *dctx,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// always check master key
|
||||
usedkeys[0] = 1;
|
||||
|
||||
if (curaid != 0) {
|
||||
FileListS fileList = {0};
|
||||
size_t filescount = 0;
|
||||
|
@ -716,7 +719,7 @@ static int AuthCheckDesfire(DesfireContext *dctx,
|
|||
|
||||
if (usedkeys[keyno] == 1 && foundKeys[1][keyno][0] == 0) {
|
||||
for (uint32_t curkey = 0; curkey < aeskeyListLen; curkey++) {
|
||||
DesfireSetKeyNoClear(dctx, keyno, T_3DES, deskeyList[curkey]);
|
||||
DesfireSetKeyNoClear(dctx, keyno, T_3DES, aeskeyList[curkey]);
|
||||
res = DesfireAuthenticate(dctx, secureChannel, false);
|
||||
if (res == PM3_SUCCESS) {
|
||||
PrintAndLogEx(SUCCESS, "AID 0x%06X, Found 2TDEA Key %02u : " _GREEN_("%s"), curaid, keyno, sprint_hex(aeskeyList[curkey], 16));
|
||||
|
@ -748,7 +751,7 @@ static int AuthCheckDesfire(DesfireContext *dctx,
|
|||
|
||||
if (usedkeys[keyno] == 1 && foundKeys[2][keyno][0] == 0) {
|
||||
for (uint32_t curkey = 0; curkey < aeskeyListLen; curkey++) {
|
||||
DesfireSetKeyNoClear(dctx, keyno, T_AES, deskeyList[curkey]);
|
||||
DesfireSetKeyNoClear(dctx, keyno, T_AES, aeskeyList[curkey]);
|
||||
res = DesfireAuthenticate(dctx, secureChannel, false);
|
||||
if (res == PM3_SUCCESS) {
|
||||
PrintAndLogEx(SUCCESS, "AID 0x%06X, Found AES Key %02u : " _GREEN_("%s"), curaid, keyno, sprint_hex(aeskeyList[curkey], 16));
|
||||
|
@ -780,7 +783,7 @@ static int AuthCheckDesfire(DesfireContext *dctx,
|
|||
|
||||
if (usedkeys[keyno] == 1 && foundKeys[3][keyno][0] == 0) {
|
||||
for (uint32_t curkey = 0; curkey < k3kkeyListLen; curkey++) {
|
||||
DesfireSetKeyNoClear(dctx, keyno, T_3K3DES, deskeyList[curkey]);
|
||||
DesfireSetKeyNoClear(dctx, keyno, T_3K3DES, k3kkeyList[curkey]);
|
||||
res = DesfireAuthenticate(dctx, secureChannel, false);
|
||||
if (res == PM3_SUCCESS) {
|
||||
PrintAndLogEx(SUCCESS, "AID 0x%06X, Found 3TDEA Key %02u : " _GREEN_("%s"), curaid, keyno, sprint_hex(k3kkeyList[curkey], 24));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue