Package ghidra.python

Class PythonScript

    • Constructor Detail

      • PythonScript

        public PythonScript()
    • Method Detail

      • run

        public void run()
        Description copied from class: GhidraScript
        The run method is where the script specific code is placed.
        Specified by:
        run in class GhidraScript
      • runScript

        public void runScript​(java.lang.String scriptName,
                              GhidraState scriptState)
                       throws java.lang.Exception
        Description copied from class: GhidraScript
        Runs a script by name using the given state.

        It attempts to locate the script in the directories defined in GhidraScriptUtil.getScriptDirectories().

        The script being run uses the given GhidraState (e.g., script variables) Any changes to the state by the script being run will be reflected in the given state object. If the given object is the current state, the this scripts state may be changed by the called script.

        Overrides:
        runScript in class GhidraScript
        Parameters:
        scriptName - the name of the script to run
        scriptState - the Ghidra state
        Throws:
        java.lang.IllegalArgumentException - if the script does not exist
        java.lang.Exception - if any exceptions occur while running the script
        See Also:
        GhidraScript.runScriptPreserveMyState(String), GhidraScript.runScript(String)
      • getCategory

        public java.lang.String getCategory()
        Description copied from class: GhidraScript
        Returns the category for this script.
        Overrides:
        getCategory in class GhidraScript
        Returns:
        the category for this script