From 6eaa46ea9ae5f45500528c96ab3d35ea77d1ff30 Mon Sep 17 00:00:00 2001 From: Pratham Chauhan Date: Wed, 5 Apr 2023 13:32:15 +0530 Subject: [PATCH] revert bninja change --- .github/ruff.toml | 4 ++-- capa/features/extractors/binja/insn.py | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ruff.toml b/.github/ruff.toml index ddf7fe94..38927883 100644 --- a/.github/ruff.toml +++ b/.github/ruff.toml @@ -1,6 +1,6 @@ select = ["E"] -ignore = ["E402", "E722", "E902"] -exclude = ["*_pb2.py", "*_pb2.pyi", "capa2yara.py"] +ignore = ["E402", "E722"] +exclude = ["*_pb2.py", "*_pb2.pyi"] # Same as pycodestyle. line-length = 180 diff --git a/capa/features/extractors/binja/insn.py b/capa/features/extractors/binja/insn.py index 99d5d6ef..23de37ce 100644 --- a/capa/features/extractors/binja/insn.py +++ b/capa/features/extractors/binja/insn.py @@ -439,7 +439,7 @@ def extract_insn_peb_access_characteristic_features( return True value = right.value.value - if (reg, value) not in (("fsbase", 48), ("gsbase", 96)): + if not (reg, value) in (("fsbase", 0x30), ("gsbase", 0x60)): return True results.append((Characteristic("peb access"), ih.address)) diff --git a/setup.py b/setup.py index c7688027..5e42f516 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ setuptools.setup( "pytest-instafail==0.5.0", "pytest-cov==4.0.0", "pycodestyle==2.10.0", - "ruff==0.0.259", + "ruff==0.0.260", "black==23.3.0", "isort==5.11.4", "mypy==1.1.1",