Professional Documents
Culture Documents
อ่านบัตร ปชช.ด้วย pyscard
อ่านบัตร ปชช.ด้วย pyscard
1.
2.
3. 13 x
4. x
5.
6.
apdu = SELECT+THAI_ID_CARD
f = open(temp.txt,w)
response, sw1, sw2 = cardservice.connection.transmit( apdu )
#print response: , response, status words: , %x %x % (sw1, sw2)
1-2 sw1 sw2
0x90 xx 0x61 xx 90 61 xx
#print response: , response, status words: , %x %x % (sw1, sw2)
for d in DATA:
response, sw1, sw2 = cardservice.connection.transmit( d )
print sw1
if sw1 == 0x61:
list DATA 0x61 xx
cid
GET_RESPONSE = [0X00, 0XC0, 0x00, 0x00 ]
apdu = GET_RESPONSE + [sw2]