Merge branch 'master' of https://github.com/RfidResearchGroup/proxmark3
This commit is contained in:
@@ -557,6 +557,7 @@ int ExchangeRAW14a(uint8_t *datain, int datainlen, bool activateField, bool leav
|
||||
|
||||
if (activateField) {
|
||||
PacketResponseNG resp;
|
||||
responseNum = 0;
|
||||
|
||||
// Anticollision + SELECT card
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT | ISO14A_NO_DISCONNECT, 0, 0, NULL, 0);
|
||||
|
||||
@@ -47,7 +47,7 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
||||
infoHF14A(false, false, false);
|
||||
|
||||
// Mifare Plus info
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT | ISO14A_NO_DISCONNECT, 0, 0, NULL, 0);
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT, 0, 0, NULL, 0);
|
||||
|
||||
PacketResponseNG resp;
|
||||
WaitForResponse(CMD_ACK, &resp);
|
||||
@@ -115,7 +115,7 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
||||
int datalen = 0;
|
||||
// https://github.com/Proxmark/proxmark3/blob/master/client/luascripts/mifarePlus.lua#L161
|
||||
uint8_t cmd[3 + 16] = {0xa8, 0x90, 0x90, 0x00};
|
||||
int res = ExchangeRAW14a(cmd, sizeof(cmd), false, false, data, sizeof(data), &datalen, false);
|
||||
int res = ExchangeRAW14a(cmd, sizeof(cmd), true, false, data, sizeof(data), &datalen, false);
|
||||
|
||||
if (memcmp(data, "\x67\x00", 2) == 0) {
|
||||
PrintAndLogEx(INFO, "\tMost likely a Mifare DESFire tag");
|
||||
|
||||
@@ -171,16 +171,19 @@ static int ndefDecodeSig1(uint8_t *sig, size_t siglen) {
|
||||
|
||||
size_t intsiglen = (sig[indx + 1] << 8) + sig[indx + 2];
|
||||
// ecdsa 0x04
|
||||
if (sigType == stECDSA_P192) {
|
||||
if (sigType == stECDSA_P192 || sigType == stECDSA_P256) {
|
||||
indx += 3;
|
||||
int slen = 24;
|
||||
if (sigType == stECDSA_P256)
|
||||
slen = 32;
|
||||
PrintAndLogEx(NORMAL, "\tsignature [%zu]: %s", intsiglen, sprint_hex_inrow(&sig[indx], intsiglen));
|
||||
|
||||
uint8_t rval[300] = {0};
|
||||
uint8_t sval[300] = {0};
|
||||
int res = ecdsa_asn1_get_signature(&sig[indx], intsiglen, rval, sval);
|
||||
if (!res) {
|
||||
PrintAndLogEx(NORMAL, "\t\tr: %s", sprint_hex(rval, 32));
|
||||
PrintAndLogEx(NORMAL, "\t\ts: %s", sprint_hex(sval, 32));
|
||||
PrintAndLogEx(NORMAL, "\t\tr: %s", sprint_hex(rval + 32 - slen, slen));
|
||||
PrintAndLogEx(NORMAL, "\t\ts: %s", sprint_hex(sval + 32 - slen, slen));
|
||||
}
|
||||
}
|
||||
indx += intsiglen;
|
||||
|
||||
Reference in New Issue
Block a user