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

Method sync

tools/gef.py:10679–10690  ·  view source on GitHub ↗

Copy the `src` into the temporary chroot. If `dst` is provided, that path will be used instead of `src`.

(self, src: str, dst: Optional[str] = None)

Source from the content-addressed store, hash-verified

10677 return self._maps
10678
10679 def sync(self, src: str, dst: Optional[str] = None) -> bool:
10680 """Copy the `src` into the temporary chroot. If `dst` is provided, that path will be
10681 used instead of `src`."""
10682 if not dst:
10683 dst = src
10684 tgt = self.root / dst.lstrip("/")
10685 if tgt.exists():
10686 return True
10687 tgt.parent.mkdir(parents=True, exist_ok=True)
10688 dbg(f"[remote] downloading '{src}' -> '{tgt}'")
10689 gdb.execute(f"remote get {src} {tgt.absolute()}")
10690 return tgt.exists()
10691
10692 def connect(self, pid: int) -> bool:
10693 """Connect to remote target. If in extended mode, also attach to the given PID."""

Callers 2

__setup_remoteMethod · 0.95

Calls 1

dbgFunction · 0.85

Tested by

no test coverage detected