pyecsca.sca.target.PCSC module¶
Provides a smartcard target communicating via PC/SC (Personal Computer/Smart Card).
- class PCSCTarget(reader)[source]¶
Bases:
ISO7816Target
Smartcard target communicating via PCSC.
- connect(protocol=None)[source]¶
Connect to the card.
- Parameters:
protocol¶ (
Optional
[CardProtocol
]) – CardProtocol to use.
- select(aid)[source]¶
Select an applet with
aid
.- Parameters:
aid¶ (
bytes
) – The AID of the applet to select.- Return type:
bool
- Returns:
Whether the selection was successful.
- send_apdu(apdu)[source]¶
Send an APDU to the selected applet.
- Parameters:
apdu¶ (
CommandAPDU
) – The APDU to send.- Return type:
- Returns:
The response.