This commit is contained in:
Michael Hunhoff
2021-06-08 10:12:40 -06:00
parent f9bad7e5e4
commit 84d2f9f324
3 changed files with 4 additions and 2 deletions

View File

@@ -107,6 +107,7 @@ It includes many new rules, including all new techniques introduced in MITRE ATT
- build: use Python 3.8 for PyInstaller to support consistently running across multiple operating systems including Windows 7 #505 @mr-tz
- main: correctly match BB-scope matches at file scope #605 @williballenthin
- explorer: add support for function-name feature #618 @mike-hunhoff
### Changes

View File

@@ -33,3 +33,4 @@ class FunctionName(Feature):
def __init__(self, name, description=None):
# value is function name
super(FunctionName, self).__init__(name, description=description)
self.name = "function-name"

View File

@@ -593,9 +593,9 @@ class CapaExplorerDataModel(QtCore.QAbstractItemModel):
parent, display, location, '"%s"' % capa.features.escape_string(feature[feature["type"]])
)
if feature["type"] in ("import", "export"):
if feature["type"] in ("import", "export", "function-name"):
# display no preview
return CapaExplorerFeatureItem(parent, display=display)
return CapaExplorerFeatureItem(parent, location=location, display=display)
raise RuntimeError("unexpected feature type: " + str(feature["type"]))