mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
text
This commit is contained in:
parent
e509967abf
commit
58690ed24e
1 changed files with 15 additions and 8 deletions
|
@ -1032,7 +1032,7 @@ static int AuthCheckDesfire(DesfireContext_t *dctx,
|
||||||
DesfireSetKeyNoClear(dctx, keyno, T_DES, deskeyList[curkey]);
|
DesfireSetKeyNoClear(dctx, keyno, T_DES, deskeyList[curkey]);
|
||||||
res = DesfireAuthenticate(dctx, secureChannel, false);
|
res = DesfireAuthenticate(dctx, secureChannel, false);
|
||||||
if (res == PM3_SUCCESS) {
|
if (res == PM3_SUCCESS) {
|
||||||
PrintAndLogEx(SUCCESS, "AID 0x%06X, Found DES Key %02u : " _GREEN_("%s"), curaid, keyno, sprint_hex(deskeyList[curkey], 8));
|
PrintAndLogEx(SUCCESS, "AID 0x%06X, Found DES Key %02u... " _GREEN_("%s"), curaid, keyno, sprint_hex(deskeyList[curkey], 8));
|
||||||
foundKeys[0][keyno][0] = 0x01;
|
foundKeys[0][keyno][0] = 0x01;
|
||||||
*result = true;
|
*result = true;
|
||||||
memcpy(&foundKeys[0][keyno][1], deskeyList[curkey], 8);
|
memcpy(&foundKeys[0][keyno][1], deskeyList[curkey], 8);
|
||||||
|
@ -2181,25 +2181,32 @@ static int CmdHF14ADesBruteApps(const char *Cmd) {
|
||||||
|
|
||||||
reverse_array(startAid, 3);
|
reverse_array(startAid, 3);
|
||||||
reverse_array(endAid, 3);
|
reverse_array(endAid, 3);
|
||||||
|
|
||||||
uint32_t idStart = DesfireAIDByteToUint(startAid);
|
uint32_t idStart = DesfireAIDByteToUint(startAid);
|
||||||
uint32_t idEnd = DesfireAIDByteToUint(endAid);
|
uint32_t idEnd = DesfireAIDByteToUint(endAid);
|
||||||
|
|
||||||
if (idStart > idEnd) {
|
if (idStart > idEnd) {
|
||||||
PrintAndLogEx(ERR, "Start should be lower than end. start: %06x end: %06x", idStart, idEnd);
|
PrintAndLogEx(ERR, "Start should be lower than end. start: %06x end: %06x", idStart, idEnd);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
PrintAndLogEx(INFO, "Bruteforce from %06x to %06x", idStart, idEnd);
|
|
||||||
PrintAndLogEx(INFO, "Enumerating through all AIDs manually, this will take a while!");
|
|
||||||
for (uint32_t id = idStart; id <= idEnd && id >= idStart; id += idIncrement) {
|
|
||||||
if (kbd_enter_pressed()) break;
|
|
||||||
|
|
||||||
int progress = ((id - idStart) * 100) / ((idEnd - idStart));
|
PrintAndLogEx(INFO, "Bruteforce from " _YELLOW_("%06x") " to " _YELLOW_("%06x"), idStart, idEnd);
|
||||||
PrintAndLogEx(INPLACE, "Progress: %d %%, current AID: %06X", progress, id);
|
PrintAndLogEx(INFO, "Enumerating through all AIDs manually, this will take a while!");
|
||||||
|
|
||||||
|
for (uint32_t id = idStart; id <= idEnd && id >= idStart; id += idIncrement) {
|
||||||
|
|
||||||
|
if (kbd_enter_pressed()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
float progress = ((id - idStart) / (idEnd - idStart));
|
||||||
|
PrintAndLogEx(INPLACE, "Progress " _YELLOW_("%0.1f") " %% current AID: %06X", progress, id);
|
||||||
|
|
||||||
res = DesfireSelectAIDHexNoFieldOn(&dctx, id);
|
res = DesfireSelectAIDHexNoFieldOn(&dctx, id);
|
||||||
|
|
||||||
if (res == PM3_SUCCESS) {
|
if (res == PM3_SUCCESS) {
|
||||||
printf("\33[2K\r"); // clear current line before printing
|
printf("\33[2K\r"); // clear current line before printing
|
||||||
PrintAndLogEx(SUCCESS, "Got new APPID %06X", id);
|
PrintAndLogEx(SUCCESS, "Got new APPID " _GREEN_("%06X"), id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue