mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-10-23 05:31:02 +00:00
New GhidraDev.
This commit is contained in:
parent
a004012c9a
commit
dcad9f3272
|
@ -31,8 +31,6 @@ change with future releases.</p>
|
|||
<li><a href="#ManualInstall">Manual Installation in Eclipse</a></li>
|
||||
<li><a href="#AutoInstall">Automatic Installation through Ghidra</a></li>
|
||||
</ul>
|
||||
<li><a href="#Uninstall">Uninstalling</a></li>
|
||||
<li><a href="#Upgrade">Upgrading</a></li>
|
||||
<li><a href="#Features">GhidraDev Features</a></li>
|
||||
<ul>
|
||||
<li><a href="#NewGhidraScript">New Ghidra Script</a></li>
|
||||
|
@ -48,13 +46,23 @@ change with future releases.</p>
|
|||
<li><a href="#PyDevInstall">Installing PyDev</a></li>
|
||||
<li><a href="#PyDevConfigure">Configuring PyDev</a></li>
|
||||
</ul>
|
||||
<li><a href="#Upgrade">Upgrading</a></li>
|
||||
<li><a href="#Uninstall">Uninstalling</a></li>
|
||||
<li><a href="#FAQ">Frequently Asked Questions</a></li>
|
||||
<li><a href="#AdditionalResources">Additional Resources</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="ChangeHistory"></a>Change History</h2>
|
||||
<p><u><b>2.1.0</b>:</u> Added support for Ghidra 9.1. GhidraDev 2.1.0 will be unable to create
|
||||
new Eclipse projects for versions of Ghidra earlier than 9.1.</p>
|
||||
<p><u><b>2.1.0</b>:</u>
|
||||
<ul>
|
||||
<li>
|
||||
Added support for Ghidra 9.1. GhidraDev 2.1.0 will be unable to create new Eclipse projects for
|
||||
versions of Ghidra earlier than 9.1.
|
||||
</li>
|
||||
<li>
|
||||
Prevented Ghidra projects from being created inside of a Ghidra installation directory.
|
||||
</li>
|
||||
</ul>
|
||||
<p><u><b>2.0.1</b>:</u> Fixed exception that occurred when performing certain actions on a Ghidra
|
||||
project that was imported from a previously exported Archive File.</p>
|
||||
<p><u><b>2.0.0</b>:</u>
|
||||
|
@ -96,7 +104,7 @@ that specify other projects on their build paths.</p>
|
|||
<h2><a name="MinimumRequirements"></a>Minimum Requirements</h2>
|
||||
<ul>
|
||||
<li>Eclipse 2018-12 4.10 or later</li>
|
||||
<li>Ghidra 9.0 or later</li>
|
||||
<li>Ghidra 9.1 or later</li>
|
||||
</ul>
|
||||
<p>(<a href="#top">Back to Top</a>)</p>
|
||||
|
||||
|
@ -138,39 +146,7 @@ Eclipse, it will attempt to install GhidraDev into Eclipse's <i>dropins</i> dire
|
|||
is not already installed.</p>
|
||||
<p>(<a href="#top">Back to Top</a>)</p>
|
||||
|
||||
<h2><a name="Uninstall"></a>Uninstalling</h2>
|
||||
<p>GhidraDev is uninstalled differently depending on how it was installed. If GhidraDev was
|
||||
<a href="#ManualInstall">manually installed in Eclipse</a>, it can be uninstalled as follows from
|
||||
Eclipse:</p>
|
||||
<ol>
|
||||
<li>Click <b>Help → About Eclipse</b></li>
|
||||
<ul>
|
||||
<li><i>For macOS:</i> <b>Eclipse → About Eclipse</b></li>
|
||||
</ul>
|
||||
<li>Click <b>Installation Details</b></li>
|
||||
<li>Select GhidraDev</li>
|
||||
<li>Click <b>Uninstall...</b></li>
|
||||
<li>Select GhidraDev</li>
|
||||
<li>Click <b>Finish</b></li>
|
||||
<li>Click <b>Restart Now</b></li>
|
||||
</ol>
|
||||
<p>If GhidraDev was <a href="#AutoInstall">automatically installed through Ghidra</a>, it can be
|
||||
uninstalled by simply removing the GhidraDev file from Eclipse's <i>dropins</i> directory and
|
||||
restarting Eclipse. The <i>dropins</i> directory can be found at the top level of Eclipse's
|
||||
installation directory.</p>
|
||||
<p>(<a href="#top">Back to Top</a>)</p>
|
||||
|
||||
<h2><a name="Upgrade"></a>Upgrading</h2>
|
||||
<p>GhidraDev is upgraded differently depending on how it was installed. If GhidraDev was
|
||||
<a href="#ManualInstall">manually installed in Eclipse</a>, it can be upgraded the same was it was
|
||||
<a href="#ManualInstall">installed</a>.</p>
|
||||
<p>If GhidraDev was <a href="#AutoInstall">automatically installed through Ghidra</a>, it can be
|
||||
upgraded by simply removing the GhidraDev file from Eclipse's <i>dropins</i> directory before
|
||||
following one of the two techniques described in the <a href="#Install">Installing GhidraDev</a>
|
||||
section.</p>
|
||||
<p>(<a href="#top">Back to Top</a>)</p>
|
||||
|
||||
<h2><a name="Features"></a>GhidraDev Features</h2>
|
||||
<h2><a name="Features"></a>Features</h2>
|
||||
<p>GhidraDev provides a variety of features for creating and interacting with Ghidra-related
|
||||
projects in Eclipse. GhidraDev supports creating both Ghidra script and Ghidra module projects.
|
||||
Ghidra scripts are typically designed as a single Java source file that is compiled by Ghidra at
|
||||
|
@ -178,8 +154,6 @@ runtime and run through Ghidra's Script Manager or passed to the Headless Analyz
|
|||
line for execution. Ghidra modules are intended to represent larger, more complex features such as
|
||||
Analyzers or Plugins. When Ghidra modules are ready for production, they can be exported and
|
||||
installed into Ghidra as an "extension".</p>
|
||||
<p>When GhidraDev is installed, a <i>GhidraDev</i> menu appears in Eclipse's
|
||||
title bar that provides direct access to these features:</p>
|
||||
<ul>
|
||||
<li>New</li>
|
||||
<ul>
|
||||
|
@ -317,6 +291,38 @@ reason GhidraDev was unable to find a Jython interpreter in the Ghidra installat
|
|||
to be added manually in the PyDev preferences.</p>
|
||||
<p>(<a href="#top">Back to Top</a>)</p>
|
||||
|
||||
<h2><a name="Upgrade"></a>Upgrading</h2>
|
||||
<p>GhidraDev is upgraded differently depending on how it was installed. If GhidraDev was
|
||||
<a href="#ManualInstall">manually installed in Eclipse</a>, it can be upgraded the same was it was
|
||||
<a href="#ManualInstall">installed</a>.</p>
|
||||
<p>If GhidraDev was <a href="#AutoInstall">automatically installed through Ghidra</a>, it can be
|
||||
upgraded by simply removing the GhidraDev file from Eclipse's <i>dropins</i> directory before
|
||||
following one of the two techniques described in the <a href="#Install">Installing GhidraDev</a>
|
||||
section.</p>
|
||||
<p>(<a href="#top">Back to Top</a>)</p>
|
||||
|
||||
<h2><a name="Uninstall"></a>Uninstalling</h2>
|
||||
<p>GhidraDev is uninstalled differently depending on how it was installed. If GhidraDev was
|
||||
<a href="#ManualInstall">manually installed in Eclipse</a>, it can be uninstalled as follows from
|
||||
Eclipse:</p>
|
||||
<ol>
|
||||
<li>Click <b>Help → About Eclipse</b></li>
|
||||
<ul>
|
||||
<li><i>For macOS:</i> <b>Eclipse → About Eclipse</b></li>
|
||||
</ul>
|
||||
<li>Click <b>Installation Details</b></li>
|
||||
<li>Select GhidraDev</li>
|
||||
<li>Click <b>Uninstall...</b></li>
|
||||
<li>Select GhidraDev</li>
|
||||
<li>Click <b>Finish</b></li>
|
||||
<li>Click <b>Restart Now</b></li>
|
||||
</ol>
|
||||
<p>If GhidraDev was <a href="#AutoInstall">automatically installed through Ghidra</a>, it can be
|
||||
uninstalled by simply removing the GhidraDev file from Eclipse's <i>dropins</i> directory and
|
||||
restarting Eclipse. The <i>dropins</i> directory can be found at the top level of Eclipse's
|
||||
installation directory.</p>
|
||||
<p>(<a href="#top">Back to Top</a>)</p>
|
||||
|
||||
<h2><a name="FAQ"></a>Frequently Asked Questions</h2>
|
||||
<ul>
|
||||
<li>
|
||||
|
@ -338,7 +344,7 @@ to be added manually in the PyDev preferences.</p>
|
|||
<ul>
|
||||
<li>
|
||||
<p>GhidraDev provides custom run configurations to launch Ghidra installations both in GUI
|
||||
mode and headlessly. See the <a href="#Launching"> Launching</a> section for information on
|
||||
mode and headlessly. See the <a href="#Launching">Launching</a> section for information on
|
||||
how to launch Ghidra from Eclipse.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -363,7 +369,7 @@ to be added manually in the PyDev preferences.</p>
|
|||
please see:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ghidra Scripting slide deck:</b>
|
||||
<b>Ghidra Scripting slide deck:</b>
|
||||
<i><GhidraInstallDir></i>/docs/GhidraClass/Intermediate/Scripting.html</li>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -351,7 +351,7 @@
|
|||
</launchConfigurationTypeImage>
|
||||
<launchConfigurationTypeImage
|
||||
configTypeID="GhidraHeadlessLaunchConfigurationType"
|
||||
icon="icons/GhidraIcon16.png"
|
||||
icon="icons/GhidraIcon16_bw.png"
|
||||
id="GhidraHeadlessLaunchConfigurationTypeImage">
|
||||
</launchConfigurationTypeImage>
|
||||
</extension>
|
||||
|
@ -415,7 +415,7 @@
|
|||
</shortcut>
|
||||
<shortcut
|
||||
class="ghidradev.ghidraprojectcreator.launchers.GhidraHeadlessLaunchShortcut"
|
||||
icon="icons/GhidraIcon16.png"
|
||||
icon="icons/GhidraIcon16_bw.png"
|
||||
id="GhidraHeadlessLaunchShortcut"
|
||||
label="Ghidra Headless"
|
||||
modes="run, debug">
|
||||
|
|
|
@ -76,9 +76,9 @@ implements IWorkbenchPreferencePage {
|
|||
|
||||
// Description label
|
||||
Label descriptionLabel = new Label(container, SWT.NULL);
|
||||
descriptionLabel.setText("Add or remove Ghidra installations.\n" +
|
||||
descriptionLabel.setText("Add or remove Ghidra installation directories.\n" +
|
||||
"The checked Ghidra installation is the default used when creating new projects.\n" +
|
||||
"Red entries correspond to invalid Ghidra installations.");
|
||||
"Red entries correspond to invalid Ghidra installation directories.");
|
||||
new Label(container, SWT.NONE).setText(""); // filler
|
||||
|
||||
// Ghidra installations table
|
||||
|
|
|
@ -77,6 +77,10 @@ public class CreateGhidraModuleProjectWizard extends Wizard implements INewWizar
|
|||
|
||||
@Override
|
||||
public boolean performFinish() {
|
||||
if (!validate()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
File ghidraInstallDir = ghidraInstallationPage.getGhidraInstallDir();
|
||||
String projectName = projectPage.getProjectName();
|
||||
boolean createRunConfig = projectPage.shouldCreateRunConfig();
|
||||
|
@ -148,4 +152,20 @@ public class CreateGhidraModuleProjectWizard extends Wizard implements INewWizar
|
|||
monitor.done();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the wizard pages. If they are invalid, an error popup will be displayed which
|
||||
* will indicate the problem.
|
||||
*
|
||||
* @return True if the data returned from the wizard pages are valid; otherwise, false
|
||||
*/
|
||||
private boolean validate() {
|
||||
if (projectPage.getProjectDir().getAbsolutePath().startsWith(
|
||||
ghidraInstallationPage.getGhidraInstallDir().getAbsolutePath())) {
|
||||
EclipseMessageUtils.showErrorDialog("Invalid Project Root Directory",
|
||||
"Project root directory cannot reside inside of the selected Ghidra installation directory.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.eclipse.ui.INewWizard;
|
|||
import org.eclipse.ui.IWorkbench;
|
||||
|
||||
import ghidra.GhidraApplicationLayout;
|
||||
import ghidradev.EclipseMessageUtils;
|
||||
import ghidradev.ghidraprojectcreator.utils.GhidraScriptUtils;
|
||||
import ghidradev.ghidraprojectcreator.wizards.pages.*;
|
||||
|
||||
|
@ -68,6 +69,10 @@ public class CreateGhidraScriptProjectWizard extends Wizard implements INewWizar
|
|||
|
||||
@Override
|
||||
public boolean performFinish() {
|
||||
if (!validate()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
File ghidraInstallDir = ghidraInstallationPage.getGhidraInstallDir();
|
||||
String projectName = projectPage.getProjectName();
|
||||
File projectDir = projectPage.getProjectDir();
|
||||
|
@ -134,4 +139,20 @@ public class CreateGhidraScriptProjectWizard extends Wizard implements INewWizar
|
|||
monitor.done();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the wizard pages. If they are invalid, an error popup will be displayed which
|
||||
* will indicate the problem.
|
||||
*
|
||||
* @return True if the data returned from the wizard pages are valid; otherwise, false
|
||||
*/
|
||||
private boolean validate() {
|
||||
if (projectPage.getProjectDir().getAbsolutePath().startsWith(
|
||||
ghidraInstallationPage.getGhidraInstallDir().getAbsolutePath())) {
|
||||
EclipseMessageUtils.showErrorDialog("Invalid Project Root Directory",
|
||||
"Project root directory cannot reside inside of the selected Ghidra installation directory.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ GhidraDevPlugin/build.gradle||GHIDRA||||END|
|
|||
GhidraDevPlugin/build.properties||GHIDRA||||END|
|
||||
GhidraDevPlugin/build_README.txt||GHIDRA||||END|
|
||||
GhidraDevPlugin/icons/GhidraIcon16.png||GHIDRA||||END|
|
||||
GhidraDevPlugin/icons/GhidraIcon16_bw.png||GHIDRA||||END|
|
||||
GhidraDevPlugin/icons/brick_add.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
|
||||
GhidraDevPlugin/icons/brick_go.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
|
||||
GhidraDevPlugin/icons/folder_link.png||FAMFAMFAM Icons - CC 2.5|||famfamfam silk icon set|END|
|
||||
|
|
|
@ -10,6 +10,6 @@ The data/buildLanguage.xml is used for building the contents of the data/languag
|
|||
The skel language definition has been commented-out within the skel.ldefs file so that the
|
||||
skeleton language does not show-up within Ghidra.
|
||||
|
||||
See the Sleigh language documentation (docs/languages/sleigh.htm or sleigh.pdf) for details
|
||||
on Sleigh language specification syntax.
|
||||
|
||||
See the Sleigh language documentation (docs/languages/index.html) for details Sleigh language
|
||||
specification syntax.
|
||||
|
Loading…
Reference in New Issue
Block a user