MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / defaultModules

Function defaultModules

internal/bridge/registry.go:110–137  ·  view source on GitHub ↗

defaultModules returns the canonical list of all bridge modules. This is THE single source of truth for module registration. Adding a new module = adding one line here + implementing the Module interface.

()

Source from the content-addressed store, hash-verified

108// This is THE single source of truth for module registration.
109// Adding a new module = adding one line here + implementing the Module interface.
110func defaultModules() []Module {
111 return []Module{
112 // Core modules
113 &ExecModule{},
114 &ChatModule{},
115 &TappingModule{},
116 &TappingOffModule{},
117 &UploadModule{},
118 &DownloadModule{},
119 // Shell-based structured response modules
120 NewShellModule(consts.ModuleNetstat, consts.ModuleNetstat, netstatCommand, netstatResponse),
121 NewShellModule(consts.ModulePs, consts.ModulePs, psCommand, psResponse),
122 NewShellModule(consts.ModuleLs, consts.ModuleLs, lsCommand, lsResponse),
123 // Shell-based text response modules
124 NewShellModule(consts.ModuleWhoami, "response", whoamiCommand, textResponse),
125 NewShellModule(consts.ModulePwd, "response", pwdCommand, textResponse),
126 NewShellModule(consts.ModuleCat, "response", catCommand, textResponse),
127 NewShellModule(consts.ModuleEnv, "response", envCommand, envResponse),
128 // Shell-based exec modules (no custom parser)
129 NewShellModule(consts.ModuleKill, consts.ModuleExecute, killCommand, nil),
130 NewShellModule(consts.ModuleMkdir, consts.ModuleExecute, mkdirCommand, nil),
131 NewShellModule(consts.ModuleRm, consts.ModuleExecute, rmCommand, nil),
132 NewShellModule(consts.ModuleCp, consts.ModuleExecute, cpCommand, nil),
133 NewShellModule(consts.ModuleMv, consts.ModuleExecute, mvCommand, nil),
134 NewShellModule(consts.ModuleCd, "response", cdCommand, textResponse),
135 NewShellModule(consts.ModuleChmod, consts.ModuleExecute, chmodCommand, nil),
136 }
137}
138
139// buildDefaultRegistry creates and populates a registry with all default modules.
140func buildDefaultRegistry() *Registry {

Callers 1

buildDefaultRegistryFunction · 0.85

Calls 1

NewShellModuleFunction · 0.85

Tested by

no test coverage detected