From c8ef5327916e354f0e657a6b87e78ee2966cbfe5 Mon Sep 17 00:00:00 2001 From: decalage2 Date: Thu, 23 Mar 2017 22:46:18 +0100 Subject: [PATCH] ezhexviewer: fixed issue #151 to display control chars correctly --- oletools/ezhexviewer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oletools/ezhexviewer.py b/oletools/ezhexviewer.py index d2a1abc..c5a855a 100644 --- a/oletools/ezhexviewer.py +++ b/oletools/ezhexviewer.py @@ -46,8 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # 2012-10-04 v0.02 PL: - added license # 2016-09-06 v0.50 PL: - added main function for entry points in setup.py # 2016-10-26 PL: - fixed to run on Python 2+3 +# 2017-03-23 v0.51 PL: - fixed display of control characters (issue #151) -__version__ = '0.50' +__version__ = '0.51' #------------------------------------------------------------------------------ # TODO: @@ -106,7 +107,7 @@ def bchr(x): # PSF license: http://docs.python.org/license.html # Copyright (c) 2001-2012 Python Software Foundation; All Rights Reserved -FILTER = b''.join([(len(repr(bchr(x)))<=4 and x != 0x0A) and bchr(x) or b'.' for x in range(256)]) +FILTER = b''.join([(len(repr(bchr(x)))<=4 and x>=0x20) and bchr(x) or b'.' for x in range(256)]) def hexdump3(src, length=8, startindex=0): """ -- libgit2 0.21.4