E
E
egmen2018-06-30 10:56:44
reverse engineering
egmen, 2018-06-30 10:56:44

How to extract data from PDF417 ticket code of Russian Railways?

Russian Railways tickets have a code in PDF417 format .
When I read it, I get a string in binary format. It looks like it's compressed.
The beginning of the string is always bytes: 01 00 01 00 ending 1B 10 0A.
The question is how to determine the compression algorithm and extract useful information from the ticket code?
I want to know the number, date and time of departure of the train, arrival time, car and place.
In the test ticket, I received the following content:

Via https://www.onlinebarcodereader.com/
010001001A002B4A0F41C29EC3B8C3BB535355205B15C3A467C3AEC298C294C3B90BC2ABC3A50542C2A0C398C28A33C3A46506C28F24C39E0544C38FC3AB0CC2B363C3A824C3A709104D51C298C29AC2AD0DC28E00C2A2C3B0C2B1C387C2AEC281684EC2A3C387C28124C3B80AC3AA6AC2B54F55C3B4010000000004402600012003191961C2B41260C28D1BC39E10C39E6030C29229207D0FC2BBC39FC3B71EC2BC4CC297C3B7402010080402C281402060C383C395721301C2BE1B100A
Via https://online-barcode-reader.inliteresearch.com/
010001001A002B4A0F419EF8FB535355205B15E467EE9894F90BABE50542A0D88A33E465068F24DE0544CFEB0CB363E824E709104D51989AAD0D8E00A2F0B1C7AE81684EA3C78124F80AEA6AB54F55F4010000000004402600012003191961B412608D1BDE10DE60309229207D0FBBDFF71EBC4C97F740201008040281402060C3D5721301BE1B10

Ticket example https://yadi.sk/i/zP5boKem3YcYP3
Ticket code example
5b373767df290379680281.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sadovaya36, 2019-01-05
@sadovaya36

It turned out to be unexpectedly difficult to pull out the "data" ....))) I tried it on single tickets of the CPPK.
The data is encoded in PDF417 format.
The ticket structure consists (as a rule, there are exceptions) of 88 bytes. For example:
"16 30 0f 00 00 00 00 00 00 00 00 00 b8 b0 ef 5b 0c 1c 25 00 eb c0 00 c0 08 91 b9 d9 b7 c2 87 06 5b 0c aa f6 f7 14 bf 0e 06 20 2d 51 25 bc ed 76 32 4d 6e 9e bc bf f2 b0 65 ff 91 47 94 ea 82 4d c6 f6 92 66 96 6e d0 c4 94 53 ef 2a c4 52 15 2b 8c 88 48 9d 87 d9 9f "
Here:
0th byte: (16) - "layout" - code of location (distribution) of data;
1st and 2nd bytes - "document number" (travel ticket): (0f30)hex--->(3888)decimal...
etc.
are also encoded:
- type of ticket ("one way", "round trip");
- the availability of travel concessions and its type (preferential, non-monetary);
- date and time of ticket sale;
- route (from station... to station...);
- identifier of the ticket printing device;
and other data, some of which I still haven't figured out myself.... :(
The biggest inconvenience is getting the code.... because the online services listed don't work correctly....
To date, the bcTester 5.0.0.231 program works almost without errors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question