Package rubydragon.groovy
Class GroovyScript
java.lang.Object
ghidra.program.flatapi.FlatProgramAPI
ghidra.app.script.GhidraScript
rubydragon.groovy.GroovyScript
public class GroovyScript
extends ghidra.app.script.GhidraScript
A Ghidra script written in Groovy.
-
Nested Class Summary
Nested classes/interfaces inherited from class ghidra.app.script.GhidraScript
ghidra.app.script.GhidraScript.AnalysisMode
-
Field Summary
Fields inherited from class ghidra.program.flatapi.FlatProgramAPI
MAX_REFERENCES_TO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe category of these scripts.void
run()
Executes this script.void
Runs a script by name with the given arguments using the given state, within this script.Methods inherited from class ghidra.app.script.GhidraScript
analyzeAll, analyzeChanges, askAddress, askAddress, askBytes, askChoice, askChoices, askChoices, askDirectory, askDomainFile, askDouble, askFile, askInt, askLanguage, askLong, askPassword, askProgram, askProjectFolder, askString, askString, askYesNo, cleanup, clearBackgroundColor, clearBackgroundColor, closeProgram, createHighlight, createProgram, createProgram, createProgram, createSelection, createTableChooserDialog, createTableChooserDialog, execute, getAnalysisOptionDefaultValue, getAnalysisOptionDefaultValues, getAnalysisOptionDescription, getAnalysisOptionDescriptions, getCodeUnitFormat, getCurrentAnalysisOptionsAndValues, getDefaultLanguage, getDemangled, getEOLCommentAsRendered, getGhidraVersion, getLanguage, getPlateCommentAsRendered, getPostCommentAsRendered, getPreCommentAsRendered, getProjectRootFolder, getRepeatableCommentAsRendered, getReusePreviousChoices, getScriptAnalysisMode, getScriptArgs, getScriptName, getSourceFile, getState, getUserName, goTo, goTo, goTo, importFile, importFileAsBinary, isAnalysisOptionDefaultValue, isRunningHeadless, openProgram, parseAddress, parseBoolean, parseBytes, parseChoice, parseChoices, parseChoices, parseDirectory, parseDomainFile, parseDouble, parseFile, parseInt, parseLanguageCompileSpecPair, parseLong, parseProjectFolder, popup, print, printerr, printf, println, println, removeHighlight, removeSelection, resetAllAnalysisOptions, resetAnalysisOption, resetAnalysisOptions, runCommand, runCommand, runScript, runScript, runScript, runScriptPreserveMyState, set, setAnalysisOption, setAnalysisOptions, setAnonymousServerCredentials, setBackgroundColor, setBackgroundColor, setCurrentHighlight, setCurrentLocation, setCurrentSelection, setPotentialPropertiesFileLocations, setPropertiesFile, setPropertiesFileLocation, setReusePreviousChoices, setScriptArgs, setServerCredentials, setSourceFile, setToolStatusMessage, show, show, toHexString, toHexString, toHexString, toHexString, toString
Methods inherited from class ghidra.program.flatapi.FlatProgramAPI
addEntryPoint, addInstructionXref, analyze, clearListing, clearListing, clearListing, clearListing, createAddressSet, createAsciiString, createAsciiString, createBookmark, createByte, createChar, createClass, createData, createDouble, createDWord, createDwords, createEquate, createEquate, createExternalReference, createExternalReference, createExternalReference, createFloat, createFragment, createFragment, createFragment, createFragment, createFunction, createLabel, createLabel, createLabel, createMemoryBlock, createMemoryBlock, createMemoryReference, createMemoryReference, createNamespace, createQWord, createStackReference, createSymbol, createSymbol, createUnicodeString, createWord, disassemble, end, find, find, find, findBytes, findBytes, findBytes, findBytes, findBytes, findPascalStrings, findStrings, getAddressFactory, getBookmarks, getByte, getBytes, getCurrentProgram, getDataAfter, getDataAfter, getDataAt, getDataBefore, getDataBefore, getDataContaining, getDataTypes, getDouble, getEOLComment, getEquate, getEquate, getEquates, getFirstData, getFirstFunction, getFirstInstruction, getFirstInstruction, getFloat, getFragment, getFunction, getFunctionAfter, getFunctionAfter, getFunctionAt, getFunctionBefore, getFunctionBefore, getFunctionContaining, getGlobalFunctions, getInstructionAfter, getInstructionAfter, getInstructionAt, getInstructionBefore, getInstructionBefore, getInstructionContaining, getInt, getLastData, getLastFunction, getLastInstruction, getLong, getMemoryBlock, getMemoryBlock, getMemoryBlocks, getMonitor, getNamespace, getPlateComment, getPostComment, getPreComment, getProgramFile, getReference, getReference, getReferencesFrom, getReferencesTo, getRepeatableComment, getShort, getSymbol, getSymbolAfter, getSymbolAfter, getSymbolAt, getSymbolAt, getSymbolAt, getSymbolBefore, getSymbolBefore, getSymbols, getUndefinedDataAfter, getUndefinedDataAt, getUndefinedDataBefore, openDataTypeArchive, removeBookmark, removeData, removeDataAt, removeEntryPoint, removeEquate, removeEquate, removeEquates, removeFunction, removeFunctionAt, removeInstruction, removeInstructionAt, removeMemoryBlock, removeReference, removeSymbol, saveProgram, saveProgram, setByte, setBytes, setDouble, setEOLComment, setFloat, setInt, setLong, setPlateComment, setPostComment, setPreComment, setReferencePrimary, setReferencePrimary, setRepeatableComment, setShort, start, toAddr, toAddr, toAddr
-
Constructor Details
-
GroovyScript
public GroovyScript()Creates a new script, with its own interpreter instance.
-
-
Method Details
-
getCategory
The category of these scripts.- Overrides:
getCategory
in classghidra.app.script.GhidraScript
-
run
Executes this script.- Throws:
Exception
-
runScript
public void runScript(String scriptName, String[] scriptArguments, ghidra.app.script.GhidraState scriptState) throws Exception Runs a script by name with the given arguments using the given state, within this script. If the script cannot be found but the script is not running in headless mode, the user will be prompted to ignore the error, which will cause the function to simply continue instead of throwing an IllegalArgumentException.- Overrides:
runScript
in classghidra.app.script.GhidraScript
- Throws:
IllegalArgumentException
- if the script does not existIOException
- if an error occurs getting the providerIllegalAccessException
- if an error occurs getting the scriptInstantiationException
- if an error occurs getting the scriptClassNotFoundException
- if an error occurs getting the scriptException
- if an error occurs running the script
-