Class ClojureScript

java.lang.Object
ghidra.program.flatapi.FlatProgramAPI
ghidra.app.script.GhidraScript
rubydragon.clojure.ClojureScript

public class ClojureScript extends ghidra.app.script.GhidraScript
A Ghidra script written in Clojure.
  • 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

    Constructors
    Constructor
    Description
    Creates a new script, with its own interpreter instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    The category of these scripts.
    void
    run()
    Executes this script.
    void
    runScript(String scriptName, String[] scriptArguments, ghidra.app.script.GhidraState scriptState)
    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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ClojureScript

      public ClojureScript()
      Creates a new script, with its own interpreter instance.
  • Method Details

    • getCategory

      public String getCategory()
      The category of these scripts.
      Overrides:
      getCategory in class ghidra.app.script.GhidraScript
    • run

      public void run() throws Exception
      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 class ghidra.app.script.GhidraScript
      Throws:
      IllegalArgumentException - if the script does not exist
      IOException - if an error occurs getting the provider
      IllegalAccessException - if an error occurs getting the script
      InstantiationException - if an error occurs getting the script
      ClassNotFoundException - if an error occurs getting the script
      Exception - if an error occurs running the script