summaryrefslogtreecommitdiff
path: root/python/examples
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples')
-rw-r--r--python/examples/bin_info.py6
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