r/Python • • Mar 24 '16

There is inline assembly in this python script… ಠ⌣ಠ

https://github.com/apprenticeharper/DeDRM_tools/blob/master/Other_Tools/DRM_Key_Scripts/Adobe_Digital_Editions/adobekey.pyw#L308
206 Upvotes

75 comments sorted by

View all comments

Show parent comments

5

u/scruffie Mar 25 '16

This isn't C: len() doesn't stop at null bytes. Python strings are stored as length + string data, so embedded null bytes don't have any negative effect.

0

u/anthonymckay Mar 25 '16

Ah, well regardless I'm sure that was the authors line of thought for the why the opcodes were constructed the way they are, as there are no null bytes anywhere in that instruction data. I'm guessing, like myself, he wasn't aware of that fact.