0

I'm using ghidra to Reverse Engineer an EXE file. I want to extract the imports and exports from the symbol tree. I've Written this script but it doesn't return anything.

sm = currentProgram.getSymbolTable()
symb = sm.getSymbolIterator("Imports")
for s in symb:
     print(s)

but when i use this script to get all the functions from the symbol tree, it works

symb = sm.getSymbolIterator()
for s in symb:
     print(s)

What am I missing?

1 Answers1

0

Does solves your issue?

sm = currentProgram.getSymbolTable()
symb = sm.getExternalSymbols()
for s in symb:
     print(s)
macro_controller
  • 1,469
  • 1
  • 14
  • 32