logoalt Hacker News

pyrolisticalyesterday at 11:24 PM1 replyview on HN

It decodes to binary pdf and there are only so many valid encodings. So this is how I would solve it.

1. Get an open source pdf decoder

2. Decode bytes up to first ambiguous char

3. See if next bits are valid with an 1, if not it’s an l

4. Might need to backtrack if both 1 and l were valid

By being able to quickly try each char in the middle of the decoding process you cut out the start time. This makes it feasible to test all permutations automatically and linearly


Replies

bawolffyesterday at 11:45 PM

Sounds like a job for afl