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 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: