mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-1962 Prevent RecoverClassFromRTTIScript from running more than once
on same program.
This commit is contained in:
parent
7a9544442b
commit
5d8574f9f4
5 changed files with 126 additions and 124 deletions
|
@ -326,6 +326,12 @@ public class RecoverClassesFromRTTIScript extends GhidraScript {
|
|||
return ("There is no open program");
|
||||
}
|
||||
|
||||
CategoryPath path =
|
||||
new CategoryPath(CategoryPath.ROOT, RecoveredClassHelper.DTM_CLASS_DATA_FOLDER_NAME);
|
||||
if (currentProgram.getDataTypeManager().containsCategory(path)) {
|
||||
return ("This script has already been run on this program");
|
||||
}
|
||||
|
||||
if (!checkGhidraVersion()) {
|
||||
return ("This script only works with Ghidra version 9.2, 9.2.2 and later. It does not work on Ghidra 9.2.1 or on versions prior to 9.2");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue