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

Updating command docs #262

Open
wants to merge 1 commit into
base: dpdicken/ghidra
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions scripts/ghidra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ Ghidra has been downloaded onto carp into /usr/local/ghidra/ghidra_9.1.2_PUBLIC/

You can use the following command to run ghidra with one of these scripts:

`/usr/local/ghidra/ghidra_9.1.2_PUBLIC/support/analyzeHeadless <WORKING DIR>/projects <PROJECT NAME> -import <BINARY NAME> -scriptPath <WORKING DIR> -postScript <SCRIPT NAME> -deleteProject`
`/usr/local/ghidra/ghidra_9.1.2_PUBLIC/support/analyzeHeadless <WORKING_DIR>/projects <PROJECT_NAME> -import <BINARY_NAME> -scriptPath <WORKING_DIR> -postScript <SCRIPT_NAME> -deleteProject`

For the command, substitute:

<WORKING DIR> = The directory you are working within. This directory can be located anywhere.
<PROJECT_NAME> = This is a name for ghidra to create a project under. The name does not matter too much as we have the `-deleteProject` flag is provided to delete it after execution, but it does have to be provided. A value such as NewProject works fine.
<BINARY NAME> = This is the path to the binary you want ghidra to evaluate.
<SCRIPT NAME> = This is the path to the script to run, either `DumpRefined.py` or `DumpUnrefined.py`. When `DumpRefined.py` is run, it puts its results into a file called `<BINARY NAME>-refined-PCode.txt`. Likewise, `DumpUnrefined.py` puts it into a file called `<BINARY NAME>-unrefined-PCode.txt`.
- `<WORKING_DIR>` = The directory you are working within. This directory can be located anywhere.
- `<PROJECT_NAME>` = This is a name for ghidra to create a project under. The name does not matter too much as we have the `-deleteProject` flag is provided to delete it after execution, but it does have to be provided. A value such as NewProject works fine.
- `<BINARY_NAME>` = This is the path to the binary you want ghidra to evaluate.
- `<WORKING_DIR>` = Path to directory containing script
- `<SCRIPT_NAME>` = This is the path to the script to run, either `DumpRefined.py` or `DumpUnrefined.py`. When `DumpRefined.py` is run, it puts its results into a file called `<BINARY NAME>-refined-PCode.txt`. Likewise, `DumpUnrefined.py` puts it into a file called `<BINARY NAME>-unrefined-PCode.txt`.