How could I store strings in the format "\x00\xc1\xeb" into a variable encoded/converted into bytes?
It seems python has trouble parsing the backslashes correctly.
What I've tried:
bytes_input = bytes(input('enter byte string'), 'utf-8')
I'm trying to store shellcode into the variable 'bytes_input' I think the backslashes are causing issues because they're being interpreter as escape string.
When I print the variable 'bytes_input' the output is:
b'"\\x00\\xc1\\xeb"'
The intended output should be:
b"\x00\xc1\xeb"