Package ghidra.python
Class PythonScriptProvider
- java.lang.Object
-
- ghidra.app.script.GhidraScriptProvider
-
- ghidra.python.PythonScriptProvider
-
- All Implemented Interfaces:
ExtensionPoint,java.lang.Comparable<GhidraScriptProvider>
public class PythonScriptProvider extends GhidraScriptProvider
-
-
Constructor Summary
Constructors Change Constructor Description PythonScriptProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Change Modifier and Type Method Description voidcreateNewScript(ResourceFile newScript, java.lang.String category)Creates a new script using the specified file.NEW protected java.lang.StringgetCertificationBodyPrefix()Return the prefix for each certification header bofy line if this file is subject to certificationNEW protected java.lang.StringgetCertifyHeaderEnd()Return the end of certification header line if this file type is subject to certification.NEW protected java.lang.StringgetCertifyHeaderStart()Return the start of certification header line if this file type is subject to certification.java.lang.StringgetCommentCharacter()Returns the comment character.java.lang.StringgetDescription()Returns a description for this type of script.java.lang.StringgetExtension()Returns the file extension for this type of script.GhidraScriptgetScriptInstance(ResourceFile sourceFile, java.io.PrintWriter writer)Returns a GhidraScript instance for the specified source file.-
Methods inherited from class ghidra.app.script.GhidraScriptProvider
compareTo, deleteScript, equals, fixupName, hashCode, toString, writeBody, writeHeader
-
-
-
-
Method Detail
-
createNewScript
public void createNewScript(ResourceFile newScript, java.lang.String category) throws java.io.IOException
Description copied from class:GhidraScriptProviderCreates a new script using the specified file.- Specified by:
createNewScriptin classGhidraScriptProvider- Parameters:
newScript- the new script filecategory- the script category- Throws:
java.io.IOException- if an error occurs writing the file
-
getCommentCharacter
public java.lang.String getCommentCharacter()
Description copied from class:GhidraScriptProviderReturns the comment character. For example, "//" or "#".- Specified by:
getCommentCharacterin classGhidraScriptProvider- Returns:
- the comment character
-
getCertifyHeaderStart NEW
protected java.lang.String getCertifyHeaderStart()
Description copied from class:GhidraScriptProviderReturn the start of certification header line if this file type is subject to certification.- Overrides:
getCertifyHeaderStartin classGhidraScriptProvider- Returns:
- start of certification header or null if not supported
-
getCertifyHeaderEnd NEW
protected java.lang.String getCertifyHeaderEnd()
Description copied from class:GhidraScriptProviderReturn the end of certification header line if this file type is subject to certification.- Overrides:
getCertifyHeaderEndin classGhidraScriptProvider- Returns:
- end of certification header or null if not supported
-
getCertificationBodyPrefix NEW
protected java.lang.String getCertificationBodyPrefix()
Description copied from class:GhidraScriptProviderReturn the prefix for each certification header bofy line if this file is subject to certification- Overrides:
getCertificationBodyPrefixin classGhidraScriptProvider- Returns:
- certification heaber body prefix or null if not supported
-
getDescription
public java.lang.String getDescription()
Description copied from class:GhidraScriptProviderReturns a description for this type of script.- Specified by:
getDescriptionin classGhidraScriptProvider- Returns:
- a description for this type of script
-
getExtension
public java.lang.String getExtension()
Description copied from class:GhidraScriptProviderReturns the file extension for this type of script. For example, ".java" or ".py".- Specified by:
getExtensionin classGhidraScriptProvider- Returns:
- the file extension for this type of script
-
getScriptInstance
public GhidraScript getScriptInstance(ResourceFile sourceFile, java.io.PrintWriter writer) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
Description copied from class:GhidraScriptProviderReturns a GhidraScript instance for the specified source file.- Specified by:
getScriptInstancein classGhidraScriptProvider- Parameters:
sourceFile- the source filewriter- the print writer to write warning/error messages- Returns:
- a GhidraScript instance for the specified source file
- Throws:
java.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessException
-
-