Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 29th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //TODO write a description for this script
  2. //@author
  3. //@category _NEW_
  4. //@keybinding
  5. //@menupath
  6. //@toolbar
  7.  
  8. import ghidra.app.script.GhidraScript;
  9. import ghidra.program.model.util.*;
  10. import ghidra.program.model.reloc.*;
  11. import ghidra.program.model.data.*;
  12. import ghidra.program.model.block.*;
  13. import ghidra.program.model.symbol.*;
  14. import ghidra.program.model.scalar.*;
  15. import ghidra.program.model.mem.*;
  16. import ghidra.program.model.listing.*;
  17. import ghidra.program.model.lang.*;
  18. import ghidra.program.model.pcode.*;
  19. import ghidra.program.model.address.*;
  20.  
  21. public class CleanupAddresses extends GhidraScript {
  22.  
  23.     public void run() throws Exception {
  24.         SymbolTable st = state.getCurrentProgram().getSymbolTable();
  25.         java.util.List<Symbol> sym = st.getGlobalSymbols("start");
  26.         Address start = sym.get(0).getAddress();
  27.         println(String.format("Starting at %s", start.toString()));
  28.  
  29.         ReferenceManager refMgr = currentProgram.getReferenceManager();
  30.         ReferenceIterator iter = refMgr.getReferenceIterator(start);
  31.         while (iter.hasNext()) {
  32.             Reference ref = iter.next();
  33.             println(String.format("Ref from %s to %s", ref.getFromAddress().toString(), ref.getToAddress().toString()));
  34.         }
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top