I am currently working on a Python script that will be able to hide all binary files inside itself. It does this by reading all binary data from the targeted file and then stores it in a list inside itself. Then it removes the file to hide it.
Here is my problem: When I store the read bytes in my script file, Python complains that it is not UTF-8-code. Here is a small sample of how the raw data that I read looks like:
ßëM€€Ê yQtm×ßü«WTª¼É[–±Ê
How can I store those bytes without ruining the script? I guess I can store each byte as a code-point instead so that the interpreter accepts it. But how do I tell the write()-I/O function to write bytes as code-points?