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

Improve ghidra2cpg program loading #4014

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dotCirill
Copy link

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

Add ability to load program from existing Ghidra project (GPR)
@dotCirill
Copy link
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
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
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.

None yet

2 participants