From 83845078a7292233f2b998ce19cd40df4c87fc5a Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Thu, 5 Jan 2023 11:36:52 +0100 Subject: [PATCH 1/2] render: verbose: fix rendering of scopes closes #1263 --- capa/render/verbose.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/capa/render/verbose.py b/capa/render/verbose.py index 5a225460..6e0c3f39 100644 --- a/capa/render/verbose.py +++ b/capa/render/verbose.py @@ -22,6 +22,8 @@ Unless required by applicable law or agreed to in writing, software distributed 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. """ +import enum + import tabulate import capa.rules @@ -126,6 +128,9 @@ def render_rules(ostream, doc: rd.ResultDocument): if isinstance(v, list) and len(v) == 1: v = v[0] + if isinstance(v, enum.Enum): + v = v.value + rows.append((key, v)) if rule.meta.scope != capa.rules.FILE_SCOPE: From 99e0e45bfccf5a1183c7b80450922cac4a3b3424 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Thu, 5 Jan 2023 11:38:51 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ec3952..661c4554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ - elf: better detect OS via GLIBC ABI version needed and dependencies #1221 @williballenthin - dotnet: address unhandled exceptions with improved type checking #1230 @mike-hunhoff - fix import-to-ida script formatting #1208 @williballenthin +- render: fix verbose rendering of scopes #1263 @williballenthin ### capa explorer IDA Pro plugin - fix: display instruction items #1154 @mr-tz