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

Method get_state_of

tools/gef.py:5019–5026  ·  view source on GitHub ↗
(self, pid: int)

Source from the content-addressed store, hash-verified

5017 return
5018
5019 def get_state_of(self, pid: int) -> Dict[str, str]:
5020 res = {}
5021 with open(f"/proc/{pid}/status", "r") as f:
5022 file = f.readlines()
5023 for line in file:
5024 key, value = line.split(":", 1)
5025 res[key.strip()] = value.strip()
5026 return res
5027
5028 def get_cmdline_of(self, pid: int) -> str:
5029 with open(f"/proc/{pid}/cmdline", "r") as f:

Callers 2

show_ancestorMethod · 0.95
show_descendantsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected