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

Help wanted about IDEA Project #38

Open
Yatogaii opened this issue May 2, 2024 · 10 comments
Open

Help wanted about IDEA Project #38

Yatogaii opened this issue May 2, 2024 · 10 comments

Comments

@Yatogaii
Copy link

Yatogaii commented May 2, 2024

I'm a newbie to java development, now I'm trying to develop a ghidra script with IDEA. Thank you in advance for your development of this plug-in🥰.

Now that I have done "Add a Ghidra Facets to Project Structure" and "Add a new Ghidra Launcher in Configurations, " I can get a fully completion suggestion and script result in Ghidra Script Manager.

But when I run my script in IDEA, it first show can't find a class about Log4j , after I manually add the log4j-core and log4j-api to my project, I have rerun the script in IDEA's Ghidra Launcher, it just stuck on (LoggingInitialization), like this:
image

I have no idea what to do to solve this, sorry for my pool English, any suggestion would be aprreciate😘😘😘😘😘

@Yatogaii
Copy link
Author

Yatogaii commented May 2, 2024

PS: I'm running Ghidra on Fedora39 with KDE Plasma

@garyttierney
Copy link
Owner

Hey,

It shouldn't be necessary to add the log4j dependencies to your own project, the plugin should be handling that for you. Could you share a bit more information about your project (i.e. do you have a standalone Java project containing scripts, or are you opening your ghidra_scripts folder)?

Though one thing to mention is that intellij-ghidra currently can't run scripts directly. What it can do instead is launch Ghidra with a debugger attached and allow you to set breakpoints on your scripts.

@Yatogaii
Copy link
Author

Yatogaii commented May 2, 2024

I'm sorry for my lack of description!

I have IDEA Ultimate 2023.2.6 and intellj-idea 0.5.0 installed.

  • Step to produce:
  1. Create a new project in idea, like this:
    image
  2. Using File->Project Structure->Facets add ghidra to current project and choose a right Ghidra Install Location.
  3. Add a Ghidra Launcher in Run/Debug Configuration Window.
  4. Write some code with GhidraScript and Run it with Ghidra Launcher
  5. Got ClassNotFound Error!
    image

Is there anything I have missed? Thank you for being so helpful!

@garyttierney
Copy link
Owner

Nothing wrong with your approach, that should be working. Looks like potentially a bug in the plugin. I'll reproduce your steps and get back to you.

@lcian
Copy link

lcian commented May 27, 2024

Hi, I have the same problem. I am using IntelliJ 2024.1.1 Ultimate Edition. I have tested it with OpenJDK 17 but also other JDKs. @Yatogaii have you found any workaround?

@Yatogaii
Copy link
Author

@lcian Sorry, I haven't found a solution either🥹🥹🥹.

@deniska-iriska
Copy link

deniska-iriska commented Jun 10, 2024

The same behaviour

  • Ghidra 11.0.3 & 10.3.2
  • OpenJDK 21
  • Windows 10

@deniska-iriska
Copy link

deniska-iriska commented Jun 10, 2024

Looks like plugin unproperly import third-party libs.
As example log4j from "Ghidra/Framework/Generic/lib/log4j-core-x.y.z.jar" or flatlaf from "Ghidra/Framework/Gui/lib/flatlaf-x.y.z.jar".
If I manually import flatlaf, then 2 more lines of logs appear in the console

@cong0221
Copy link

cong0221 commented Sep 5, 2024

@deniska-iriska I encountered the same situation. Are there any solutions available at the moment?

@deniska-iriska
Copy link

@cong0221, nope.
I just started using IDA Pro

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

No branches or pull requests

5 participants