Class ProgramExaminer


  • public class ProgramExaminer
    extends java.lang.Object
    Wrapper for Ghidra code to find images (and maybe other artifacts later) in a program
    • Constructor Summary

      Constructors 
      Constructor Description
      ProgramExaminer​(byte[] bytes)
      Constructs a new ProgramExaminer.
      ProgramExaminer​(java.io.File file)
      Constructs a new ProgramExaminer.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Releases file/database resources.
      java.util.List<byte[]> getImages()
      Returns a list of byte[] containing image data.
      java.lang.String getType()
      Returns a string indication the program format.
      static void initializeGhidra()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProgramExaminer

        public ProgramExaminer​(byte[] bytes)
                        throws GhidraException
        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

        public ProgramExaminer​(java.io.File file)
                        throws GhidraException
        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 Detail

      • getType

        public java.lang.String getType()
        Returns a string indication the program format. i.e. PE, elf, raw
      • dispose

        public void dispose()
        Releases file/database resources.
      • getImages

        public java.util.List<byte[]> getImages()
        Returns a list of byte[] containing image data. The bytes will be either a png, a gif, or a bitmap