Commit d84f22da by devttys0

Fixed terminal formatting in hexdiff mode

parent 55075e57
......@@ -144,7 +144,7 @@ class Filter(object):
return False
# If showing invalid results, just return True without further checking.
if callable(self.show_invalid_results) and self.show_invalid_results():
if self.show_invalid_results:
return True
# Don't include quoted strings or keyword arguments in this search, as
......
......@@ -109,8 +109,9 @@ class General(Module):
self._open_target_files()
self._set_verbosity()
self.filter = binwalk.core.filter.Filter(self._display_invalid)
#self.filter = binwalk.core.filter.Filter(self._display_invalid)
self.filter = binwalk.core.filter.Filter(self.show_invalid)
# Set any specified include/exclude filters
for regex in self.exclude_filters:
self.filter.exclude(regex)
......@@ -184,5 +185,3 @@ class General(Module):
except Exception as e:
self.error(description="Cannot open file : %s" % str(e))
def _display_invalid(self):
return self.show_invalid
......@@ -153,7 +153,10 @@ class HexDiff(Module):
def init(self):
# Disable the invalid description auto-filtering feature.
# This will not affect our own validation.
self.config.show_invalid = True
self.config.filter.show_invalid_results = True
# Always disable terminal formatting, as it won't work properly with colorized output
self.config.display.fit_to_screen = False
# Set the block size (aka, hexdump line size)
self.block = self.config.block
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment