MCPcopy
hub / github.com/Pennyw0rth/NetExec / list_modules

Method list_modules

nxc/loaders/moduleloader.py:109–126  ·  view source on GitHub ↗

List modules without initializing them

(self)

Source from the content-addressed store, hash-verified

107 self.logger.debug(traceback.format_exc())
108
109 def list_modules(self):
110 """List modules without initializing them"""
111 modules = {}
112 modules_paths = [
113 path_join(dirname(nxc.__file__), "modules"),
114 path_join(NXC_PATH, "modules"),
115 ]
116
117 for path in modules_paths:
118 for module in listdir(path):
119 if module[-3:] == ".py" and module != "example_module.py":
120 try:
121 module_path = path_join(path, module)
122 module_data = self.get_module_info(module_path)
123 modules.update(module_data)
124 except Exception as e:
125 self.logger.debug(f"Error loading module {module}: {e}")
126 return modules

Callers 1

mainFunction · 0.95

Calls 1

get_module_infoMethod · 0.95

Tested by

no test coverage detected