from pwn import *
import subprocess
import sys
def disas(a):
context.terminal = ['gnome-terminal', '-x', 'sh', '-c']
p = gdb.debug(a,gdbscript='disas main')
print(p)
print("[*] Please same directory ELF & StackVisual file")
a = input("[*] process : ").strip('\n')
disas(a)
It is running on linux with python. I want to put the assembly language code of the stack part in a variable and output it, but I don't know how.
I tried to get the string printed once using subprocess, but it failed because I didn't know how to get the string to the already executed process.