2024-08-29 14:54:23 -04:00
|
|
|
from typing import TypeVar, Any
|
2024-06-09 08:41:24 -04:00
|
|
|
import ghidra
|
|
|
|
|
|
|
|
# pylint: disable=invalid-name,unused-argument
|
|
|
|
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
|
|
# from ghidra.app.script.GhidraScript
|
|
|
|
def currentProgram() -> "ghidra.program.model.listing.Program": ...
|
|
|
|
def getAddressFactory() -> " ghidra.program.model.address.AddressFactory": ...
|
|
|
|
def state() -> "ghidra.app.script.GhidraState": ...
|
|
|
|
def askChoice(title: str, message: str, choices: list[T], defaultValue: T) -> T: ...
|
|
|
|
def askYesNo(title: str, question: str) -> bool: ...
|
|
|
|
def getFunctionAt(
|
|
|
|
entryPoint: ghidra.program.model.address.Address,
|
|
|
|
) -> ghidra.program.model.listing.Function: ...
|
|
|
|
def createFunction(
|
|
|
|
entryPoint: ghidra.program.model.address.Address, name: str
|
|
|
|
) -> ghidra.program.model.listing.Function: ...
|
2024-08-29 14:54:23 -04:00
|
|
|
def getProgramFile() -> Any: ... # actually java.io.File
|