mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
GP-2509 GP-2644 Improved Ghidra URL support. Added support for Ghidra
URL linked files and folders within project.
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
// NOTE: Script will only process unversioned and checked-out files.
|
||||
//@category Examples
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.app.script.GhidraState;
|
||||
import ghidra.framework.model.*;
|
||||
@@ -25,8 +27,6 @@ import ghidra.program.model.listing.Program;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.exception.VersionException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class CallAnotherScriptForAllPrograms extends GhidraScript {
|
||||
|
||||
// The script referenced in the following line should be replaced with the script to be called
|
||||
@@ -59,6 +59,10 @@ public class CallAnotherScriptForAllPrograms extends GhidraScript {
|
||||
}
|
||||
|
||||
private void processDomainFile(DomainFile domainFile) throws CancelledException, IOException {
|
||||
// Do not follow folder-links or consider program links. Using content type
|
||||
// to filter is best way to control this. If program links should be considered
|
||||
// "Program.class.isAssignableFrom(domainFile.getDomainObjectClass())"
|
||||
// should be used.
|
||||
if (!ProgramContentHandler.PROGRAM_CONTENT_TYPE.equals(domainFile.getContentType())) {
|
||||
return; // skip non-Program files
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user