Skip to content

Instantly share code, notes, and snippets.

@krzys-h
krzys-h / read_els.py
Last active October 16, 2023 09:26
Reading ELS (Elektroniczna Legitymacja Studencka) data on Linux
# TODO: verify signatures
# TODO: clean up the APDU code
# Some documentation on the ELS format: https://isap.sejm.gov.pl/isap.nsf/download.xsp/WDU20062241634/O/D20061634.pdf
from smartcard.System import readers
from binascii import hexlify, unhexlify
from pyasn1_modules import rfc2315
from pyasn1.codec.der.decoder import decode as der_decoder
from pyasn1.type import univ