Package ghidra.app.util.bin.format.pe
Class ResourceDataDirectory
java.lang.Object
ghidra.app.util.bin.format.pe.DataDirectory
ghidra.app.util.bin.format.pe.ResourceDataDirectory
- All Implemented Interfaces:
PeMarkupable
Points to the root resource directory.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
A flag indicating that a resources is a directory.static final int
A flag indicating that a resources is a string.static final int
The size of a resource directory, in bytes.static final int
The size of a resource directory entry, in bytes.static final String[]
A lookup table to obtain a string name for a resource type.static final byte
Accelerator table.static final byte
Animated cursor resource.static final byte
Animated icon resource.static final byte
Bitmap resource.static final byte
/** Hardware-dependent cursor resource.static final byte
Dialog box.static final byte
static final byte
Font resource.static final byte
Font directory resource.static final byte
Hardware-independent cursor resource.static final byte
Hardware-independent icon resource.static final byte
HTML resource.static final byte
Hardware-dependent icon resource.static final byte
Manifest resourcestatic final byte
Menu resource.static final byte
Message-table entry.static final byte
Not defined in documentation but PNGs and WAVs are both this typestatic final byte
Plug and Play resource.static final byte
Application-defined resource (raw data).static final byte
String-table entry.static final byte
Version resource.static final byte
VXD resource.Fields inherited from class ghidra.app.util.bin.format.pe.DataDirectory
hasParsed, IMAGE_SIZEOF_IMAGE_DIRECTORY_ENTRY, ntHeader, reader, size, TITLE, virtualAddress
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Gets a program property name to represent PE resource property with the given key namevoid
markup
(Program program, boolean isBinary, TaskMonitor monitor, MessageLog log, NTHeader nt) Marks up a PE structure.boolean
parse()
Parses this data directory.toString()
Methods inherited from class ghidra.app.util.bin.format.pe.DataDirectory
createDirectoryBookmark, createFragment, createTerminatedString, getPointer, getSize, getVirtualAddress, hasParsedCorrectly, processDataDirectory, setBookmark, setEolComment, setPlateComment, setPreComment, setSize, setVirtualAddress, va, validateSize, writeBytes
-
Field Details
-
IMAGE_SIZEOF_RESOURCE_DIRECTORY_ENTRY
public static final int IMAGE_SIZEOF_RESOURCE_DIRECTORY_ENTRYThe size of a resource directory entry, in bytes.- See Also:
-
IMAGE_SIZEOF_RESOURCE_DIRECTORY
public static final int IMAGE_SIZEOF_RESOURCE_DIRECTORYThe size of a resource directory, in bytes.- See Also:
-
IMAGE_RESOURCE_NAME_IS_STRING
public static final int IMAGE_RESOURCE_NAME_IS_STRINGA flag indicating that a resources is a string.- See Also:
-
IMAGE_RESOURCE_DATA_IS_DIRECTORY
public static final int IMAGE_RESOURCE_DATA_IS_DIRECTORYA flag indicating that a resources is a directory.- See Also:
-
PREDEFINED_RESOURCE_NAMES
A lookup table to obtain a string name for a resource type. -
RT_NOTDEFINED
public static final byte RT_NOTDEFINEDNot defined in documentation but PNGs and WAVs are both this type- See Also:
-
RT_CURSOR
public static final byte RT_CURSOR/** Hardware-dependent cursor resource.- See Also:
-
RT_BITMAP
public static final byte RT_BITMAPBitmap resource.- See Also:
-
RT_ICON
public static final byte RT_ICONHardware-dependent icon resource.- See Also:
-
RT_MENU
public static final byte RT_MENUMenu resource.- See Also:
-
RT_DIALOG
public static final byte RT_DIALOGDialog box.- See Also:
-
RT_STRING
public static final byte RT_STRINGString-table entry.- See Also:
-
RT_FONTDIR
public static final byte RT_FONTDIRFont directory resource.- See Also:
-
RT_FONT
public static final byte RT_FONTFont resource.- See Also:
-
RT_ACCELERATOR
public static final byte RT_ACCELERATORAccelerator table.- See Also:
-
RT_RCDATA
public static final byte RT_RCDATAApplication-defined resource (raw data).- See Also:
-
RT_MESSAGETABLE
public static final byte RT_MESSAGETABLEMessage-table entry.- See Also:
-
RT_GROUP_CURSOR
public static final byte RT_GROUP_CURSORHardware-independent cursor resource.- See Also:
-
RT_GROUP_ICON
public static final byte RT_GROUP_ICONHardware-independent icon resource.- See Also:
-
RT_VERSION
public static final byte RT_VERSIONVersion resource.- See Also:
-
RT_DLGINCLUDE
public static final byte RT_DLGINCLUDE- See Also:
-
RT_PLUGPLAY
public static final byte RT_PLUGPLAYPlug and Play resource.- See Also:
-
RT_VXD
public static final byte RT_VXDVXD resource.- See Also:
-
RT_ANICURSOR
public static final byte RT_ANICURSORAnimated cursor resource.- See Also:
-
RT_ANIICON
public static final byte RT_ANIICONAnimated icon resource.- See Also:
-
RT_HTML
public static final byte RT_HTMLHTML resource.- See Also:
-
RT_MANIFEST
public static final byte RT_MANIFESTManifest resource- See Also:
-
directoryMap
-
-
Method Details
-
getPeResourceProperty
Gets a program property name to represent PE resource property with the given key name- Parameters:
key
- The key name- Returns:
- A program property name to represent PE resource property with the given key name
-
getRootDirectory
-
getDirectoryName
- Specified by:
getDirectoryName
in classDataDirectory
-
markup
public void markup(Program program, boolean isBinary, TaskMonitor monitor, MessageLog log, NTHeader nt) throws DuplicateNameException, CodeUnitInsertionException, IOException Description copied from interface:PeMarkupable
Marks up a PE structure.- Parameters:
program
- The program to markup.isBinary
- True if the program is binary; otherwise, false.monitor
- The monitor.log
- The log.nt
- The PE's NT Header structure.- Throws:
DuplicateNameException
CodeUnitInsertionException
IOException
-
parse
Description copied from class:DataDirectory
Parses this data directory.- Specified by:
parse
in classDataDirectory
- Returns:
- True if parsing completed successfully; otherwise, false.
- Throws:
IOException
- If there was an IO problem while parsing.
-
getResources
-
toString
- Overrides:
toString
in classDataDirectory
- See Also:
-