mirror of
https://github.com/mandiant/capa.git
synced 2025-12-23 07:28:34 -08:00
show-features: fix error when piping features to less
This commit is contained in:
@@ -132,7 +132,11 @@ def main(argv=None):
|
||||
|
||||
for insn in extractor.get_instructions(f, bb):
|
||||
for feature, va in extractor.extract_insn_features(f, bb, insn):
|
||||
try:
|
||||
print("insn: 0x%08x: %s" % (va, feature))
|
||||
except UnicodeEncodeError:
|
||||
# may be an issue while piping to less and encountering non-ascii characters
|
||||
continue
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user