mirror of
https://github.com/mandiant/capa.git
synced 2025-12-23 15:37:37 -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 insn in extractor.get_instructions(f, bb):
|
||||||
for feature, va in extractor.extract_insn_features(f, bb, insn):
|
for feature, va in extractor.extract_insn_features(f, bb, insn):
|
||||||
print("insn: 0x%08x: %s" % (va, feature))
|
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
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user