diff --git a/ghidra_scripts/FnidUtils.java b/ghidra_scripts/FnidUtils.java index 3f8ae45..991a3f4 100644 --- a/ghidra_scripts/FnidUtils.java +++ b/ghidra_scripts/FnidUtils.java @@ -1,14 +1,9 @@ import ghidra.app.script.GhidraScript; -import ghidra.framework.Application; -import ghidra.framework.plugintool.dialog.ExtensionDetails; -import ghidra.framework.plugintool.dialog.ExtensionUtils; import org.apache.commons.io.FileUtils; import java.io.File; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.stream.Collectors; class FnidUtils { @@ -42,7 +37,7 @@ private static void loadFnids(GhidraScript script) throws Exception { file = script.askFile("Locate nids.txt", "Load"); } - List list = FileUtils.readLines(file); + List list = FileUtils.readLines(file,"ascii"); for (String s : list) { final String[] split = s.split(" "); fnids.put(split[0], split[1]); diff --git a/ghidra_scripts/Ps3ElfUtils.java b/ghidra_scripts/Ps3ElfUtils.java index 4c2ce3e..6d3b26c 100644 --- a/ghidra_scripts/Ps3ElfUtils.java +++ b/ghidra_scripts/Ps3ElfUtils.java @@ -1,7 +1,6 @@ import ghidra.app.script.GhidraScript; -import ghidra.framework.plugintool.dialog.ExtensionDetails; -import ghidra.framework.plugintool.dialog.ExtensionException; -import ghidra.framework.plugintool.dialog.ExtensionUtils; +import ghidra.framework.project.extensions.ExtensionDetails; +import ghidra.framework.project.extensions.ExtensionUtils; import ghidra.program.model.address.Address; import ghidra.program.model.data.ArrayDataType; import ghidra.program.model.data.DataType; @@ -10,7 +9,6 @@ import ghidra.program.model.listing.Program; import ghidra.program.model.mem.MemoryBlock; -import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -160,13 +158,13 @@ public void applyDataForce(DataType data, String name, Address address) throws E public static String getExtensionInstallDataPath(String extensionName) { final List ps3GhidraScripts; try { - ps3GhidraScripts = ExtensionUtils.getInstalledExtensions(false) + ps3GhidraScripts = ExtensionUtils.getInstalledExtensions() .stream() .filter(extension -> extension.getName().equals(extensionName)) .collect(Collectors.toList()); final ExtensionDetails extensionDetails = ps3GhidraScripts.get(0); return extensionDetails.getInstallPath(); - } catch (ExtensionException e) { + } catch (Exception e) { e.printStackTrace(); }