You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pwndbg/tests/unit_tests/mocks/dbg.py

23 lines
539 B
Python

from __future__ import annotations
from typing_extensions import override
import pwndbg
from pwndbg.lib.arch import ArchDefinition
from pwndbg.lib.arch import Platform
class MockInferior(pwndbg.dbg_mod.Process):
@override
def arch(self) -> ArchDefinition:
return ArchDefinition(name="x86-64", ptrsize=8, endian="little", platform=Platform.LINUX)
class MockDebugger(pwndbg.dbg_mod.Debugger):
@override
def selected_inferior(self) -> dbg_mod.Process:
return MockInferior()
pwndbg.dbg = MockDebugger()