I am following a buffer overflow tutorial. I have set up my NOP block, I also set up my shell code, now I need to append the return address to the end of my string. I know my return address is :
You can use struct.pack like this:
Check the documentation of struct.pack if you want to change the endianness.