Skip to content

Add Ghidra apply-back support#120

Open
DarkaMaul wants to merge 5 commits into
mainfrom
dm/ghidra-apply
Open

Add Ghidra apply-back support#120
DarkaMaul wants to merge 5 commits into
mainfrom
dm/ghidra-apply

Conversation

@DarkaMaul

Copy link
Copy Markdown
Collaborator

Tested locally - and it works!

Comment thread .github/workflows/ghidra.yml Fixed

@RobinDavid RobinDavid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this awesome PR !
I have not tested it, but it looks great !

(Once my two small points are addressed we can merge !)

help="IDA .i64 database or Ghidra .gpr/project directory to modify",
)
@click.option(
"--ghidra-path",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we make it --disassembler-path so that we could also provide the path to IDA ? (if its not in the path nor in env vars). That could also apply later for Binary Ninja.

I would suggest to also change the main command to have this parameter rather than --ghidra-path.

def commit(
self,
database_file: "Path|str|None" = None,
ida_path: "Path|str|None" = None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe we could merge ida_path and ghidra_path as a single parameter --disassembler_path.

One issue it raises is that we can't distinguish if we want to commit to IDA or Ghidra.
Thanksfully we store the Disassembler backend as metadata of the Quokka file so we can reuse that information to determine which disassembler to commit to given that we should commit ONLY on the same disassembler than the one used to generate the quokka file ! (disassemblers have too different ways to represent programs).

def regenerate(
self,
database_file: "Path|str|None" = None,
ida_path: "Path|str|None" = None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same here.

Comment thread docs/decompilation.md

=== "Ghidra headless"

Pass `--decompiled=true` to the Quokka headless script:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice you added the decompiled code support ?

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