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

Method invoke

tools/gef.py:10062–10083  ·  view source on GitHub ↗
(self, argv: str, from_tty: bool)

Source from the content-addressed store, hash-verified

10060 return
10061
10062 def invoke(self, argv: str, from_tty: bool) -> None:
10063 self.dont_repeat()
10064 if not argv:
10065 err("No script name provided")
10066 return
10067
10068 args = argv.split()
10069
10070 if "--list" in args or "-l" in args:
10071 subprocess.run(["xdg-open", f"https://github.com/hugsy/gef-extras/{self.branch}/"])
10072 return
10073
10074 self.dirpath = pathlib.Path(gef.config["gef.tempdir"]).expanduser().absolute()
10075 if not self.dirpath.is_dir():
10076 err("'gef.tempdir' is not a valid directory")
10077 return
10078
10079 for script in args:
10080 script = script.lower()
10081 if not self.__install_extras_script(script):
10082 warn(f"Failed to install '{script}', skipping...")
10083 return
10084
10085
10086 def __install_extras_script(self, script: str) -> bool:

Callers

nothing calls this directly

Calls 4

errFunction · 0.85
warnFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected