Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aktuelle DB-Sparpreise nicht dekodierbar #21

Open
s21f21 opened this issue Apr 20, 2024 · 2 comments
Open

Aktuelle DB-Sparpreise nicht dekodierbar #21

s21f21 opened this issue Apr 20, 2024 · 2 comments

Comments

@s21f21
Copy link

s21f21 commented Apr 20, 2024

Hallo rumpeltux & Co,

erst einmal mein Lob für dieses tolle kleine Projekt! Ich konnte damit erfolgreich mehrere DB-Sparpreise aus 2022 dekodieren. Leider werden aktuelle DB-Sparpreise aus 2024 aber nicht erkannt.

OT
header: b'#UT'
version: b'02'
carrier: b'1080'
key_id: b'00002'
signature: ("PyAsn1Error('<TagSet object, tags 64:0:0> not in asn1Spec: None')", b'@ \xa9rH[...]')
data_length: 201
signature_validity: 'INVALID (asn1 decode error)'
ticket:
0: GenericBlock
head: b'U_FLEX'
version: 13
length: 190
unknown_content: b'b\xb2\x00\x86[...]

Ist dieses Problem bereits bekannt? Welche aktuellen DB-Online-Tickets werden vom Dekoder unterstüzt, vielleicht Flexpreise oder Rail&Fly-Tickets?

Viele Grüße
s21f21

@danielmarschall
Copy link

danielmarschall commented Apr 20, 2024

Hallo,

Die neuen DB-Tickets (ca. Ende 2023) sind im UIC 2.0 "U_FLEX" Format (U_FLEX ist nicht zu verwechseln mit "Flexpreis"). Dieses Format ist leider im Moment nicht implementiert, und ist auch sehr schwierig zu realisieren. (Wir bräuchten einen ASN.1 Decoder für Python, um die ASN.1-Definition zu lesen, aber ich befürchte, da gibt es keine gescheite OpenSource Lösung). Ob das jemals in dieses Projekt einfließen kann, kann nur @rumpeltux entscheiden.

Was jedoch im Moment möglich ist, wäre die Signatur von UIC 2.0 Tickets zu prüfen; hierfür müsste mein Patch #19 angewandt werden.

Ein alternatives Projekt, das U_FLEX Daten lesen kann ist https://github.com/karlheinzkurt/ticket-decoder

@s21f21
Copy link
Author

s21f21 commented Apr 24, 2024

Vielen Dank für die ausführliche Antwort und den wertvollen Hinweis auf das alternative Projekt, ich werde es mir in Ruhe anschauen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants