-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsolve_4.java
37 lines (28 loc) · 1 KB
/
solve_4.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//get called functions list
//@author
//@category GhidraGolf
//@keybinding
//@menupath
//@toolbar
import java.util.Iterator;
import java.util.Set;
import ghidra.app.script.GhidraScript;
import ghidra.program.model.listing.Function;
import ghidra.program.model.listing.FunctionIterator;
public class solve_4 extends GhidraScript {
@Override
public void run() throws Exception {
FunctionIterator functions = currentProgram.getFunctionManager().getFunctions(true);
while (functions.hasNext()) {
Function func = functions.next();
if (func.getName().equals("secondMain")) {
Set<Function> calledFunctions = func.getCalledFunctions(null);
Iterator<Function> funcs = calledFunctions.iterator();
while(funcs.hasNext()) {
Function called = funcs.next();
println("Called function: " + called.getName());
}
}
}
}
}