From 3679217a17675ca326edc91e2aee658168351d55 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Mon, 6 Mar 2023 19:37:50 +0800 Subject: Print the content of the strings in a more straightforward way --- python/examples/bin_info.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'python') diff --git a/python/examples/bin_info.py b/python/examples/bin_info.py index e1b61dab..8d43a999 100644 --- a/python/examples/bin_info.py +++ b/python/examples/bin_info.py @@ -61,11 +61,7 @@ def get_bininfo(bv): for i in range(min(10, len(bv.strings))): start = bv.strings[i].start length = bv.strings[i].length - string = bv.read(start, length) - try: - string = string.decode('utf8') - except UnicodeDecodeError: - pass + string = bv.strings[i].value contents += "| 0x%x |%d | %s |\n" % (start, length, string) return contents -- cgit v1.3.1