From c48b46e9326e7d5fdb135b00658e4fdd2abd9d80 Mon Sep 17 00:00:00 2001 From: Michael Hunhoff Date: Wed, 24 Mar 2021 15:33:20 -0600 Subject: [PATCH] explorer: adding checks to validate matched data when searching --- capa/ida/plugin/view.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/capa/ida/plugin/view.py b/capa/ida/plugin/view.py index 37077a98..9dc161a4 100644 --- a/capa/ida/plugin/view.py +++ b/capa/ida/plugin/view.py @@ -803,9 +803,11 @@ class CapaExplorerRulegenFeatures(QtWidgets.QTreeWidget): if text: for o in iterate_tree(self): data = o.data(0, 0x100) - if data and text.lower() not in data.get_value_str().lower(): - o.setHidden(True) - continue + if data: + to_match = data.get_value_str() + if not to_match or text.lower() not in to_match.lower(): + o.setHidden(True) + continue o.setHidden(False) o.setExpanded(True) else: