From b329f96c5dd1a9a24059cf09e5ba56926316d3ba Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Fri, 14 Aug 2026 21:53:47 +0100 Subject: [PATCH 01/10] =?UTF-8?q?=E2=9A=97=EF=B8=8F=20Trying=20cmd.isBlank?= =?UTF-8?q?()=20instead=20of=20.isEmpty()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/bindiffhelper/BinDiffHelperPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/bindiffhelper/BinDiffHelperPlugin.java b/src/main/java/bindiffhelper/BinDiffHelperPlugin.java index 41813d7..5d482aa 100644 --- a/src/main/java/bindiffhelper/BinDiffHelperPlugin.java +++ b/src/main/java/bindiffhelper/BinDiffHelperPlugin.java @@ -311,7 +311,7 @@ public void updateEnableNamespace(boolean enable) public void updateDiffCommand(String cmd) { - diffCommand = cmd == null || cmd.isEmpty() ? defaultDiffCommand : cmd; + diffCommand = cmd == null || cmd.isBlank() ? defaultDiffCommand : cmd; Preferences.setProperty(DIFFCOMMAND, cmd); } From c6ea35e9b30fafcf2876f692e3991b4127688cc3 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Fri, 14 Aug 2026 21:58:59 +0000 Subject: [PATCH 02/10] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Updated=20binexport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 2 +- binexport | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5389fd4..f049b05 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "binexport"] path = binexport - url = https://github.com/google/binexport.git + url = https://github.com/abd3lraouf-studios/binexport-ghidra-12.git diff --git a/binexport b/binexport index 17c4363..1f8511e 160000 --- a/binexport +++ b/binexport @@ -1 +1 @@ -Subproject commit 17c4363b7d2ece44161a0ebced60f4e66d309af8 +Subproject commit 1f8511e7dc9f4c194b5d730ba7b3ebfd9d5c9aa5 From 29de2175fbf7fc7b1e030f796c218724a4abd798 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Fri, 14 Aug 2026 23:57:55 +0000 Subject: [PATCH 03/10] =?UTF-8?q?=F0=9F=90=9B=20Attampted=20to=20fix=20sec?= =?UTF-8?q?ond=20program=20selection=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/bindiffhelper/DiffWizard.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/bindiffhelper/DiffWizard.java b/src/main/java/bindiffhelper/DiffWizard.java index 970949f..35498c8 100644 --- a/src/main/java/bindiffhelper/DiffWizard.java +++ b/src/main/java/bindiffhelper/DiffWizard.java @@ -408,6 +408,13 @@ public void initialize(DiffWizardData data) { this.panel.add(cb); this.panel.add(tp); + cb.addActionListener(e -> notifyStatusChanged()); + tp.addTreeSelectionListener(new GTreeSelectionListener() { + @Override + public void valueChanged(GTreeSelectionEvent e) { + notifyStatusChanged(); + } + }); } From 9f07dddd4755a78a2ff04efe1fac8ed7bc47b3a3 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Sat, 15 Aug 2026 01:30:05 +0100 Subject: [PATCH 04/10] =?UTF-8?q?=F0=9F=90=9B=20Attempted=20to=20fix=20fin?= =?UTF-8?q?ish=20button=20in=20secondary=20program=20step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/bindiffhelper/DiffWizard.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/bindiffhelper/DiffWizard.java b/src/main/java/bindiffhelper/DiffWizard.java index 35498c8..07ca99e 100644 --- a/src/main/java/bindiffhelper/DiffWizard.java +++ b/src/main/java/bindiffhelper/DiffWizard.java @@ -435,8 +435,7 @@ public boolean isValid() { @Override public boolean canFinish(DiffWizardData data) { - // TODO Auto-generated method stub - return false; + return true; } @Override @@ -446,7 +445,7 @@ public void populateData(DiffWizardData data) { @Override public boolean apply(DiffWizardData data) { - if (cb.isSelected()) { + if (data.useProgram2) { try { data.program2Df = tp.getSelectedDomainFile(); Tool newTool = plugin.getTool().getToolServices().launchDefaultTool(Collections.singletonList(data.program2Df)); @@ -465,7 +464,7 @@ public boolean apply(DiffWizardData data) { public JComponent getComponent() { return this.panel; } - + @Override public boolean isApplicable(DiffWizardData data) { return !data.isFromProject; From 38557ada99e44d7e5878f7784894559af6aac4a7 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Sat, 15 Aug 2026 11:08:20 +0100 Subject: [PATCH 05/10] =?UTF-8?q?=E2=9A=97=EF=B8=8F=20Debugging=20Program2?= =?UTF-8?q?Step's=20valid=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 3 ++- src/main/java/bindiffhelper/DiffWizard.java | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2c2525..116eef9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,8 @@ jobs: strategy: fail-fast: false matrix: - ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest","11.4.2","11.4.1","11.4"')) }} + # ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest","11.4.2","11.4.1","11.4"')) }} + ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest"')) }} steps: - name: Clone Repository diff --git a/src/main/java/bindiffhelper/DiffWizard.java b/src/main/java/bindiffhelper/DiffWizard.java index 07ca99e..79edea7 100644 --- a/src/main/java/bindiffhelper/DiffWizard.java +++ b/src/main/java/bindiffhelper/DiffWizard.java @@ -420,17 +420,22 @@ public void valueChanged(GTreeSelectionEvent e) { @Override public boolean isValid() { - if (!cb.isSelected()) - return true; + Msg.showInfo(this, "selected count = " + tp.getSelectedItemCount()); + Msg.showInfo(this, "selected folder = " + tp.getSelectedDomainFolder()); + Msg.showInfo(this, "selected file = " + tp.getSelectedDomainFile()); - if (tp == null || tp.getSelectedItemCount() != 1) - return false; + return true; + // if (!cb.isSelected()) + // return true; - if (tp.getSelectedDomainFolder() != null) - return false; + // if (tp == null || tp.getSelectedItemCount() != 1) + // return false; - var df = tp.getSelectedDomainFile(); - return df != null; + // if (tp.getSelectedDomainFolder() != null) + // return false; + + // var df = tp.getSelectedDomainFile(); + // return df != null; } @Override From 1cbe188efdae5ae36c7ed79c576982a4c5491fc9 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Sat, 15 Aug 2026 11:13:52 +0100 Subject: [PATCH 06/10] =?UTF-8?q?=F0=9F=A9=B9=20Used=20correct=20debug=20f?= =?UTF-8?q?unction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/bindiffhelper/DiffWizard.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/bindiffhelper/DiffWizard.java b/src/main/java/bindiffhelper/DiffWizard.java index 79edea7..1826a74 100644 --- a/src/main/java/bindiffhelper/DiffWizard.java +++ b/src/main/java/bindiffhelper/DiffWizard.java @@ -420,9 +420,9 @@ public void valueChanged(GTreeSelectionEvent e) { @Override public boolean isValid() { - Msg.showInfo(this, "selected count = " + tp.getSelectedItemCount()); - Msg.showInfo(this, "selected folder = " + tp.getSelectedDomainFolder()); - Msg.showInfo(this, "selected file = " + tp.getSelectedDomainFile()); + Msg.debug(this, "selected count = " + tp.getSelectedItemCount()); + Msg.debug(this, "selected folder = " + tp.getSelectedDomainFolder()); + Msg.debug(this, "selected file = " + tp.getSelectedDomainFile()); return true; // if (!cb.isSelected()) From 2756aab19622234b48ce3d7baa25cd1f8b742090 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Sat, 15 Aug 2026 12:26:02 +0100 Subject: [PATCH 07/10] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20diffCommand=20exec?= =?UTF-8?q?ution=20by=20wrapping=20it=20in=20a=20shell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/bindiffhelper/BinDiffHelperProvider.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/bindiffhelper/BinDiffHelperProvider.java b/src/main/java/bindiffhelper/BinDiffHelperProvider.java index 95f5a85..485e53d 100644 --- a/src/main/java/bindiffhelper/BinDiffHelperProvider.java +++ b/src/main/java/bindiffhelper/BinDiffHelperProvider.java @@ -447,7 +447,14 @@ public void mousePressed(MouseEvent e) { String command = plugin.diffCommand.replace("$file1", path1.toString()).replace("$file2", path2.toString()); - Runtime.getRuntime().exec(command); + + if (System.getProperty("os.name").toLowerCase().contains("win")) { + String[] shellCommand = { "cmd.exe", "/c", command }; + Runtime.getRuntime().exec(shellCommand); + } else { + String[] shellCommand = { "/bin/sh", "-c", command }; + Runtime.getRuntime().exec(shellCommand); + } } catch (Exception ex) { Msg.showError(this, getComponent(), "Error", ex.getMessage()); } From 4c566d2b8fa4145f65631c59fb3331d00fed85b9 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Sat, 15 Aug 2026 12:55:07 +0100 Subject: [PATCH 08/10] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20defaultBinPath=20a?= =?UTF-8?q?nd=20defaultDiffCommand=20for=20Linux=20and=20Mac=20(untested)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/bindiffhelper/BinDiffHelperPlugin.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/bindiffhelper/BinDiffHelperPlugin.java b/src/main/java/bindiffhelper/BinDiffHelperPlugin.java index 5d482aa..2cba868 100644 --- a/src/main/java/bindiffhelper/BinDiffHelperPlugin.java +++ b/src/main/java/bindiffhelper/BinDiffHelperPlugin.java @@ -105,13 +105,16 @@ public BinDiffHelperPlugin(PluginTool tool) { } - if (System.getProperty("os.name").toLowerCase().contains("win")) { + String os = System.getProperty("os.name").toLowerCase(); + if (os.contains("win")) { defaultBinPath = "C:\\Program Files\\BinDiff\\bin\\bindiff.exe"; defaultDiffCommand = "notepad++ -multiInst -nosession -lc -pluginMessage=compare \"$file1\" \"$file2\""; - } - if (System.getProperty("os.name").toLowerCase().contains("nix")) { - // defaultBinPath = "/opt/bindiff/bin/bindiff"; - defaultDiffCommand = "x-terminal-emulator -e 'diff -u \"$file1\" \"$file2\"'"; + } else if (os.contains("mac")) { + defaultBinPath = "/Applications/BinDiff/BinDiff.app/Contents/MacOS/bin/bindiff"; + defaultDiffCommand = "opendiff \"$file1\" \"$file2\""; + } else { // Linux/BSD + defaultBinPath = "/opt/bindiff/bin/bindiff"; + defaultDiffCommand = "meld \"$file1\" \"$file2\""; } binDiffBinary = Preferences.getProperty(BDBINPROPERTY, defaultBinPath); From 5671c62e300e84e4af63e5df0fbf1994766a17ec Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Sat, 15 Aug 2026 16:09:58 +0100 Subject: [PATCH 09/10] =?UTF-8?q?=F0=9F=90=9B=20Removed=20invalid=20`getSe?= =?UTF-8?q?lectedDomainFolder()`=20null=20check=20and=20fixed=20Finish=20b?= =?UTF-8?q?utton?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/bindiffhelper/DiffWizard.java | 28 ++++++--------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/main/java/bindiffhelper/DiffWizard.java b/src/main/java/bindiffhelper/DiffWizard.java index 1826a74..9caafaa 100644 --- a/src/main/java/bindiffhelper/DiffWizard.java +++ b/src/main/java/bindiffhelper/DiffWizard.java @@ -346,17 +346,13 @@ public boolean isValid() { if (tp == null || tp.getSelectedItemCount() != 1) return false; - if (tp.getSelectedDomainFolder() != null) - return false; - var df = tp.getSelectedDomainFile(); return df != null; } @Override public boolean canFinish(DiffWizardData data) { - // TODO Auto-generated method stub - return false; + return isValid(); } @Override @@ -420,27 +416,19 @@ public void valueChanged(GTreeSelectionEvent e) { @Override public boolean isValid() { - Msg.debug(this, "selected count = " + tp.getSelectedItemCount()); - Msg.debug(this, "selected folder = " + tp.getSelectedDomainFolder()); - Msg.debug(this, "selected file = " + tp.getSelectedDomainFile()); - - return true; - // if (!cb.isSelected()) - // return true; - - // if (tp == null || tp.getSelectedItemCount() != 1) - // return false; + if (!cb.isSelected()) + return true; - // if (tp.getSelectedDomainFolder() != null) - // return false; + if (tp == null || tp.getSelectedItemCount() != 1) + return false; - // var df = tp.getSelectedDomainFile(); - // return df != null; + var df = tp.getSelectedDomainFile(); + return df != null; } @Override public boolean canFinish(DiffWizardData data) { - return true; + return isValid(); } @Override From bfde18908117857895ab0e39d75b4a096e4d2ac3 Mon Sep 17 00:00:00 2001 From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com> Date: Sat, 15 Aug 2026 16:44:08 +0100 Subject: [PATCH 10/10] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20this.cb=20is=20nul?= =?UTF-8?q?l=20error=20+=20preparing=20to=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 3 +-- src/main/java/bindiffhelper/DiffWizard.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 116eef9..d2c2525 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,7 @@ jobs: strategy: fail-fast: false matrix: - # ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest","11.4.2","11.4.1","11.4"')) }} - ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest"')) }} + ghidra: ${{ fromJSON(format('[{0}]', inputs.ghidra_version || '"latest","11.4.2","11.4.1","11.4"')) }} steps: - name: Clone Repository diff --git a/src/main/java/bindiffhelper/DiffWizard.java b/src/main/java/bindiffhelper/DiffWizard.java index 9caafaa..ef0792c 100644 --- a/src/main/java/bindiffhelper/DiffWizard.java +++ b/src/main/java/bindiffhelper/DiffWizard.java @@ -416,7 +416,7 @@ public void valueChanged(GTreeSelectionEvent e) { @Override public boolean isValid() { - if (!cb.isSelected()) + if (cb == null || !cb.isSelected()) return true; if (tp == null || tp.getSelectedItemCount() != 1)