Scripting
Scripting
Scripting
Scripting
Scripting
Scripting




  • Sample script template in Java
    • Must fill in the TODO areas
    • Create a description
    • Fill in the run() method
Scripting
Scripting
Scripting

Scripting
Scripting

Scripting


Scripting

Scripting


Scripting

Scripting


Scripting
Scripting

Scripting

  • Ghidra Program API
    • Object-oriented
    • Very deep
    • Can change from version to version

  • Program
    • Listing
      • Instruction
      • Data
      • Function
      • Comments
      • ...
    • Memory
      • Memory Blocks
      • Bytes
    • Symbol Table
      • Symbol
    • Reference Manager
      • Reference
Scripting

Scripting

Scripting

Scripting

Scripting


while (!monitor.isCancelled()) {
  ...
}
      

  for (int i = 0; i < max(); ++i) {
    if (monitor.isCancelled()) {
      break;
    }
  }
    
    inside loop:

    monitor.checkCancelled();

    
Scripting

Scripting

Scripting

Scripting

Scripting

  • Editing in Eclipse
    • Package Explorer
      • Projects
      • Source Folders
        • Packages
      • Libraries
      • Non-source folders
        • Resources

Scripting

  • Editing in Eclipse
    • Outline
      • Methods
        • Public, Protected, Private, Default
      • Fields
        • Instance, Static
      • Import Statements

Scripting

  • Editing in Eclipse
    • Hierarchy
      • Super-class
      • Entire sub-class hierarchy

Scripting
Scripting

Scripting

Scripting
Scripting
Scripting
Scripting
  • Eclipse Debug window allows you to control the process and threads
    • Execution Control Commands
      • Resume
      • Suspend
      • Terminate
      • Step Into
      • Step Over
      • Step Return
Scripting
Scripting
Scripting
Scripting


Scripting

Scripting


Scripting

Scripting

Scripting

Scripting

Scripting