I have following problem:
I want to read from file into a raw binary string :
The file looks like this (with escape characters, not binary data):
\xfc\xe8\x82\x00\x00\x00\x60\x89\xe5\x31\xc0\x64\x8b\x50\x30\x8b\x52
code used:
data = open("filename", "rb").read()
result obtained:
b"\\xfc\\xe8\\x82\\x00\\x00\\x00\\x60\\x89\\xe5\\x31\\xc0\\x64\\x8b\\x50\\x30\\x8b\\x52"
With dobule \ .
How can I read it as binary string like : \xaa
characters ?
(Without escape characters)