skysider / pwndocker

A docker environment for pwn in ctf
GNU General Public License v3.0
731 stars 142 forks source link

When I tring to use gdb.attach(io) in py script using pwntools. An Error occurred said #12

Closed SpiralBL0CK closed 2 years ago

SpiralBL0CK commented 3 years ago

when running exploit script and attaching dynamically or not even interracting with binary and after process started if I attach i get this Traceback (most recent call last): File "hack20.py", line 9, in gdb.attach(p) File "/usr/local/lib/python3.8/dist-packages/pwnlib/context/init.py", line 1543, in setter return function(*a, *kw) File "/usr/local/lib/python3.8/dist-packages/pwnlib/gdb.py", line 1051, in attach gdb_pid = misc.run_in_new_terminal(cmd, preexec_fn = preexec_fn) File "/usr/local/lib/python3.8/dist-packages/pwnlib/util/misc.py", line 297, in run_in_new_terminal pid = int(out) ValueError: invalid literal for int() with base 10: b'' [] Stopped process './sint' (pid 20)

skysider commented 3 years ago

@SpiralBL0CK try to use latest pwndocker image and test again. And Before you run python script, execute 'tmux' cmd.