Documentation
¶
Index ¶
- Variables
- func AdaptSessionColor(prePrompt, sId string) string
- func CmdExist(cmd *cobra.Command, name string) bool
- func Connect(con *Console, config *mtls.ClientConfig) (*grpc.ClientConn, error)
- func GenGroupHelp(writer io.Writer, con *Console, groupId string, ...)
- func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string) string) error
- func GenMarkdownTreeCustom(cmd *cobra.Command, writer io.Writer, linkHandler func(string) string) error
- func GetCmd(cmd *cobra.Command, name string) *cobra.Command
- func IsMCPRunning(host string, port int) bool
- func Keys[M ~map[K]V, K comparable, V any](m M) []K
- func Login(con *Console, config *mtls.ClientConfig) error
- func NewConfigLogin(con *Console, yamlFile string) error
- func NewSessionColor(prePrompt, sId string) string
- func RunCommand(con *Console, cmdline interface{}) (string, error)
- func WrapClientCallback(callback ImplantFuncCallback) intermediate.ImplantCallback
- func WrapImplantFunc(con *Console, fun interface{}, callback ImplantFuncCallback) *mals.MalFunction
- func WrapServerFunc(con *Console, fun interface{}) *mals.MalFunction
- type BindCmds
- type Console
- func (c *Console) AddCommandFuncHelper(cmdName string, funcName string, example string, input, output []string) error
- func (c *Console) Context() context.Context
- func (c *Console) GetPrompt() string
- func (c *Console) ImplantMenu() *cobra.Command
- func (con *Console) InitMCPServer()
- func (c *Console) NewConsole()
- func (c *Console) NewMCPServer(cmds map[string]*cobra.Command)
- func (c *Console) RefreshActiveSession()
- func (c *Console) RefreshCmd(sess *core.Session) int
- func (c *Console) RegisterAggressiveFunc(name string, fn interface{}, internalCallback ImplantFuncCallback, ...)
- func (c *Console) RegisterBuiltinFunc(pkg, name string, fn interface{}, callback ImplantFuncCallback) error
- func (c *Console) RegisterImplantFunc(name string, fn interface{}, bname string, bfn interface{}, ...)
- func (c *Console) RegisterServerFunc(name string, fn interface{}, helper *mals.Helper) error
- func (c *Console) Start(bindCmds ...BindCmds) error
- func (c *Console) SwitchImplant(sess *core.Session)
- func (c *Console) SyncBuildContext() context.Context
- type ImplantFuncCallback
- type MCPServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFoundSession = errors.New("session not found") Prompt = "IoM" )
Functions ¶
func AdaptSessionColor ¶ added in v0.0.3
func Connect ¶ added in v0.0.3
func Connect(con *Console, config *mtls.ClientConfig) (*grpc.ClientConn, error)
func GenGroupHelp ¶ added in v0.1.2
func GenMarkdownCustom ¶ added in v0.1.2
func GenMarkdownTreeCustom ¶ added in v0.1.2
func IsMCPRunning ¶ added in v0.1.2
func Keys ¶ added in v0.0.3
func Keys[M ~map[K]V, K comparable, V any](m M) []K
From the x/exp source code - gets a slice of keys for a map
func NewConfigLogin ¶
func NewSessionColor ¶ added in v0.0.3
func RunCommand ¶ added in v0.1.0
func WrapClientCallback ¶ added in v0.0.3
func WrapClientCallback(callback ImplantFuncCallback) intermediate.ImplantCallback
func WrapImplantFunc ¶
func WrapImplantFunc(con *Console, fun interface{}, callback ImplantFuncCallback) *mals.MalFunction
func WrapServerFunc ¶
func WrapServerFunc(con *Console, fun interface{}) *mals.MalFunction
Types ¶
type Console ¶
type Console struct {
//*core.ActiveTarget
*core.ServerStatus
Log *core.Logger
App *console.Console
Profile *assets.Profile
CMDs map[string]*cobra.Command
MCP *MCPServer
Helpers map[string]*cobra.Command
MalManager *plugin.MalManager
}
func (*Console) AddCommandFuncHelper ¶ added in v0.1.0
func (*Console) ImplantMenu ¶
func (*Console) InitMCPServer ¶ added in v0.1.2
func (con *Console) InitMCPServer()
InitMCPServer 在命令注册完成后初始化MCP服务器 这个函数应该在所有命令注册完成后调用,避免并发映射访问错误
func (*Console) NewConsole ¶
func (c *Console) NewConsole()
func (*Console) NewMCPServer ¶ added in v0.1.2
NewMCPServer 创建一个新的MCP服务器实例
func (*Console) RefreshActiveSession ¶
func (c *Console) RefreshActiveSession()
func (*Console) RegisterAggressiveFunc ¶ added in v0.1.1
func (c *Console) RegisterAggressiveFunc(name string, fn interface{}, internalCallback ImplantFuncCallback, callback intermediate.ImplantCallback)
func (*Console) RegisterBuiltinFunc ¶ added in v0.0.3
func (c *Console) RegisterBuiltinFunc(pkg, name string, fn interface{}, callback ImplantFuncCallback) error
func (*Console) RegisterImplantFunc ¶
func (c *Console) RegisterImplantFunc(name string, fn interface{}, bname string, bfn interface{}, internalCallback ImplantFuncCallback, callback intermediate.ImplantCallback)
func (*Console) RegisterServerFunc ¶
func (*Console) SwitchImplant ¶
func (*Console) SyncBuildContext ¶ added in v0.1.2
type ImplantFuncCallback ¶ added in v0.0.3
type ImplantFuncCallback func(content *clientpb.TaskContext) (interface{}, error)
ImplantFuncCallback, function internal callback func, retrun golang struct
type MCPServer ¶ added in v0.1.2
type MCPServer struct {
// contains filtered or unexported fields
}
MCPServer 包装了MCP服务器实例
func (*MCPServer) AddTool ¶ added in v0.1.2
func (m *MCPServer) AddTool(tool mcp.Tool, handler server.ToolHandlerFunc)
AddTool 添加新的工具到MCP服务器
Click to show internal directories.
Click to hide internal directories.