MCPcopy Create free account
hub / github.com/HexHive/NASS / __init__

Method __init__

tools/gef.py:10620–10632  ·  view source on GitHub ↗
(self, host: str, port: int, pid: int =-1, qemu: Optional[pathlib.Path] = None)

Source from the content-addressed store, hash-verified

10618 """Class for managing remote sessions with GEF. It will create a temporary environment
10619 designed to clone the remote one."""
10620 def __init__(self, host: str, port: int, pid: int =-1, qemu: Optional[pathlib.Path] = None) -> None:
10621 super().__init__()
10622 self.__host = host
10623 self.__port = port
10624 self.__local_root_fd = tempfile.TemporaryDirectory()
10625 self.__local_root_path = pathlib.Path(self.__local_root_fd.name)
10626 self.__qemu = qemu
10627 dbg(f"[remote] initializing remote session with {self.target} under {self.root}")
10628 if not self.connect(pid):
10629 raise EnvironmentError(f"Cannot connect to remote target {self.target}")
10630 if not self.setup():
10631 raise EnvironmentError(f"Failed to create a proper environment for {self.target}")
10632 return
10633
10634 def close(self) -> None:
10635 self.__local_root_fd.cleanup()

Callers

nothing calls this directly

Calls 4

connectMethod · 0.95
setupMethod · 0.95
dbgFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected