I wrote my first buffer overflow exploit and it worked well with
./vulnerable $(cat payload)
but when I tried to launch it from a Python shell it didn't work
import os
os.system("./vulnerable $(cat payload)")
This does a segmentation fault. Can someone explain why? Is there a difference in the memory when it's launched in different environments?
os.system
?