mirror of
https://github.com/mandiant/capa.git
synced 2026-01-17 23:25:50 -08:00
Merge pull request #29 from fireeye/default-sort-capa-explorer
capa explorer tree view default to sorted asc, trim regex matches
This commit is contained in:
@@ -383,6 +383,8 @@ class CapaExplorerDataModel(QtCore.QAbstractItemModel):
|
||||
if isinstance(feature, string_view):
|
||||
# TODO: move string collection to item constructor
|
||||
if isinstance(feature, capa.engine.Regex):
|
||||
# rstrip "matched="<string>")" because data already displayed in interface
|
||||
name = name.split(',')[0] + ')'
|
||||
return CapaExplorerStringViewItem(parent, name, ea, feature.match)
|
||||
|
||||
if isinstance(feature, capa.features.Characteristic):
|
||||
|
||||
@@ -351,6 +351,8 @@ class CapaExplorerForm(idaapi.PluginForm):
|
||||
self._model_data.render_capa_results(rules, capabilities)
|
||||
self._render_capa_summary(rules, capabilities)
|
||||
|
||||
self._view_tree.sortByColumn(CapaExplorerDataModel.COLUMN_INDEX_RULE_INFORMATION, Qt.AscendingOrder)
|
||||
|
||||
logger.info('render views completed.')
|
||||
|
||||
def _render_capa_summary(self, ruleset, results):
|
||||
|
||||
Reference in New Issue
Block a user