aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cards/iso_7816_4_card.py3
-rw-r--r--cards/rfid_card.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/cards/iso_7816_4_card.py b/cards/iso_7816_4_card.py
index 40cc8fd..c13c100 100644
--- a/cards/iso_7816_4_card.py
+++ b/cards/iso_7816_4_card.py
@@ -291,7 +291,8 @@ class ISO_7816_4_Card(building_blocks.Card_with_read_binary,Card):
STOP_ATRS = list(Card.STOP_ATRS)
STOP_ATRS.extend( [
- ("3b8f8001804f0ca000000306......00000000..", None) # Contactless storage cards (PC/SC spec part 3 section 3.1.3.2.3
+ ("3b8f8001804f0ca000000306......00000000..", None), # Contactless storage cards (PC/SC spec part 3 section 3.1.3.2.3
+ ("3b8180018080", None), # Mifare DESfire (special case of contactless smartcard, ibid.)
] )
COMMANDS = dict(Card.COMMANDS)
diff --git a/cards/rfid_card.py b/cards/rfid_card.py
index 9358136..a1d7180 100644
--- a/cards/rfid_card.py
+++ b/cards/rfid_card.py
@@ -83,11 +83,12 @@ class Mifare_Ultralight_Card(Mifare_Card):
("3b8f8001804f0ca000000306..000300000000..", None),
]
-class Mifare_DESfire_Card(Mifare_Card):
+class Mifare_DESfire_Card(RFID_Card):
DRIVER_NAME = ["Mifare DESfire"]
ATRS = [
("3B8180018080", None)
]
+ STOP_ATRS = []
STATUS_WORDS = {
"\x91\x00": "Successful Operation",
@@ -130,6 +131,7 @@ class Mifare_DESfire_Card(Mifare_Card):
return result.data, result.sw2
def cmd_wrap_native(self, *args):
+ "Wrap a native DESfire command into an ISO 7816 APDU"
data, returncode = self.wrap_native( binascii.a2b_hex( "".join("".join(args).split()) ) )
print utils.hexdump(data)