mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 21:33:19 -07:00
Emv scan via contact interface (#789)
* share getATR from smartcard.h/c * remove duplicates in tlv.h and add get_uint_8 * check ATS/ATR length
This commit is contained in:
parent
fc52fbd42f
commit
0b6efd01ec
5 changed files with 151 additions and 28 deletions
|
@ -311,7 +311,7 @@ static int PrintATR(uint8_t *atr, size_t atrlen) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool smart_getATR(smart_card_atr_t *card)
|
||||
bool smart_getATR(smart_card_atr_t *card)
|
||||
{
|
||||
if (UseAlternativeSmartcardReader) {
|
||||
return pcscGetATR(card);
|
||||
|
@ -804,6 +804,11 @@ static int CmdSmartInfo(const char *Cmd){
|
|||
if (!silent) PrintAndLogEx(WARNING, "smart card select failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!card.atr_len) {
|
||||
if (!silent) PrintAndLogEx(ERR, "can't get ATR from a smart card");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// print header
|
||||
PrintAndLogEx(INFO, "--- Smartcard Information ---------");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue