hubertf

ghidra - hfExportEverythingToSingleFile.java

Feb 7th, 2026
200
0
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.62 KB | None | 0 0
  1. // @author hubertf / Windsurf
  2. // @category Export
  3.  
  4. import ghidra.app.decompiler.*;
  5. import ghidra.program.model.listing.*;
  6. import ghidra.util.task.*;
  7. import java.io.*;
  8. import ghidra.app.script.GhidraScript;
  9. import ghidra.util.exception.CancelledException;
  10.  
  11. public class hfExportEverythingToSingleFile extends GhidraScript {
  12.    
  13.     public void run() {
  14.         try {
  15.             // Output file
  16.             File output = askFile("Export decompiled functions", "Save");
  17.            
  18.             DecompInterface decompiler = new DecompInterface();
  19.             decompiler.openProgram(currentProgram);
  20.            
  21.             FileWriter writer = new FileWriter(output);
  22.            
  23.             // Get all functions
  24.             FunctionIterator functions = currentProgram.getFunctionManager().getFunctions(true);
  25.            
  26.             while (functions.hasNext()) {
  27.                 Function func = functions.next();
  28.                 if (func.isExternal()) continue;
  29.                
  30.                 // Get decompiled code
  31.                 DecompileResults result = decompiler.decompileFunction(func, 30, getMonitor());
  32.                 String code = result.getDecompiledFunction().getC();
  33.                
  34.                 // Write to file
  35.                 writer.write("=== " + func.getName() + "-" + func.getEntryPoint().toString() + " ===\n\n");
  36.                 writer.write(code);
  37.                 writer.write("\n\n");
  38.             }
  39.            
  40.             writer.close();
  41.             decompiler.dispose();
  42.            
  43.         } catch (Exception e) {
  44.             println("Error: " + e.getMessage());
  45.         }
  46.     }
  47. }
  48.  
Tags: Java ghidra
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Adhadud
    14 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • User was banned
Add Comment
Please, Sign In to add comment