decoding algorithm wanted
Posted
by Horace Ho
on Stack Overflow
See other posts from Stack Overflow
or by Horace Ho
Published on 2010-04-26T08:20:39Z
Indexed on
2010/04/26
8:23 UTC
Read the original article
Hit count: 267
I receive encoded PDF files regularly. The encoding works like this:
- the PDFs can be displayed correctly in Acrobat Reader
- select all and copy the test via Acrobat Reader
- and paste in a text editor
- will show that the content are encoded
so, examples are:
13579 -> 3579;
hello -> jgnnq
it's basically an offset (maybe swap) of ASCII characters.
The question is how can I find the offset automatically when I have access to only a few samples. I cannot be sure whether the encoding offset is changed. All I know is some text will usually (if not always) show up, e.g. "Name:", "Summary:", "Total:", inside the PDF.
Thank you!
© Stack Overflow or respective owner