From 9fcb70387d31d85e8811bfa6f82439121dac44e6 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Mon, 5 Dec 2022 16:17:11 +0100 Subject: [PATCH 1/3] import-to-ida: use other md5 function ref #1204 --- scripts/import-to-ida.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/import-to-ida.py b/scripts/import-to-ida.py index e45ba1da..44dae28e 100644 --- a/scripts/import-to-ida.py +++ b/scripts/import-to-ida.py @@ -32,6 +32,7 @@ import json import logging import idautils +import ida_nalt import ida_funcs import ida_kernwin @@ -73,7 +74,7 @@ def main(): # # see: https://github.com/idapython/bin/issues/11 a = doc["meta"]["sample"]["md5"].lower() - b = idautils.GetInputFileMD5().decode("ascii").lower().rstrip("\x00") + b = ida_nalt.retrieve_input_file_md5().lower() if not a.startswith(b): logger.error("sample mismatch") return -2 From cc832d26aac5baa9c85bbd7c388a04ceff10fbab Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Mon, 5 Dec 2022 15:27:22 +0000 Subject: [PATCH 2/3] import-to-ida: fix imports --- scripts/import-to-ida.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/import-to-ida.py b/scripts/import-to-ida.py index 44dae28e..2bf71c19 100644 --- a/scripts/import-to-ida.py +++ b/scripts/import-to-ida.py @@ -31,7 +31,6 @@ See the License for the specific language governing permissions and limitations import json import logging -import idautils import ida_nalt import ida_funcs import ida_kernwin From c83877ec745c52a0bd2f7a50da85819a9d74b6cc Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Tue, 6 Dec 2022 12:06:07 +0000 Subject: [PATCH 3/3] mypy: ignore ida_nalt --- .github/mypy/mypy.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/mypy/mypy.ini b/.github/mypy/mypy.ini index 3d22b05f..e6e0e942 100644 --- a/.github/mypy/mypy.ini +++ b/.github/mypy/mypy.ini @@ -48,6 +48,9 @@ ignore_missing_imports = True [mypy-ida_bytes.*] ignore_missing_imports = True +[mypy-ida_nalt.*] +ignore_missing_imports = True + [mypy-ida_kernwin.*] ignore_missing_imports = True