mirror of
https://github.com/mandiant/capa.git
synced 2026-02-04 11:07:53 -08:00
format fixes, strip strings before display
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
import os
|
||||
import json
|
||||
import copy
|
||||
import json
|
||||
import logging
|
||||
import itertools
|
||||
import collections
|
||||
@@ -26,9 +26,9 @@ import capa.features.extractors.ida
|
||||
from capa.ida.plugin.icon import QICON
|
||||
from capa.ida.plugin.view import (
|
||||
CapaExplorerQtreeView,
|
||||
CapaExplorerRulegenFeatures,
|
||||
CapaExplorerRulgenEditor,
|
||||
CapaExplorerRulgenPreview,
|
||||
CapaExplorerRulegenFeatures,
|
||||
)
|
||||
from capa.ida.plugin.hooks import CapaExplorerIdaHooks
|
||||
from capa.ida.plugin.model import CapaExplorerDataModel
|
||||
@@ -407,9 +407,6 @@ class CapaExplorerForm(idaapi.PluginForm):
|
||||
splitter1.addWidget(left)
|
||||
splitter1.addWidget(splitter2)
|
||||
|
||||
#layout.addWidget(left, 40)
|
||||
#layout.addWidget(right, 60)
|
||||
|
||||
layout.addWidget(splitter1)
|
||||
|
||||
tab = QtWidgets.QWidget()
|
||||
|
||||
@@ -5,17 +5,16 @@
|
||||
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
from collections import Counter
|
||||
import re
|
||||
from collections import Counter
|
||||
|
||||
import idc
|
||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
|
||||
import capa.features.basicblock
|
||||
import capa.ida.helpers
|
||||
import capa.engine
|
||||
import capa.rules
|
||||
|
||||
import capa.engine
|
||||
import capa.ida.helpers
|
||||
import capa.features.basicblock
|
||||
from capa.ida.plugin.item import CapaExplorerFunctionItem
|
||||
from capa.ida.plugin.model import CapaExplorerDataModel
|
||||
|
||||
@@ -772,6 +771,10 @@ class CapaExplorerRulegenFeatures(QtWidgets.QTreeWidget):
|
||||
# in the future
|
||||
continue
|
||||
|
||||
if isinstance(feature, capa.features.String):
|
||||
# strip string for display
|
||||
feature.value = feature.value.strip()
|
||||
|
||||
# level 0
|
||||
if type(feature) not in self.parent_items:
|
||||
self.parent_items[type(feature)] = self.new_parent_node(self, (feature.name.lower(),))
|
||||
|
||||
Reference in New Issue
Block a user