Reading of values written on contactless card in Python

0

I have used the following code to obtain the UID of a contactless card but I can not read the values recorded inside it.

I would like to read all the values that you have written in your records.

from smartcard.scard import *

hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)

assert hresult==SCARD_S_SUCCESS

hresult, readers = SCardListReaders(hcontext, [])

assert len(readers)>0

reader = readers[0]

hresult, hcard, dwActiveProtocol = SCardConnect(
    hcontext,
    reader,
    SCARD_SHARE_SHARED,
    SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1)

#Comando que tenemos que enviar para conseguir el UID
hresult, response = SCardTransmit(hcard,dwActiveProtocol,[0xFF,0xCA,0x00,0x00,0x00])

print ("Modelo de Lector de Tarjeta:", reader)

print ("El UID de la tarjeta en lector es: ", response)
    
asked by AlberM 19.12.2016 в 12:54
source

0 answers