diff --git a/fingerpass.py b/fingerpass.py index 4d093e0..dce8a83 100755 --- a/fingerpass.py +++ b/fingerpass.py @@ -137,11 +137,16 @@ def fingerprint_7816(card): return "".join( [UNIT_FORMAT % r for r in compressed] ) + ":".join( (len(exceptional) > 0 and [""] or []) + [binascii.b2a_hex(e) for e in exceptional] ) result = [] + postfix = "" test_icao = card.select_application(card.resolve_symbolic_aid("mrtd"), le=None) + if test_icao.sw == "\x67\x00": + postfix = ":6700" # SELECT APPLICATION with P2=0 and without Le returns 6700 Wrong Length + test_icao = card.select_application(card.resolve_symbolic_aid("mrtd"), le=None, P2=0x0c) + if not card.check_sw(test_icao.sw, card.PURPOSE_SUCCESS): - result.append("N") # Not an ICAO MRTD + result.append("N"+postfix) # Not an ICAO MRTD else: - result.append("P") # An ICAO MRTD + result.append("P"+postfix) # An ICAO MRTD bac = detect_bac(card) result.append(bac) # BAC status diff --git a/fingerprints.txt b/fingerprints.txt index 8d2c4b7..f56492e 100644 --- a/fingerprints.txt +++ b/fingerprints.txt @@ -16,3 +16,6 @@ 0:00640411010131800090005a,P,.* German Passport + +0:006404150102009000ee,P:6700,1,569AAA9A + Electronic Passport Specimen, issued by Bundesdruckerei, Germany