From 7c4e7f753aaabd915eb4491dbc51cc7ebe7e7ee5 Mon Sep 17 00:00:00 2001 From: Sidar <65621366+Maple38@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:54:11 +0300 Subject: [PATCH 1/3] Old code no gud, now it work gud :) Previously it would refuse to load on IDA 8.0 and above, fixed that. Additionally, it will print a message warning that the plugin was built for IDA 7.5. --- D810.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/D810.py b/D810.py index 32c6e80..6320720 100644 --- a/D810.py +++ b/D810.py @@ -52,10 +52,12 @@ def init(self): if not ida_hexrays.init_hexrays_plugin(): print("D-810 need Hex-Rays decompiler. Skipping") return idaapi.PLUGIN_SKIP - - kv = ida_kernwin.get_kernel_version().split(".") - if (int(kv[0]) < 7) or (int(kv[1]) < 5): - print("D-810 need IDA version >= 7.5. Skipping") + + ver = float(ida_kernwin.get_kernel_version()) + if ver < 7.5 + print("Version mismatch; D-810 needs IDA version >= 7.5. Skipping") + if ver >= 8: + print(f"Notice: D-810 was built for IDA version 7.5. You are running v{ver}") return idaapi.PLUGIN_SKIP print("D-810 initialized (version {0})".format(D810_VERSION)) return idaapi.PLUGIN_OK From 4e8652e4f7dcc01ee14d5f85d9f81858f05139ba Mon Sep 17 00:00:00 2001 From: Sidar <65621366+Maple38@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:46:06 +0300 Subject: [PATCH 2/3] Fixed my totally broken code No idea how I managed to mess up this badly --- D810.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/D810.py b/D810.py index 6320720..73fbb18 100644 --- a/D810.py +++ b/D810.py @@ -54,11 +54,11 @@ def init(self): return idaapi.PLUGIN_SKIP ver = float(ida_kernwin.get_kernel_version()) - if ver < 7.5 + if ver < 7.5: print("Version mismatch; D-810 needs IDA version >= 7.5. Skipping") + return idaapi.PLUGIN_SKIP if ver >= 8: print(f"Notice: D-810 was built for IDA version 7.5. You are running v{ver}") - return idaapi.PLUGIN_SKIP print("D-810 initialized (version {0})".format(D810_VERSION)) return idaapi.PLUGIN_OK From 47ccca04b5284c2c24d4fca7ecb3cf74daf4fc48 Mon Sep 17 00:00:00 2001 From: Sidar <65621366+Maple38@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:46:54 +0300 Subject: [PATCH 3/3] Blank line was bugging me :( --- D810.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/D810.py b/D810.py index 73fbb18..33cc996 100644 --- a/D810.py +++ b/D810.py @@ -52,7 +52,7 @@ def init(self): if not ida_hexrays.init_hexrays_plugin(): print("D-810 need Hex-Rays decompiler. Skipping") return idaapi.PLUGIN_SKIP - + ver = float(ida_kernwin.get_kernel_version()) if ver < 7.5: print("Version mismatch; D-810 needs IDA version >= 7.5. Skipping")