From 5c1fb1d11bfb6eb1e2b96cebd4b832579c9b206d Mon Sep 17 00:00:00 2001 From: Jordan ERNST Date: Thu, 26 Sep 2024 22:25:04 +0200 Subject: [PATCH] Fix: GDB 15.1 rpyc detection (#2469) * Fix: GDB 15 rpyc detection * Update CHANGELOG.md * Changelog on the right version * Remove extra newline in CHANGELOG.md --- CHANGELOG.md | 2 ++ pwnlib/gdb.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbabbbd6a..962ff7940 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -124,10 +124,12 @@ The table below shows which release corresponds to each branch, and what date th - [#2466][2466] Fix PLT emulation with Unicorn 2.1.0 - [#2466][2466] Switch to PyPi Simple API for update checks - [#2467][2467] Fix loading at all on Windows +- [#2469][2469] GDB 15+ rpyc detection [2445]: https://github.com/Gallopsled/pwntools/pull/2445 [2466]: https://github.com/Gallopsled/pwntools/pull/2466 [2467]: https://github.com/Gallopsled/pwntools/pull/2467 +[2469]: https://github.com/Gallopsled/pwntools/pull/2469 ## 4.13.0 (`stable`) diff --git a/pwnlib/gdb.py b/pwnlib/gdb.py index c8f637402..747b5dff3 100644 --- a/pwnlib/gdb.py +++ b/pwnlib/gdb.py @@ -1245,7 +1245,7 @@ def preexec_fn(): else: # Check to see if RPyC is installed at all in GDB rpyc_check = [gdb_binary, '--nx', '-batch', '-ex', - 'python import rpyc; import sys; sys.exit(123)'] + 'python import rpyc; import gdb; gdb.execute("quit 123")'] if 123 != tubes.process.process(rpyc_check).poll(block=True): log.error('Failed to connect to GDB: rpyc is not installed')