Ghidra: ScriptMgrPlugin: Auto recompilation

Created on 18 Mar 2020  路  6Comments  路  Source: NationalSecurityAgency/ghidra

Is your feature request related to a problem? Please describe.
1.) Create MyHelloWorldScript.java and MyHelloWorldClass.java
The script uses the class in some way
2.) run the script
3.) modify MyHelloWorldClass
4.) rerun MyHelloWorldScript. since the .class files are already extant and the base script has not been changed, ghidra does not recompile.

Describe the solution you'd like
ScriptManagerPlugin should automatically recompile when necessary, or provide an easy way to force recompilation

Describe alternatives you've considered
I have a bash script to clear my /bin/ folder

Most helpful comment

@ryanmkurtz You sound like just the person for the job! :grin:

All 6 comments

The automatic compilation of dependencies is quite a difficult problem to fix.
I think it would make sense to have an action to allow users to Rebuild all scripts.

Even if there was an action to rebuild all scripts, how would this this non-script dependency file get recompiled?

@ryanmkurtz Presumably this file lives in the scripts directory. I imagine an action that would clear all class files and build any Java file found in all scripts dirs.

You might be able to use the jdeps tool that comes with java. This API might help.

@ryanmkurtz You sound like just the person for the job! :grin:

We have updated how scripting is managed in the master branch. That should fix this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gemini00 picture gemini00  路  3Comments

rrivera1849 picture rrivera1849  路  3Comments

CalcProgrammer1 picture CalcProgrammer1  路  3Comments

astrelsky picture astrelsky  路  3Comments

Kerilk picture Kerilk  路  3Comments