Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghidra 11.2 issues #30

Merged
merged 13 commits into from
Oct 7, 2024
Merged

Ghidra 11.2 issues #30

merged 13 commits into from
Oct 7, 2024

Conversation

tmr232
Copy link
Member

@tmr232 tmr232 commented Oct 4, 2024

Ghidra 11.2 moved some things around:

  • The site-packages directory was moved
  • Python was renamed to Jython in all important places

This means that we need to adjust both our setup (installing vendored packages) and our code (importing the PythonScript class).

To simplify future updates, vendored package installation now uses a Python script to find the sitepackages and copy the packages over.

@tmr232 tmr232 changed the title Ghidra 11.2 changed the Jython path again, so we update to match. Ghidra 11.2 issues Oct 4, 2024
@tmr232
Copy link
Member Author

tmr232 commented Oct 4, 2024

@fmagin @clearbluejar can you take a look at the resulting artifacts and see that they make sense?
I've not used Ghidra in ages, and I don't wanna release something broken...

@fmagin
Copy link
Contributor

fmagin commented Oct 4, 2024

I think the crucial change here is that they merged https://github.com/dod-cyber-crime-center/pyhidra into the core ghidra release, so it might be possible to migrate this entire project to Python 3?

@tmr232
Copy link
Member Author

tmr232 commented Oct 4, 2024

@fmagin Oh, that's cool. Do you wanna work on that? I find it unlikely that I'll get to that anytime soon...

@fmagin
Copy link
Contributor

fmagin commented Oct 4, 2024

Can't guarantee anything, but I'll see if I can justify spending some time on it

@fmagin
Copy link
Contributor

fmagin commented Oct 7, 2024

Apparently the Python 3 support is planned for 11.3, but the preparation for it might have broken some minor things already?

@tmr232
Copy link
Member Author

tmr232 commented Oct 7, 2024

@fmagin that seems to be the case.
If the stubs generated by this PR are ok (can you check?) I think we can merge this now.
Then, when there's a version that allows running Python3 directly from the headless analyzer, we can port the code and simplify it significantly.

java-version: '11'

distribution: "temurin"
java-version: "11"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought Ghidra 11.2 needs JDK 21 now? I'm surprised this still works

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Let's see how this works now.

java-version: '11'

distribution: "temurin"
java-version: "11"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@fmagin
Copy link
Contributor

fmagin commented Oct 7, 2024

If the stubs generated by this PR are ok (can you check?)

I have barely ever used Ghidra with Python, so I'm not sure how much I can check there, actually. I'd guess they are fine?

@tmr232
Copy link
Member Author

tmr232 commented Oct 7, 2024

I think we'll just assume they are fine, and fix anything that comes up if anyone reports a bug...

We'll probably need to do more testing once we get the Python3 stuff in.

Also - kinda funny that neither of us actually uses this...

So, I think I'll go ahead and merge this?

@fmagin
Copy link
Contributor

fmagin commented Oct 7, 2024

Also - kinda funny that neither of us actually uses this...

I know people actually using it for work, but I think they aren't on Ghidra 11.2 yet. But I'd expect an increase in popularity once Ghidra supports Python3 out of the box. Would be interesting if a modern IDE actually detects the existence of a -stub package on PyPI and automatically suggests installing it?

So, I think I'll go ahead and merge this?

Sounds good

@tmr232 tmr232 merged commit 708ca92 into master Oct 7, 2024
2 checks passed
@clearbluejar
Copy link
Contributor

many of use still use it! thanks for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants