mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 22:23:38 -07:00
deleted from CmdHF14AMfCSetUID wipe and fill functionality
This commit is contained in:
parent
e2ca6256a0
commit
351224fac0
1 changed files with 4 additions and 17 deletions
|
@ -1783,8 +1783,6 @@ int CmdHF14AMfEKeyPrn(const char *Cmd)
|
||||||
|
|
||||||
int CmdHF14AMfCSetUID(const char *Cmd)
|
int CmdHF14AMfCSetUID(const char *Cmd)
|
||||||
{
|
{
|
||||||
uint8_t wipeCard = 0;
|
|
||||||
uint8_t fillCard = 0;
|
|
||||||
uint8_t uid[8] = {0x00};
|
uint8_t uid[8] = {0x00};
|
||||||
uint8_t oldUid[8] = {0x00};
|
uint8_t oldUid[8] = {0x00};
|
||||||
uint8_t atqa[2] = {0x00};
|
uint8_t atqa[2] = {0x00};
|
||||||
|
@ -1823,14 +1821,6 @@ int CmdHF14AMfCSetUID(const char *Cmd)
|
||||||
case 'H':
|
case 'H':
|
||||||
needHelp = 1;
|
needHelp = 1;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
|
||||||
case 'W':
|
|
||||||
wipeCard = 1;
|
|
||||||
break;
|
|
||||||
case 'k':
|
|
||||||
case 'K':
|
|
||||||
fillCard = 1;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
PrintAndLog("ERROR: Unknown parameter '%c'", param_getchar(Cmd, cmdp));
|
PrintAndLog("ERROR: Unknown parameter '%c'", param_getchar(Cmd, cmdp));
|
||||||
needHelp = 1;
|
needHelp = 1;
|
||||||
|
@ -1841,22 +1831,19 @@ int CmdHF14AMfCSetUID(const char *Cmd)
|
||||||
|
|
||||||
if (strlen(Cmd) < 1 || needHelp) {
|
if (strlen(Cmd) < 1 || needHelp) {
|
||||||
PrintAndLog("");
|
PrintAndLog("");
|
||||||
PrintAndLog("Usage: hf mf csetuid <UID 8 hex symbols> [ATQA 4 hex symbols SAK 2 hex symbols] [w] [k]");
|
PrintAndLog("Usage: hf mf csetuid <UID 8 hex symbols> [ATQA 4 hex symbols SAK 2 hex symbols]");
|
||||||
PrintAndLog("sample: hf mf csetuid 01020304");
|
PrintAndLog("sample: hf mf csetuid 01020304");
|
||||||
PrintAndLog("sample: hf mf csetuid 01020304 0004 08 w");
|
PrintAndLog("sample: hf mf csetuid 01020304 0004 08");
|
||||||
PrintAndLog("sample: hf mf csetuid 01020304 0004 08 f");
|
|
||||||
PrintAndLog("Set UID, ATQA, and SAK for magic Chinese card (only works with such cards)");
|
PrintAndLog("Set UID, ATQA, and SAK for magic Chinese card (only works with such cards)");
|
||||||
PrintAndLog("'w' - wipe the card. Works only for cards with this function");
|
|
||||||
PrintAndLog("'k' - fill data blocks with 0x00 and keys with 0xFFFFFFFFFFFF");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLog("--wipe card:%s fill card:%s uid:%s", (wipeCard)?"YES":"NO", (fillCard)?"YES":"NO", sprint_hex(uid, 4));
|
PrintAndLog("uid:%s", sprint_hex(uid, 4));
|
||||||
if (atqaPresent) {
|
if (atqaPresent) {
|
||||||
PrintAndLog("--atqa:%s sak:%02x", sprint_hex(atqa, 2), sak[0]);
|
PrintAndLog("--atqa:%s sak:%02x", sprint_hex(atqa, 2), sak[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
res = mfCSetUID(uid, (atqaPresent)?atqa:NULL, (atqaPresent)?sak:NULL, oldUid, wipeCard, fillCard);
|
res = mfCSetUID(uid, (atqaPresent)?atqa:NULL, (atqaPresent)?sak:NULL, oldUid);
|
||||||
if (res) {
|
if (res) {
|
||||||
PrintAndLog("Can't set UID. Error=%d", res);
|
PrintAndLog("Can't set UID. Error=%d", res);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue