Questions tagged [pyscard]

pyscard - python smart card library is a python module adding smart cards support to python.

45 questions
1
vote
1 answer

Running certain APDUs fails, stating Failed to transmit with protocol T0. Falscher Parameter

I'm having issues accessing SLE4428 cards under Windows 10 using an ACS ACR38U-I1, Python 3.7 and pyscard. I'm using the latest driver the manufacturer currently offers for Windows. The main problem is that running certain APDUs fails, stating…
lrv89
  • 11
  • 3
1
vote
1 answer

Mifare 4K change of keys in trailing block returns error "99" using ACR1252 and pyscard

We receive Mifare 4k cards from a supplier who pre-encodes each sector trailer as follows: FFFFFFFFFFFFFF078069FFFFFFFFFFFF In doing so, the supplier sets the access bit to FF0780 and the read key (Key A) and write key (Key B) remain the factory…
Ajax
  • 1,418
  • 2
  • 17
  • 38
1
vote
0 answers

Read data from smartcard - pyscard

I'm trying to read data from a "MIFARE Classic 4K - emulated (6212 Classic), Nokia" card with an ACS ACR122U reader. The sector I need to read is number 18, the Key A is A0A1A2A3A4A5 (I can read it with my smartphone). Nonetheless, I cannot load the…
Ricardo
  • 11
  • 2
1
vote
1 answer

Accessing external reader(smart card readers, nfc reader,etc) devices inside a docker container

I am trying to make a application that uses a card reader and want to dockerise that solution. As of now I have dockerised the application (Linux container using WSL on windows (docker desktop))but catch is I cant seem to access the reader inside…
1
vote
0 answers

I can not understand my symptoms. Python is using pyscard

I'm working on a program in Python that recognizes the Mifare Card with tkinter and writes the value to the card. My current program is scarce but works well. However, it fails intermittently when updating the binary block on the card. After…
haru
  • 11
  • 3
1
vote
0 answers

How to make a Request over NFC Reader ACR122u when auto polling is disabled

Is there a solution to send a direct command to the reader to search for available cards even if auto polling is disabled? I want to read from an RFID Chip over the ACR122U NFC reader. I tried the nfcpy lib but every time when I read the tag the…
Killaxy
  • 126
  • 1
  • 5
1
vote
1 answer

How to reset this code after detecting a smartcard without terminating it, thus continues to listen for other smartcards?

I have a code running and successfully printing the ATR, UID, and status, however, the program ends after detecting and printing the UID. How do I make my code reset after detecting and wait for the removal and insertion of a different card (or same…
1
vote
1 answer

Pyinstaller fails with pyscard on windows

I am trying to use pyinstaller on a simple script which use pyscard. from smartcard.Exceptions import NoCardException from smartcard.System import readers from smartcard.util import toHexString for reader in readers(): try: connection…
acapola
  • 1,078
  • 1
  • 12
  • 23
1
vote
1 answer

USB - Is there an initial handshake between host and device?

I'm capturing USB traffic using Wireshark on a smart card reader. When I connect to the reader using PyScard, some packets are sent back and forth using bulk operations before I send any APDU just by establishing the connection. I have read here…
Berbus
  • 160
  • 3
  • 20
1
vote
2 answers

Why a ACR38U-CCID always return 0x6e 0x00?

Am working on a project to read from and write data to smart cards. The Card Reader am using is ACR38U-H1 from ACS. Following their APDU commands, I have being able to get access to the card and read some data. But am suspecting that I still have…
1
vote
1 answer

Pyscard failed to list readers

I have an ACR38 reader and I use Python2.7. I searched for the ways to communicate with a reader using python and finally the below code found here import sys sys.path.append('D:\PythonX\Lib\site-packages') from smartcard.scard import * import…
TheGoodUser
  • 1,188
  • 4
  • 26
  • 52
0
votes
1 answer

Android's NfcA to python's pyscard (smartcard)

I am backwards-engineering an android application (written in java) into a python application, where nfc (apdu) commands are sent. (ISO 14443-3A, if that helps) The android applications makes use of the android.nfc.tech.NfcA library and sends…
Engensmax
  • 109
  • 1
  • 9
0
votes
1 answer

Mocking a smart card response using pyscard

I'm trying to mock a response in a small function using some pyscard attributes. My function: def card_reader(): # request any card type cardtype = AnyCardType() cardrequest = CardRequest(timeout=25, cardType=cardtype) cardservice =…
Joey Fran
  • 598
  • 2
  • 24
0
votes
1 answer

How to read SLE4428 smart card using S9 protocol in pyscard library

I have a problem with reading SLE4428 card. I tried to use simple program written in python, but I received a message that pyscard supports only T=0 and T=1 protocol. My card uses S9 protocol. Do you have any software which I can use to read/write…
Dubster
  • 83
  • 1
  • 5
0
votes
1 answer

Problem sending an APDU command with pyscard

I am developing a simple application involving an ACR1251 smart card reader. Currently I don't have it with me, but it's a time-sensitive project, so I'm using vsmartcard to emulate a reader and a ISO 7816 card. The code I'm having problems with…
rubemnobre
  • 100
  • 5