type: capa.features.extractors.viv.helpers

This commit is contained in:
William Ballenthin
2021-06-09 22:54:29 -06:00
parent 6f67619621
commit 8a0ae7ae55
2 changed files with 5 additions and 2 deletions

View File

@@ -5,10 +5,13 @@
# 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 typing import Optional
from vivisect import VivWorkspace
from vivisect.const import XR_TO, REF_CODE
def get_coderef_from(vw, va):
def get_coderef_from(vw: VivWorkspace, va: int) -> Optional[int]:
"""
return first code `tova` whose origin is the specified va
return None if no code reference is found

View File

@@ -75,7 +75,7 @@ setuptools.setup(
],
"mypy": [
"types-colorama",
]
],
},
zip_safe=False,
keywords="capa malware analysis capability detection FLARE",