Trying to debug a program (with buffer overflows) with a script on python I need to recover all messages a program may send.
On Linux, on terminal a normal call as ./a.out AAA respond with
Your argument is: AAA
with a overflow input: ./a.out AAAAAAA respond with
Your argument is: AAAAAAA
Segmentation fault
I building the python code as follows
import sys, string, os
from subprocess import Popen, PIPE
processName = os.getcwd() + "/a.out"
argument = "AAAAAAAAA"
p = Popen([processName, argument], stdout=PIPE, stderr=PIPE)
output, error = p.communicate()
print(":: %d %s %s" % (p.returncode, output, error))
but I am unable to get the Segmentation fault message
neither found needed parameter as far as I have search