python3-10.pyscalpel.java.scalpel_types

1from .context import Context
2from .utils import IPythonUtils, PythonUtils
3
4__all__ = ["Context", "IPythonUtils", "PythonUtils"]
class Context(typing.TypedDict):
 6class Context(TypedDict):
 7    """Scalpel Python execution context"""
 8
 9    API: Any
10    """
11        The Burp [Montoya API]
12        (https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/MontoyaApi.html)
13        root object.
14
15        Allows you to interact with Burp by directly manipulating the Java object.
16    
17    """
18
19    directory: str
20    """The framework directory"""
21
22    user_script: str
23    """The loaded script path"""
24
25    framework: str
26    """The framework (loader script) path"""
27
28    venv: str
29    """The venv the script was loaded in"""

Scalpel Python execution context

API: Any

The Burp [Montoya API] (https://portswigger.github.io/burp-extensions-montoya-api/javadoc/burp/api/montoya/MontoyaApi.html) root object.

Allows you to interact with Burp by directly manipulating the Java object.

directory: str

The framework directory

user_script: str

The loaded script path

framework: str

The framework (loader script) path

venv: str

The venv the script was loaded in

class IPythonUtils(pyscalpel.java.object.JavaObject):
16class IPythonUtils(JavaObject):  # pragma: no cover
17    __metaclass__ = ABCMeta
18
19    @abstractmethod
20    def toPythonBytes(self, java_bytes: JavaBytes) -> list[int]:
21        pass
22
23    @abstractmethod
24    def toJavaBytes(self, python_bytes: bytes | list[int] | bytearray) -> JavaBytes:
25        pass
26
27    @abstractmethod
28    def toByteArray(self, python_bytes: bytes | list[int] | bytearray) -> IByteArray:
29        pass
30
31    @abstractmethod
32    def getClassName(self, msg: JavaObject) -> str:
33        pass
34
35    @abstractmethod
36    def updateHeader(
37        self, msg: RequestOrResponse, name: str, value: str
38    ) -> RequestOrResponse:
39        pass

generated source for class Object

@abstractmethod
def toPythonBytes(self, java_bytes: pyscalpel.java.bytes.JavaBytes) -> list[int]:
19    @abstractmethod
20    def toPythonBytes(self, java_bytes: JavaBytes) -> list[int]:
21        pass
@abstractmethod
def toJavaBytes( self, python_bytes: bytes | list[int] | bytearray) -> pyscalpel.java.bytes.JavaBytes:
23    @abstractmethod
24    def toJavaBytes(self, python_bytes: bytes | list[int] | bytearray) -> JavaBytes:
25        pass
@abstractmethod
def toByteArray( self, python_bytes: bytes | list[int] | bytearray) -> pyscalpel.java.burp.byte_array.IByteArray:
27    @abstractmethod
28    def toByteArray(self, python_bytes: bytes | list[int] | bytearray) -> IByteArray:
29        pass
@abstractmethod
def getClassName(self, msg: pyscalpel.java.object.JavaObject) -> str:
31    @abstractmethod
32    def getClassName(self, msg: JavaObject) -> str:
33        pass
@abstractmethod
def updateHeader( self, msg: ~RequestOrResponse, name: str, value: str) -> ~RequestOrResponse:
35    @abstractmethod
36    def updateHeader(
37        self, msg: RequestOrResponse, name: str, value: str
38    ) -> RequestOrResponse:
39        pass
Inherited Members
pyscalpel.java.object.JavaObject
getClass
hashCode
equals
clone
notify
notifyAll
wait
finalize
PythonUtils = None