From 756fc02e145e176c37af5c5125c55d74d0c89ad3 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sat, 11 Mar 2023 08:56:27 -0500 Subject: symtbl: Display all nested objects in brackets When printing a human readable Symtbl, show all nested objects within [brackets], not just Symtbl itself. Primarily useful since more types are being developed with the intent of being stored in a Symtbl. Signed-off-by: Malfurious Signed-off-by: dusoleil --- sploit/symtbl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sploit/symtbl.py b/sploit/symtbl.py index aa6fc69..e51b72d 100644 --- a/sploit/symtbl.py +++ b/sploit/symtbl.py @@ -175,6 +175,6 @@ class SymtblImpl: s = f"{len(self)} symbols @ {hex(self)}" s += FMT.format("ADDRESS", "SYMBOL") for symbol, offset in sorted(self, key=lambda v: int(v[1])): - disp = f"[{symbol}]" if type(offset) is SymtblImpl else symbol + disp = f"[{symbol}]" if type(offset) is not int else symbol s += FMT.format(hex(offset), disp) return s -- cgit v1.2.3