mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
style
This commit is contained in:
parent
0e385300a7
commit
a556434f3f
1 changed files with 22 additions and 5 deletions
|
@ -7034,8 +7034,14 @@ static int CmdHf14AMfSuperCard(const char *Cmd) {
|
||||||
// --------------- CHANGE UID ----------------
|
// --------------- CHANGE UID ----------------
|
||||||
uint8_t aCHANGE[] = {0x00, 0xa6, 0xa0, 0x00, 0x05, 0xff, 0xff, 0xff, 0xff, 0x00};
|
uint8_t aCHANGE[] = {0x00, 0xa6, 0xa0, 0x00, 0x05, 0xff, 0xff, 0xff, 0xff, 0x00};
|
||||||
memcpy(aCHANGE + 5, uid, uidlen);
|
memcpy(aCHANGE + 5, uid, uidlen);
|
||||||
res = ExchangeAPDU14a(aCHANGE, sizeof(aCHANGE), activate_field, keep_field_on, response, sizeof(response),
|
res = ExchangeAPDU14a(
|
||||||
&resplen);
|
aCHANGE, sizeof(aCHANGE),
|
||||||
|
activate_field,
|
||||||
|
keep_field_on,
|
||||||
|
response, sizeof(response),
|
||||||
|
&resplen
|
||||||
|
);
|
||||||
|
|
||||||
if (res != PM3_SUCCESS) {
|
if (res != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(FAILED, "Super card UID change [ " _RED_("fail") " ]");
|
PrintAndLogEx(FAILED, "Super card UID change [ " _RED_("fail") " ]");
|
||||||
DropField();
|
DropField();
|
||||||
|
@ -7054,8 +7060,14 @@ static int CmdHf14AMfSuperCard(const char *Cmd) {
|
||||||
|
|
||||||
// --------------- RESET CARD ----------------
|
// --------------- RESET CARD ----------------
|
||||||
uint8_t aRESET[] = {0x00, 0xa6, 0xc0, 0x00};
|
uint8_t aRESET[] = {0x00, 0xa6, 0xc0, 0x00};
|
||||||
res = ExchangeAPDU14a(aRESET, sizeof(aRESET), activate_field, keep_field_on, response, sizeof(response),
|
res = ExchangeAPDU14a(
|
||||||
&resplen);
|
aRESET, sizeof(aRESET),
|
||||||
|
activate_field,
|
||||||
|
keep_field_on,
|
||||||
|
response, sizeof(response),
|
||||||
|
&resplen
|
||||||
|
);
|
||||||
|
|
||||||
if (res != PM3_SUCCESS) {
|
if (res != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(FAILED, "Super card reset [ " _RED_("fail") " ]");
|
PrintAndLogEx(FAILED, "Super card reset [ " _RED_("fail") " ]");
|
||||||
DropField();
|
DropField();
|
||||||
|
@ -7144,7 +7156,12 @@ static int CmdHf14AMfSuperCard(const char *Cmd) {
|
||||||
|
|
||||||
uint64_t key64 = -1;
|
uint64_t key64 = -1;
|
||||||
if (mfkey32_moebius(&data, &key64)) {
|
if (mfkey32_moebius(&data, &key64)) {
|
||||||
PrintAndLogEx(SUCCESS, "UID: %s Sector %02x key %c [ " _GREEN_("%012" PRIX64) " ]", sprint_hex_inrow(outA, 4), data.sector, (data.keytype == 0x60) ? 'A' : 'B', key64);
|
PrintAndLogEx(SUCCESS, "UID: %s Sector %02x key %c [ " _GREEN_("%012" PRIX64) " ]",
|
||||||
|
sprint_hex_inrow(outA, 4),
|
||||||
|
data.sector,
|
||||||
|
(data.keytype == 0x60) ? 'A' : 'B',
|
||||||
|
key64
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(FAILED, "failed to recover any key");
|
PrintAndLogEx(FAILED, "failed to recover any key");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue