I am trying to print the address 0x004007ad to the terminal for the purposes of a buffer overflow assignment. I have to do it in little endian because of my processor. However when I try print the address the \x00 is not being included. Below is the code for my python program:
hex_string = "\xad\x07\x40\x00"
print "\x01" * 28 + hex_string
How can I print it so that the \x00 is included?