mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -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:
@@ -16,6 +16,9 @@
|
||||
//Opens all programs under a chosen domain folder, scans them for functions
|
||||
//that match a user supplied name, and prints info about the match.
|
||||
//@category FunctionID
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.feature.fid.service.FidService;
|
||||
import ghidra.framework.model.DomainFile;
|
||||
@@ -26,9 +29,6 @@ import ghidra.util.Msg;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.exception.VersionException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FindNamedFunction extends GhidraScript {
|
||||
|
||||
FidService service;
|
||||
@@ -85,6 +85,10 @@ public class FindNamedFunction extends GhidraScript {
|
||||
if (monitor.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
// 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 (domainFile.getContentType().equals(ProgramContentHandler.PROGRAM_CONTENT_TYPE)) {
|
||||
programs.add(domainFile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user