diff options
| author | Xusheng <xusheng@vector35.com> | 2023-03-06 19:37:50 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2023-03-06 19:37:50 +0800 |
| commit | 3679217a17675ca326edc91e2aee658168351d55 (patch) | |
| tree | 66ba670c52c8d949194ecec24c4abe26c02f96a5 /python | |
| parent | b62dd911b325e637d48bcb2098766510955c1599 (diff) | |
Print the content of the strings in a more straightforward way
Diffstat (limited to 'python')
| -rw-r--r-- | python/examples/bin_info.py | 6 |
1 files changed, 1 insertions, 5 deletions
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 |
