mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-10-12 10:09:55 +00:00
* Fix issues related with debugging * Update pwnlib/tubes/process.py Co-Authored-By: Arusekk <[email protected]> * Enable doctest for find_module_addresses * Experiment about adding doctests to gdb.py * Add doctests for most functions in gdb.py * Remove 'file' statement in gdb script * Encode cyclic alphabet * Fix travis build Co-authored-by: Arusekk <[email protected]>
18 lines
333 B
Python
18 lines
333 B
Python
"""
|
|
Simple example showing how to use the remote
|
|
gdb debugging features available in pwntools.
|
|
"""
|
|
|
|
import getpass
|
|
|
|
from pwn import *
|
|
|
|
s = ssh(getpass.getuser(), '127.0.0.1', port = 22, keyfile = "~/.ssh/id_rsa")
|
|
c = gdb.ssh_gdb(s, '/bin/sh', gdbscript = '''
|
|
p/x $pc
|
|
c''')
|
|
|
|
c.sendline('ls -la')
|
|
c.sendline('exit')
|
|
print(c.recvall())
|