mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
ADD: added some identification on between old Desfire, Desfire EV1 and Desfire EV2
DEL: removed two old des-commands files which wasn't used.
This commit is contained in:
parent
ddaecc0826
commit
288c6845a7
6 changed files with 24 additions and 108 deletions
|
@ -159,7 +159,7 @@ int CmdHF14ADesInfo(const char *Cmd){
|
|||
PrintAndLog(" Vendor Id : %s", getTagInfo(resp.d.asBytes[7]));
|
||||
PrintAndLog(" Type : 0x%02X",resp.d.asBytes[8]);
|
||||
PrintAndLog(" Subtype : 0x%02X",resp.d.asBytes[9]);
|
||||
PrintAndLog(" Version : %d.%d",resp.d.asBytes[10], resp.d.asBytes[11]);
|
||||
PrintAndLog(" Version : %s",GetVersionStr(resp.d.asBytes[10], resp.d.asBytes[11]) );
|
||||
PrintAndLog(" Storage size : %s",GetCardSizeStr(resp.d.asBytes[12]));
|
||||
PrintAndLog(" Protocol : %s",GetProtocolStr(resp.d.asBytes[13]));
|
||||
PrintAndLog(" -----------------------------------------------------------");
|
||||
|
@ -217,7 +217,7 @@ int CmdHF14ADesInfo(const char *Cmd){
|
|||
*/
|
||||
char * GetCardSizeStr( uint8_t fsize ){
|
||||
|
||||
static char buf[30];
|
||||
static char buf[30] = {0x00};
|
||||
char *retStr = buf;
|
||||
|
||||
uint16_t usize = 1 << ((fsize >>1) + 1);
|
||||
|
@ -233,7 +233,7 @@ char * GetCardSizeStr( uint8_t fsize ){
|
|||
|
||||
char * GetProtocolStr(uint8_t id){
|
||||
|
||||
static char buf[30];
|
||||
static char buf[30] = {0x00};
|
||||
char *retStr = buf;
|
||||
|
||||
if ( id == 0x05)
|
||||
|
@ -243,6 +243,22 @@ char * GetProtocolStr(uint8_t id){
|
|||
return buf;
|
||||
}
|
||||
|
||||
char * GetVersionStr(uint8_t major, uint8_t minor){
|
||||
|
||||
static char buf[30] = {0x00};
|
||||
char *retStr = buf;
|
||||
|
||||
if ( major == 0)
|
||||
sprintf(retStr,"%d.%d (Desfire MF3ICD40)", major, minor);
|
||||
else if ( major == 1 && minor == 1)
|
||||
sprintf(retStr,"%d.%d (Desfire EV1)", major, minor);
|
||||
else if ( major == 1 && minor == 2)
|
||||
sprintf(retStr,"%d.%d (Desfire EV2)", major, minor);
|
||||
else
|
||||
sprintf(retStr,"%d.%d (Unknown)", major, minor);
|
||||
return buf;
|
||||
}
|
||||
|
||||
void GetKeySettings( uint8_t *aid){
|
||||
|
||||
char messStr[512] = {0x00};
|
||||
|
@ -649,7 +665,6 @@ static command_t CommandTable[] = {
|
|||
int CmdHFMFDes(const char *Cmd) {
|
||||
// flush
|
||||
clearCommandBuffer();
|
||||
//WaitForResponseTimeout(CMD_ACK,NULL,100);
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue