From 7aec6ac7711231675ce2abd16036bcd37c26c40e Mon Sep 17 00:00:00 2001 From: Sanjit Kumar Date: Thu, 11 Apr 2024 18:15:14 -0400 Subject: [PATCH 1/2] converting bytes-like object to string --- pwnlib/elf/corefile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pwnlib/elf/corefile.py b/pwnlib/elf/corefile.py index 02ac36ebf..1cb8823fa 100644 --- a/pwnlib/elf/corefile.py +++ b/pwnlib/elf/corefile.py @@ -1329,6 +1329,10 @@ def apport_read_crash_data(self): except Exception: pass + # Convert bytes-like object to string + if isinstance(data, bytes): + data = data.decode('utf-8') + return data def systemd_coredump_corefile(self): From 8710fa182c36137d61b0832bfb2ce8ebc03df608 Mon Sep 17 00:00:00 2001 From: Sanjit Kumar Date: Thu, 11 Apr 2024 18:23:18 -0400 Subject: [PATCH 2/2] updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fb9e31d1..0aee52da1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ The table below shows which release corresponds to each branch, and what date th - [#2327][2327] Add basic support to debug processes on Windows - [#2322][2322] Add basic RISCV64 shellcraft support - [#2330][2330] Change `context.newline` when setting `context.os` to `"windows"` +- [#2387][2387] Convert apport_corefile() output from bytes-like object to string [2360]: https://github.com/Gallopsled/pwntools/pull/2360 [2356]: https://github.com/Gallopsled/pwntools/pull/2356 @@ -84,6 +85,7 @@ The table below shows which release corresponds to each branch, and what date th [2327]: https://github.com/Gallopsled/pwntools/pull/2327 [2322]: https://github.com/Gallopsled/pwntools/pull/2322 [2330]: https://github.com/Gallopsled/pwntools/pull/2330 +[2387]: https://github.com/Gallopsled/pwntools/pull/2387 ## 4.13.0 (`beta`)