Package ghidra.program.examiner
Class ProgramExaminer
java.lang.Object
ghidra.program.examiner.ProgramExaminer
Wrapper for Ghidra code to find images (and maybe other artifacts later) in a program
NOTE: This is intended for end-user use and has no direct references within Ghidra.
Typical use of the class entails generating a ghidra.jar (see BuildGhidraJarScript.java)
and referencing this class from end-user code.
-
Constructor Summary
ConstructorDescriptionProgramExaminer
(byte[] bytes) Constructs a new ProgramExaminer.ProgramExaminer
(File file) Constructs a new ProgramExaminer. -
Method Summary
-
Constructor Details
-
ProgramExaminer
Constructs a new ProgramExaminer.- Parameters:
bytes
- the bytes of the potential program to be examined.- Throws:
GhidraException
- if any exception occurs while processing the bytes.
-
ProgramExaminer
Constructs a new ProgramExaminer.- Parameters:
file
- file object containing the bytes to be examined.- Throws:
GhidraException
- if any exception occurs while processing the bytes.
-
-
Method Details
-
getType
Returns a string indication the program format. i.e. PE, elf, raw -
initializeGhidra
- Throws:
GhidraException
-
dispose
public void dispose()Releases file/database resources. -
getImages
Returns a list of byte[] containing image data. The bytes will be either a png, a gif, or a bitmap
-