Skip to content

Improve ghidra2cpg program loading#4014

Draft
dotCirill wants to merge 1 commit into
joernio:masterfrom
dotCirill:ghidra2cpg_gpr
Draft

Improve ghidra2cpg program loading#4014
dotCirill wants to merge 1 commit into
joernio:masterfrom
dotCirill:ghidra2cpg_gpr

Conversation

@dotCirill
Copy link
Copy Markdown

Add ability to load program from existing Ghidra project (GPR)

Add ability to load program from existing Ghidra project (GPR)
@dotCirill
Copy link
Copy Markdown
Author

#2534

The usage is something like this:

# Ghidra project "ghidra_project" in folder "/home/user/Desktop/"
# Program at the root of project is "TheBinary"
./ghidra2cpg  "gpr::/home/user/Desktop/ghidra_project::/TheBinary" -o from_gpr.cpg 
./ghidra2cpg  "/bin/ls" -o from_binary_auto_analyze.cpg 

It requires to handled project name and program name within project.

It will probably be better to create extra command-line options for ghidra2cpg.

@itsacoderepo itsacoderepo self-requested a review December 29, 2023 00:13
@dotCirill
Copy link
Copy Markdown
Author

Error handling can be better. It cannot open ghidra project when it's opened in ghidra (project in locked), but error message is meanless (could not open the project).

Also ghidra version must be the same (10.3).

@itsacoderepo
Copy link
Copy Markdown
Contributor

@dotCirill Thanks for the PR! I haven't forgotten it, just have been busy. I'll probably have to rewrite it here and there though.

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.

2 participants