From 5453b11dd5bb3433d2fe85e593aaf6725a759d52 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 6 Jan 2025 14:57:15 +0800 Subject: [PATCH 01/40] feat: lua binary support url,bin,file path --- client/core/intermediate/utils.go | 38 ++------- helper/utils/mals/mal.go | 19 ----- helper/utils/pe/bof.go | 134 +++++++++++++++--------------- 3 files changed, 72 insertions(+), 119 deletions(-) delete mode 100644 helper/utils/mals/mal.go diff --git a/client/core/intermediate/utils.go b/client/core/intermediate/utils.go index ae4dde0b..221a7ae9 100644 --- a/client/core/intermediate/utils.go +++ b/client/core/intermediate/utils.go @@ -3,6 +3,7 @@ package intermediate import ( "context" "fmt" + "github.com/chainreactors/malice-network/helper/utils/pe" "math" "os" "path/filepath" @@ -14,9 +15,7 @@ import ( "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" - "github.com/chainreactors/malice-network/helper/utils/fileutils" "github.com/chainreactors/malice-network/helper/utils/handler" - "github.com/chainreactors/malice-network/helper/utils/mals" ) func GetResourceFile(pluginName, filename string) (string, error) { @@ -46,22 +45,10 @@ func NewSacrificeProcessMessage(ppid uint32, hidden, block_dll, bypassETW bool, } func NewBinary(module string, path string, args []string, output bool, timeout uint32, arch string, process string, sac *implantpb.SacrificeProcess) (*implantpb.ExecuteBinary, error) { - var bin []byte - var err error - - if fileutils.Exist(path) { - bin, err = os.ReadFile(fileutils.FormatWindowPath(path)) - if err != nil { - return nil, fmt.Errorf("NewBinary error: %s", err) - } - } else { - bin, err = mals.UnPackMalBinary(path) - if err != nil { - return nil, fmt.Errorf("the path does not point to a valid file or does not meet the expected binary format") - } - path = "virtual_path" + bin, err := pe.Unpack(path) + if err != nil { + return nil, err } - return &implantpb.ExecuteBinary{ Name: filepath.Base(path), Bin: bin, @@ -76,20 +63,9 @@ func NewBinary(module string, path string, args []string, output bool, timeout u } func NewBinaryData(module string, path string, data string, output bool, timeout uint32, arch string, process string, sac *implantpb.SacrificeProcess) (*implantpb.ExecuteBinary, error) { - var bin []byte - var err error - - if fileutils.Exist(path) { - bin, err = os.ReadFile(fileutils.FormatWindowPath(path)) - if err != nil { - return nil, fmt.Errorf("NewBinary error: %s", err) - } - } else { - bin, err = mals.UnPackMalBinary(path) - if err != nil { - return nil, err - } - path = "virtual_path" + bin, err := pe.Unpack(path) + if err != nil { + return nil, err } binData := []byte(data) diff --git a/helper/utils/mals/mal.go b/helper/utils/mals/mal.go deleted file mode 100644 index 23213fef..00000000 --- a/helper/utils/mals/mal.go +++ /dev/null @@ -1,19 +0,0 @@ -package mals - -import ( - "fmt" - "strings" -) - -func PackMalBinary(data string) string { - return fmt.Sprintf(`bin:%s`, []byte(data)) -} - -func UnPackMalBinary(data string) ([]byte, error) { - parts := strings.SplitN(data, ":", 2) - - if len(parts) != 2 || parts[0] != "bin" { - return nil, fmt.Errorf("UnPackMalBinary error: invalid binary data format") - } - return []byte(parts[1]), nil -} diff --git a/helper/utils/pe/bof.go b/helper/utils/pe/bof.go index c6c305b0..7be51374 100644 --- a/helper/utils/pe/bof.go +++ b/helper/utils/pe/bof.go @@ -1,85 +1,25 @@ package pe import ( - "bytes" "encoding/base64" - "encoding/binary" "fmt" + "io" + "net/http" + "os" "strconv" "strings" - - "golang.org/x/text/encoding/unicode" ) type BOFArgsBuffer struct { - Buffer *bytes.Buffer -} - -func (b *BOFArgsBuffer) AddData(d []byte) error { - dataLen := uint32(len(d)) - err := binary.Write(b.Buffer, binary.LittleEndian, &dataLen) - if err != nil { - return err - } - return binary.Write(b.Buffer, binary.LittleEndian, &d) -} - -func (b *BOFArgsBuffer) AddShort(d uint16) error { - return binary.Write(b.Buffer, binary.LittleEndian, &d) -} - -func (b *BOFArgsBuffer) AddInt(d uint32) error { - return binary.Write(b.Buffer, binary.LittleEndian, &d) -} - -func (b *BOFArgsBuffer) AddString(d string) error { - stringLen := uint32(len(d)) + 1 - err := binary.Write(b.Buffer, binary.LittleEndian, &stringLen) - if err != nil { - return err - } - dBytes := append([]byte(d), 0x00) - return binary.Write(b.Buffer, binary.LittleEndian, dBytes) -} - -func (b *BOFArgsBuffer) AddWString(d string) error { - encoder := unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM).NewEncoder() - strBytes := append([]byte(d), 0x00) - utf16Data, err := encoder.Bytes(strBytes) - if err != nil { - return err - } - stringLen := uint32(len(utf16Data)) - err = binary.Write(b.Buffer, binary.LittleEndian, &stringLen) - if err != nil { - return err - } - return binary.Write(b.Buffer, binary.LittleEndian, utf16Data) -} - -func (b *BOFArgsBuffer) GetBuffer() ([]byte, error) { - outBuffer := new(bytes.Buffer) - err := binary.Write(outBuffer, binary.LittleEndian, uint32(b.Buffer.Len())) - if err != nil { - return nil, err - } - err = binary.Write(outBuffer, binary.LittleEndian, b.Buffer.Bytes()) - if err != nil { - return nil, err - } - return outBuffer.Bytes(), nil -} - -type IoMBOFArgsBuffer struct { Args []string } -func (b *IoMBOFArgsBuffer) AddData(d []byte) error { +func (b *BOFArgsBuffer) AddData(d []byte) error { b.Args = append(b.Args, PackBinary(string(d))) return nil } -func (b *IoMBOFArgsBuffer) AddShort(d uint16) error { +func (b *BOFArgsBuffer) AddShort(d uint16) error { data, err := PackShort(d) if err != nil { return err @@ -88,7 +28,7 @@ func (b *IoMBOFArgsBuffer) AddShort(d uint16) error { return nil } -func (b *IoMBOFArgsBuffer) AddInt(d uint32) error { +func (b *BOFArgsBuffer) AddInt(d uint32) error { data, err := PackInt(d) if err != nil { return err @@ -97,17 +37,17 @@ func (b *IoMBOFArgsBuffer) AddInt(d uint32) error { return nil } -func (b *IoMBOFArgsBuffer) AddString(d string) error { +func (b *BOFArgsBuffer) AddString(d string) error { b.Args = append(b.Args, PackString(d)) return nil } -func (b *IoMBOFArgsBuffer) AddWString(d string) error { +func (b *BOFArgsBuffer) AddWString(d string) error { b.Args = append(b.Args, PackWideString(d)) return nil } -func (b *IoMBOFArgsBuffer) GetArgs() []string { +func (b *BOFArgsBuffer) GetArgs() []string { return b.Args } @@ -169,6 +109,14 @@ func PackBinary(data string) string { return fmt.Sprintf(`bin:%s`, base64.StdEncoding.EncodeToString([]byte(data))) } +func PackFile(data string) string { + return "file:" + data +} + +func PackURL(data string) string { + return "url" + data +} + func PackInt(i uint32) (string, error) { return fmt.Sprintf(`int:%d`, i), nil } @@ -201,6 +149,54 @@ func PackWideString(s string) string { return fmt.Sprintf(`wstr:%s`, s) } +func UnPackBinary(data string) ([]byte, error) { + if strings.HasPrefix(data, "bin:") { + data = data[4:] + } + return base64.StdEncoding.DecodeString(data) +} + +func UnPackFile(data string) ([]byte, error) { + if strings.HasPrefix(data, "file:") { + data = data[5:] + } + + return os.ReadFile(data) +} + +func UnpackURL(data string) ([]byte, error) { + if strings.HasPrefix(data, "url:") { + data = data[4:] + } + resp, err := http.Get(data) + if err != nil { + return nil, err + } + + if resp.StatusCode == 200 { + return io.ReadAll(resp.Body) + } else { + return nil, fmt.Errorf("request error %d", resp.StatusCode) + } +} + +func Unpack(data string) ([]byte, error) { + unpakced := strings.SplitN(data, ":", 2) + if len(unpakced) == 1 { + return UnPackFile(data) + } + switch unpakced[0] { + case "file": + return UnPackFile(unpakced[1]) + case "bin": + return UnPackBinary(unpakced[1]) + case "url": + return UnpackURL(unpakced[1]) + default: + return nil, fmt.Errorf("Unknown data type %s", unpakced[0]) + } +} + const ( CALLBACK_OUTPUT = 0 CALLBACK_SCREENSHOT = 3 From b09bc9b279fc0e56b2f5729773d5ed3b475a796f Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 6 Jan 2025 17:40:41 +0800 Subject: [PATCH 02/40] refactor: decoupling mals to github.com/chainreactors/mals --- client/cmd/genlua/gen_lua.go | 11 +- client/command/addon/load.go | 4 +- client/command/alias/load.go | 4 +- client/command/build/command.go | 20 +- client/command/extension/load.go | 69 ++- client/command/file/commands.go | 2 +- client/command/generic/commands.go | 3 +- client/command/mutant/commands.go | 15 +- client/command/sessions/new.go | 4 +- client/core/intermediate/builtin.go | 117 +---- client/core/intermediate/function.go | 177 ++------ client/core/intermediate/lua.go | 351 --------------- client/core/intermediate/utils.go | 6 +- client/core/plugin/lua.go | 616 +-------------------------- client/repl/console.go | 7 +- client/repl/plugin.go | 11 +- go.mod | 42 +- go.sum | 497 +-------------------- 18 files changed, 218 insertions(+), 1738 deletions(-) diff --git a/client/cmd/genlua/gen_lua.go b/client/cmd/genlua/gen_lua.go index 8d788da8..10c8e0d1 100644 --- a/client/cmd/genlua/gen_lua.go +++ b/client/cmd/genlua/gen_lua.go @@ -8,6 +8,7 @@ import ( "github.com/chainreactors/malice-network/client/core/plugin" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" + "github.com/chainreactors/mals" "github.com/spf13/cobra" ) @@ -29,9 +30,9 @@ func main() { intermediate.RegisterBuiltin(rpc) command.RegisterClientFunc(con) command.RegisterImplantFunc(con) - vm := plugin.NewLuaVM() - plugin.GenerateLuaDefinitionFile(vm, "define.lua") - plugin.GenerateMarkdownDefinitionFile(vm, intermediate.BuiltinPackage, "builtin.md") - plugin.GenerateMarkdownDefinitionFile(vm, intermediate.RpcPackage, "rpc.md") - plugin.GenerateMarkdownDefinitionFile(vm, intermediate.BeaconPackage, "beacon.md") + vm := mals.NewLuaVM() + mals.GenerateLuaDefinitionFile(vm, "define.lua", plugin.ProtoPackage, intermediate.InternalFunctions.All()) + mals.GenerateMarkdownDefinitionFile(vm, intermediate.BuiltinPackage, "builtin.md", intermediate.InternalFunctions.Package(intermediate.BuiltinPackage)) + mals.GenerateMarkdownDefinitionFile(vm, intermediate.RpcPackage, "rpc.md", intermediate.InternalFunctions.Package(intermediate.RpcPackage)) + mals.GenerateMarkdownDefinitionFile(vm, intermediate.BeaconPackage, "beacon.md", intermediate.InternalFunctions.Package(intermediate.BeaconPackage)) } diff --git a/client/command/addon/load.go b/client/command/addon/load.go index 413c0f78..48d1cc8f 100644 --- a/client/command/addon/load.go +++ b/client/command/addon/load.go @@ -4,13 +4,13 @@ import ( "fmt" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" "github.com/chainreactors/malice-network/helper/utils/pe" + "github.com/chainreactors/mals" "github.com/kballard/go-shellquote" "github.com/spf13/cobra" "math" @@ -20,7 +20,7 @@ import ( type loadedAddon struct { Command *cobra.Command - Func *intermediate.InternalFunc + Func *mals.MalFunction } func LoadAddonCmd(cmd *cobra.Command, con *repl.Console) { diff --git a/client/command/alias/load.go b/client/command/alias/load.go index f2c4c4e5..f75c063a 100644 --- a/client/command/alias/load.go +++ b/client/command/alias/load.go @@ -7,13 +7,13 @@ import ( "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/command/help" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" "github.com/chainreactors/malice-network/helper/utils/fileutils" + "github.com/chainreactors/mals" "github.com/kballard/go-shellquote" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -46,7 +46,7 @@ var ( type loadedAlias struct { Manifest *AliasManifest Command *cobra.Command - Func *intermediate.InternalFunc + Func *mals.MalFunction } // AliasFile - An OS/Arch specific file diff --git a/client/command/build/command.go b/client/command/build/command.go index 4238eb38..1aa2d3ad 100644 --- a/client/command/build/command.go +++ b/client/command/build/command.go @@ -2,13 +2,13 @@ package build import ( "fmt" - "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/mals" "github.com/rsteube/carapace" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -405,7 +405,7 @@ artifact delete --name artifact_name } func Register(con *repl.Console) { - con.RegisterServerFunc("search_artifact", SearchArtifact, &intermediate.Helper{ + con.RegisterServerFunc("search_artifact", SearchArtifact, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "search build artifact with arch,os,typ and pipeline id", Input: []string{ @@ -432,7 +432,7 @@ func Register(con *repl.Console) { return nil, err } return artifact, nil - }, &intermediate.Helper{ + }, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "get artifact with session self", Input: []string{ @@ -444,17 +444,17 @@ func Register(con *repl.Console) { }, }) - con.RegisterServerFunc("upload_artifact", UploadArtifact, &intermediate.Helper{ + con.RegisterServerFunc("upload_artifact", UploadArtifact, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "upload local bin to server build", }) - con.RegisterServerFunc("download_artifact", DownloadArtifact, &intermediate.Helper{ + con.RegisterServerFunc("download_artifact", DownloadArtifact, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "download artifact with special build id", }) - con.RegisterServerFunc("delete_artifact", DeleteArtifact, &intermediate.Helper{ + con.RegisterServerFunc("delete_artifact", DeleteArtifact, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "delete artifact with special build name", }) @@ -465,7 +465,7 @@ func Register(con *repl.Console) { return "", err } return string(artifact.Bin), nil - }, &intermediate.Helper{ + }, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "get self artifact stager shellcode", Input: []string{ @@ -483,7 +483,7 @@ func Register(con *repl.Console) { return "", err } return string(artifact.Bin), nil - }, &intermediate.Helper{ + }, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "get artifact stager shellcode", Input: []string{ @@ -503,7 +503,7 @@ func Register(con *repl.Console) { return "", fmt.Errorf("get artifact error: %s", err) } return string(artifact.Bin), nil - }, &intermediate.Helper{ + }, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "get self artifact stageless shellcode", Input: []string{ @@ -521,7 +521,7 @@ func Register(con *repl.Console) { return "", err } return string(artifact.Bin), nil - }, &intermediate.Helper{ + }, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "get artifact stageless shellcode", Input: []string{ diff --git a/client/command/extension/load.go b/client/command/extension/load.go index 95f5bee1..1beb4528 100644 --- a/client/command/extension/load.go +++ b/client/command/extension/load.go @@ -2,6 +2,7 @@ package extension import ( "bytes" + "encoding/binary" "encoding/json" "errors" "fmt" @@ -9,7 +10,6 @@ import ( "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/command/help" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" @@ -17,10 +17,12 @@ import ( "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" "github.com/chainreactors/malice-network/helper/utils/fileutils" "github.com/chainreactors/malice-network/helper/utils/pe" + "github.com/chainreactors/mals" "github.com/chainreactors/tui" "github.com/rsteube/carapace" "github.com/spf13/cobra" "github.com/spf13/pflag" + "golang.org/x/text/encoding/unicode" "os" "path/filepath" "strconv" @@ -78,7 +80,7 @@ type ExtensionManifest struct { type loadedExt struct { Manifest *ExtCommand Command *cobra.Command - Func *intermediate.InternalFunc + Func *mals.MalFunction } type ExtCommand struct { CommandName string `json:"command_name"` @@ -536,7 +538,7 @@ func makeExtensionArgCompleter(extCmd *ExtCommand, _ *cobra.Command, comps *cara func getExtArgs(_ *cobra.Command, args []string, _ string, ext *ExtCommand) ([]byte, error) { var err error - argsBuffer := pe.BOFArgsBuffer{ + argsBuffer := BOFArgsBuffer{ Buffer: new(bytes.Buffer), } @@ -629,7 +631,7 @@ func getBOFArgs(cmd *cobra.Command, args []string, binPath string, ext *ExtComma } // Now build the extension's argument buffer - extensionArgsBuffer := pe.IoMBOFArgsBuffer{} + extensionArgsBuffer := pe.BOFArgsBuffer{} err = extensionArgsBuffer.AddString(ext.Entrypoint) if err != nil { return nil, err @@ -648,3 +650,62 @@ func getBOFArgs(cmd *cobra.Command, args []string, binPath string, ext *ExtComma } return extensionArgsBuffer.GetArgs(), nil } + +type BOFArgsBuffer struct { + Buffer *bytes.Buffer +} + +func (b *BOFArgsBuffer) AddData(d []byte) error { + dataLen := uint32(len(d)) + err := binary.Write(b.Buffer, binary.LittleEndian, &dataLen) + if err != nil { + return err + } + return binary.Write(b.Buffer, binary.LittleEndian, &d) +} + +func (b *BOFArgsBuffer) AddShort(d uint16) error { + return binary.Write(b.Buffer, binary.LittleEndian, &d) +} + +func (b *BOFArgsBuffer) AddInt(d uint32) error { + return binary.Write(b.Buffer, binary.LittleEndian, &d) +} + +func (b *BOFArgsBuffer) AddString(d string) error { + stringLen := uint32(len(d)) + 1 + err := binary.Write(b.Buffer, binary.LittleEndian, &stringLen) + if err != nil { + return err + } + dBytes := append([]byte(d), 0x00) + return binary.Write(b.Buffer, binary.LittleEndian, dBytes) +} + +func (b *BOFArgsBuffer) AddWString(d string) error { + encoder := unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM).NewEncoder() + strBytes := append([]byte(d), 0x00) + utf16Data, err := encoder.Bytes(strBytes) + if err != nil { + return err + } + stringLen := uint32(len(utf16Data)) + err = binary.Write(b.Buffer, binary.LittleEndian, &stringLen) + if err != nil { + return err + } + return binary.Write(b.Buffer, binary.LittleEndian, utf16Data) +} + +func (b *BOFArgsBuffer) GetBuffer() ([]byte, error) { + outBuffer := new(bytes.Buffer) + err := binary.Write(outBuffer, binary.LittleEndian, uint32(b.Buffer.Len())) + if err != nil { + return nil, err + } + err = binary.Write(outBuffer, binary.LittleEndian, b.Buffer.Bytes()) + if err != nil { + return nil, err + } + return outBuffer.Bytes(), nil +} diff --git a/client/command/file/commands.go b/client/command/file/commands.go index 0574a6f8..b121ca6f 100644 --- a/client/command/file/commands.go +++ b/client/command/file/commands.go @@ -2,11 +2,11 @@ package file import ( "fmt" + "github.com/chainreactors/malice-network/client/core/intermediate" "path/filepath" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" diff --git a/client/command/generic/commands.go b/client/command/generic/commands.go index ed457737..a959f30c 100644 --- a/client/command/generic/commands.go +++ b/client/command/generic/commands.go @@ -9,6 +9,7 @@ import ( "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/mals" "github.com/spf13/cobra" "github.com/spf13/pflag" "os" @@ -149,7 +150,7 @@ func Register(con *repl.Console) { con.RegisterServerFunc("active", func(con *repl.Console) (*core.Session, error) { return con.GetInteractive().Clone(consts.CalleeMal), nil - }, &intermediate.Helper{ + }, &mals.Helper{ Short: "get current session", Output: []string{"sess"}, Example: "active()", diff --git a/client/command/mutant/commands.go b/client/command/mutant/commands.go index 9d47acce..fa9f9d66 100644 --- a/client/command/mutant/commands.go +++ b/client/command/mutant/commands.go @@ -7,6 +7,7 @@ import ( "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/utils/donut" + "github.com/chainreactors/mals" "github.com/rsteube/carapace" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -145,7 +146,7 @@ srdi --id artifact_id --target x86_64-pc-windows-msvc } func Register(con *repl.Console) { - con.RegisterServerFunc("malefic_srdi", MaleficSRDI, &intermediate.Helper{ + con.RegisterServerFunc("malefic_srdi", MaleficSRDI, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "malefic srdi", }) @@ -158,7 +159,7 @@ func Register(con *repl.Console) { } return string(bin), nil }) - intermediate.AddHelper("exe2shellcode", &intermediate.Helper{ + intermediate.AddHelper("exe2shellcode", &mals.Helper{ Group: intermediate.GroupArtifact, Short: "exe to shellcode with donut", Input: []string{ @@ -178,7 +179,7 @@ func Register(con *repl.Console) { } return string(bin), nil }) - intermediate.AddHelper("dll2shellcode", &intermediate.Helper{ + intermediate.AddHelper("dll2shellcode", &mals.Helper{ Group: intermediate.GroupArtifact, Short: "dll to shellcode with donut", Input: []string{ @@ -192,7 +193,7 @@ func Register(con *repl.Console) { }) intermediate.RegisterFunction("clr2shellcode", donut.DonutFromAssemblyFromFile) - intermediate.AddHelper("clr2shellcode", &intermediate.Helper{ + intermediate.AddHelper("clr2shellcode", &mals.Helper{ Group: intermediate.GroupArtifact, Short: "clr to shellcode with donut", Input: []string{ @@ -209,7 +210,7 @@ func Register(con *repl.Console) { }) intermediate.RegisterFunction("donut", donut.DonutShellcodeFromFile) - intermediate.AddHelper("donut", &intermediate.Helper{ + intermediate.AddHelper("donut", &mals.Helper{ Group: intermediate.GroupArtifact, Short: "Generates x86, x64, or AMD64+x86 position-independent shellcode that loads .NET Assemblies, PE files, and other Windows payloads from memory and runs them with parameters ", Input: []string{ @@ -234,7 +235,7 @@ func Register(con *repl.Console) { return "", err } return string(bin.Bin), nil - }, &intermediate.Helper{ + }, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "dll/exe to shellcode with srdi", Input: []string{ @@ -259,7 +260,7 @@ func Register(con *repl.Console) { return "", err } return string(bin.Bin), nil - }, &intermediate.Helper{ + }, &mals.Helper{ Group: intermediate.GroupArtifact, Short: "shellcode encode with sgn", Input: []string{ diff --git a/client/command/sessions/new.go b/client/command/sessions/new.go index a7ea21a3..9751709a 100644 --- a/client/command/sessions/new.go +++ b/client/command/sessions/new.go @@ -2,7 +2,6 @@ package sessions import ( "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/cryptography" @@ -10,6 +9,7 @@ import ( "github.com/chainreactors/malice-network/helper/encoders/hash" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" + "github.com/chainreactors/mals" "github.com/spf13/cobra" ) @@ -56,7 +56,7 @@ func NewBindSession(con *repl.Console, PipelineID string, target string, name st } func RegisterNewSessionFunc(con *repl.Console) { - con.RegisterServerFunc("new_bind_session", NewBindSession, &intermediate.Helper{ + con.RegisterServerFunc("new_bind_session", NewBindSession, &mals.Helper{ Short: "new bind session", Example: `new_bind_session("listener_id", "target", "name")`, Input: []string{ diff --git a/client/core/intermediate/builtin.go b/client/core/intermediate/builtin.go index 2186548a..669155d7 100644 --- a/client/core/intermediate/builtin.go +++ b/client/core/intermediate/builtin.go @@ -1,10 +1,11 @@ package intermediate import ( - "context" "crypto/rand" "encoding/base64" "fmt" + "github.com/chainreactors/mals" + "github.com/kballard/go-shellquote" "math/big" "os" "reflect" @@ -21,10 +22,7 @@ import ( "github.com/chainreactors/malice-network/helper/types" "github.com/chainreactors/malice-network/helper/utils/fileutils" "github.com/chainreactors/malice-network/helper/utils/handler" - "github.com/chainreactors/malice-network/helper/utils/mals" "github.com/chainreactors/malice-network/helper/utils/pe" - "github.com/kballard/go-shellquote" - "google.golang.org/protobuf/proto" ) const ( @@ -36,7 +34,7 @@ type BuiltinCallback func(content interface{}) (bool, error) func RegisterBuiltin(rpc clientrpc.MaliceRPCClient) { RegisterCustomBuiltin(rpc) - RegisterGRPCBuiltin(rpc) + mals.RegisterGRPCBuiltin(RpcPackage, rpc) RegisterEncodeFunc(rpc) } @@ -48,7 +46,7 @@ func RegisterCustomBuiltin(rpc clientrpc.MaliceRPCClient) { AddHelper( "new_sacrifice", - &Helper{ + &mals.Helper{ Short: "new sacrifice process config", Input: []string{ "ppid: parent process id", @@ -75,7 +73,7 @@ sac = new_sacrifice(123, false, false, false, "") return NewExecutable(module, filename, cmdline, "x86", sacrifice) }) AddHelper("new_86_executable", - &Helper{ + &mals.Helper{ Short: "new x86 process execute binary config", Input: []string{ "module", @@ -100,7 +98,7 @@ new_86_exec = new_86_executable("module", "filename", "args", sac) return NewExecutable(module, filename, cmdline, "amd64", sacrifice) }) AddHelper("new_64_executable", - &Helper{ + &mals.Helper{ Short: "new x64 process execute binary config", Input: []string{ "module", @@ -140,7 +138,7 @@ new_64_exec = new_64_executable("module", "filename", "args", sac) AddHelper( "new_bypass", - &Helper{ + &mals.Helper{ Short: "new bypass options", Input: []string{ "bypassAMSI", @@ -158,7 +156,7 @@ params = new_bypass(true, true, true) AddHelper( "new_bypass_all", - &Helper{ + &mals.Helper{ Short: "new bypass all options", Input: []string{}, Output: []string{ @@ -177,7 +175,7 @@ params = new_bypass_all() }) AddHelper("new_binary", - &Helper{ + &mals.Helper{ Short: "new execute binary config", Input: []string{ "module", @@ -265,76 +263,7 @@ new_bin = new_binary("module", "filename", "args", true, 100, "amd64", "process" } -func RegisterGRPCBuiltin(rpc clientrpc.MaliceRPCClient) { - rpcType := reflect.TypeOf(rpc) - rpcValue := reflect.ValueOf(rpc) - - for i := 0; i < rpcType.NumMethod(); i++ { - method := rpcType.Method(i) - methodName := method.Name - - // 忽略流式方法 - methodReturnType := method.Type.Out(0) - if methodReturnType.Kind() == reflect.Interface && methodReturnType.Name() == "ClientStream" { - continue - } - - // 将方法包装为 InternalFunc - rpcFunc := func(args ...interface{}) (interface{}, error) { - if len(args) != 2 { - return nil, fmt.Errorf("expected 2 arguments: context and proto.Message") - } - - ctx, ok := args[0].(context.Context) - if !ok { - return nil, fmt.Errorf("first argument must be context.Context") - } - - msg, ok := args[1].(proto.Message) - if !ok { - return nil, fmt.Errorf("second argument must be proto.Message") - } - - // 准备调用方法的参数列表 - callArgs := []reflect.Value{ - reflect.ValueOf(ctx), // context.Context - reflect.ValueOf(msg), // proto.Message - } - - // 调用方法 - results := rpcValue.MethodByName(methodName).Call(callArgs) - - // 处理返回值 - var result interface{} - if len(results) > 0 { - result = results[0].Interface() - } - - var err error - if len(results) > 1 { - if e, ok := results[1].Interface().(error); ok { - err = e - } - } - - return result, err - } - - // 创建 InternalFunc 实例并设置真实的参数和返回值类型 - internalFunc := GetInternalFuncSignature(method.Func.Interface()) - internalFunc.Func = rpcFunc - internalFunc.ArgTypes = internalFunc.ArgTypes[1:3] - - err := RegisterInternalFunc(RpcPackage, methodName, internalFunc, nil) - if err != nil { - logs.Log.Errorf(err.Error()) - return - } - } -} - func RegisterEncodeFunc(rpc clientrpc.MaliceRPCClient) { - // bof 参数格式化 // single arg, pack_bof("Z", "aa") RegisterFunction("pack_bof", func(format string, arg string) (string, error) { @@ -344,7 +273,7 @@ func RegisterEncodeFunc(rpc clientrpc.MaliceRPCClient) { return pe.PackArg(format[0], arg) }) AddHelper("pack_bof", - &Helper{ + &mals.Helper{ Short: "pack bof single argument", Input: []string{ "format", @@ -370,7 +299,7 @@ func RegisterEncodeFunc(rpc clientrpc.MaliceRPCClient) { AddHelper( "pack_bof_args", - &Helper{ + &mals.Helper{ Short: "pack bof arguments", Input: []string{ "format", @@ -385,8 +314,8 @@ pack_bof_args("ZZ", {"aa", "bb"}) }) // mal pack - RegisterFunction("mal_pack_binary", func(data string) (string, error) { - return mals.PackMalBinary(data), nil + RegisterFunction("pack_binary", func(data string) (string, error) { + return pe.PackBinary(data), nil }) RegisterFunction("format_path", func(s string) (string, error) { @@ -394,7 +323,7 @@ pack_bof_args("ZZ", {"aa", "bb"}) }) AddHelper( "format_path", - &Helper{ + &mals.Helper{ Short: "format windows path", Input: []string{ "s", @@ -412,7 +341,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "base64_encode", - &Helper{ + &mals.Helper{ Group: GroupEncode, CMDName: "base64_encode", Input: []string{ @@ -434,7 +363,7 @@ format_path("C:\\Windows\\System32\\calc.exe") AddHelper( "base64_decode", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "base64 decode", Input: []string{ @@ -451,7 +380,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "arg_hex", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "hexlify encode", Input: []string{ @@ -475,7 +404,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "random_string", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "generate random string", Input: []string{ @@ -499,7 +428,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "file_exists", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "check file exists", Input: []string{ @@ -525,7 +454,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "ismatch", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "regexp match", Input: []string{ @@ -546,7 +475,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "timestampMillis", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "get current timestamp in milliseconds", Input: []string{}, @@ -581,7 +510,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "parse_octal", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "parse octal string to int64", Input: []string{ @@ -603,7 +532,7 @@ format_path("C:\\Windows\\System32\\calc.exe") }) AddHelper( "parse_hex", - &Helper{ + &mals.Helper{ Group: GroupEncode, Short: "parse hex string to int64", Input: []string{ diff --git a/client/core/intermediate/function.go b/client/core/intermediate/function.go index d402bee8..1fda5e0a 100644 --- a/client/core/intermediate/function.go +++ b/client/core/intermediate/function.go @@ -5,9 +5,7 @@ import ( "fmt" "github.com/chainreactors/logs" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" - "path/filepath" - "reflect" - "runtime" + "github.com/chainreactors/mals" "strings" ) @@ -17,94 +15,57 @@ var ( WarnReturnMismatch = errors.New("return values mismatch") ) -type Helper struct { - Group string - Short string - Long string - Input []string - Output []string - Example string - CMDName string +type InternalFunc struct { + *mals.MalFunction + FinishCallback ImplantCallback // implant callback + DoneCallback ImplantCallback } -func (help *Helper) FormatInput() ([]string, []string) { - var keys, values []string - if help.Input == nil { - return keys, values - } +// callback to callee, like lua or go, return string +type ImplantCallback func(content *clientpb.TaskContext) (string, error) - for _, input := range help.Input { - i := strings.Index(input, ":") - if i == -1 { - keys = append(keys, input) - values = append(values, "") - } else { - keys = append(keys, input[:i]) - values = append(values, input[i+1:]) - } - } - return keys, values -} +var InternalFunctions = make(internalFuncs) -func (help *Helper) FormatOutput() ([]string, []string) { - var keys, values []string - if help.Output == nil { - return keys, values - } +type internalFuncs map[string]*InternalFunc - for _, output := range help.Output { - i := strings.Index(output, ":") - if i == -1 { - keys = append(keys, output) - values = append(values, "") - } else { - keys = append(keys, output[:i]) - values = append(values, output[i+1:]) - } +func (fns internalFuncs) All() map[string]*mals.MalFunction { + ret := make(map[string]*mals.MalFunction) + for k, v := range fns { + ret[k] = v.MalFunction } - return keys, values -} - -type InternalFunc struct { - Name string - Package string - RawName string - Raw interface{} - Func func(...interface{}) (interface{}, error) - HasLuaCallback bool - NoCache bool - FinishCallback ImplantCallback // implant callback - DoneCallback ImplantCallback - ArgTypes []reflect.Type - ReturnTypes []reflect.Type - *Helper + return ret } -func (fn *InternalFunc) String() string { - return fmt.Sprintf("%s.%s", fn.Package, fn.Name) +// package +func (fns internalFuncs) Package(pkg string) map[string]*mals.MalFunction { + ret := make(map[string]*mals.MalFunction) + for k, v := range fns { + if v.Package == pkg { + ret[k] = v.MalFunction + } + } + return ret } -// callback to callee, like lua or go, return string -type ImplantCallback func(content *clientpb.TaskContext) (string, error) - -var InternalFunctions = make(map[string]*InternalFunc) - // RegisterInternalFunc 注册并生成 Lua 定义文件 -func RegisterInternalFunc(pkg, name string, fn *InternalFunc, callback ImplantCallback) error { +func RegisterInternalFunc(pkg, name string, fn *mals.MalFunction, callback ImplantCallback) error { fn.Package = pkg name = strings.ReplaceAll(name, "-", "_") + fn.Name = name + ifn := &InternalFunc{ + MalFunction: fn, + } if callback != nil { - fn.FinishCallback = callback + ifn.FinishCallback = callback } if _, ok := InternalFunctions[name]; ok { return fmt.Errorf("function %s already registered", name) } - fn.Name = name - InternalFunctions[name] = fn + InternalFunctions[name] = ifn return nil } -func AddHelper(name string, helper *Helper) error { +func AddHelper(name string, helper *mals.Helper) error { name = strings.ReplaceAll(name, "-", "_") if fn, ok := InternalFunctions[name]; ok { if helper.Input != nil && len(helper.Input) != len(fn.ArgTypes) { @@ -130,82 +91,8 @@ func RegisterInternalDoneCallback(name string, callback ImplantCallback) error { } func RegisterFunction(name string, fn interface{}) { - wrappedFunc := WrapInternalFunc(fn) - err := RegisterInternalFunc(BuiltinPackage, name, wrappedFunc, nil) + err := RegisterInternalFunc(BuiltinPackage, name, mals.WrapInternalFunc(fn), nil) if err != nil { return } } - -// 获取函数的参数和返回值类型 -func GetInternalFuncSignature(fn interface{}) *InternalFunc { - fnType := reflect.TypeOf(fn) - - // 获取参数类型 - numArgs := fnType.NumIn() - argTypes := make([]reflect.Type, numArgs) - for i := 0; i < numArgs; i++ { - argTypes[i] = fnType.In(i) - } - - // 获取返回值类型 - numReturns := fnType.NumOut() - // 如果最后一个返回值是 error 类型,忽略它 - if numReturns > 0 && fnType.Out(numReturns-1) == reflect.TypeOf((*error)(nil)).Elem() { - numReturns-- - } - returnTypes := make([]reflect.Type, numReturns) - for i := 0; i < numReturns; i++ { - returnTypes[i] = fnType.Out(i) - } - return &InternalFunc{ - Raw: fn, - RawName: filepath.Base(runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name()), - ArgTypes: argTypes, - ReturnTypes: returnTypes, - } -} - -func WrapInternalFunc(fun interface{}) *InternalFunc { - internalFunc := GetInternalFuncSignature(fun) - - internalFunc.Func = func(params ...interface{}) (interface{}, error) { - funcValue := reflect.ValueOf(fun) - funcType := funcValue.Type() - - // 检查函数的参数数量是否匹配 - if funcType.NumIn() != len(params) { - return nil, fmt.Errorf("expected %d arguments, got %d", funcType.NumIn(), len(params)) - } - - // 构建参数切片并检查参数类型 - in := make([]reflect.Value, len(params)) - for i, param := range params { - expectedType := funcType.In(i) - if reflect.TypeOf(param) != expectedType { - return nil, fmt.Errorf("argument %d should be %v, got %v", i+1, expectedType, reflect.TypeOf(param)) - } - in[i] = reflect.ValueOf(param) - } - - // 调用原始函数并获取返回值 - results := funcValue.Call(in) - - // 处理返回值 - var result interface{} - if len(results) > 0 { - result = results[0].Interface() - } - - var err error - // 如果函数返回了多个值,最后一个值通常是 error - if len(results) > 1 { - if e, ok := results[len(results)-1].Interface().(error); ok { - err = e - } - } - - return result, err - } - return internalFunc -} diff --git a/client/core/intermediate/lua.go b/client/core/intermediate/lua.go index f6d13805..d4221b76 100644 --- a/client/core/intermediate/lua.go +++ b/client/core/intermediate/lua.go @@ -1,359 +1,8 @@ package intermediate -import ( - "context" - "fmt" - "github.com/chainreactors/utils/iutils" - lua "github.com/yuin/gopher-lua" - "google.golang.org/protobuf/proto" - luar "layeh.com/gopher-luar" - "reflect" -) - -var ( - luaFunctionCache = map[string]lua.LGFunction{} -) - const ( BeaconPackage = "beacon" RpcPackage = "rpc" ArmoryPackage = "armory" BuiltinPackage = "builtin" ) - -func WrapFuncForLua(fn *InternalFunc) lua.LGFunction { - if luaFn, ok := luaFunctionCache[fn.String()]; ok { - return luaFn - } - - luaFn := func(vm *lua.LState) int { - var args []interface{} - top := vm.GetTop() - - // 检查最后一个参数是否为回调函数 - var callback *lua.LFunction - if top > 0 && fn.HasLuaCallback { - if vm.Get(top).Type() == lua.LTFunction { - callback = vm.Get(top).(*lua.LFunction) - top-- // 去掉回调函数,调整参数数量 - } - } - - // 将 Lua 参数转换为 Go 参数 - for i := 1; i <= top; i++ { - args = append(args, ConvertLuaValueToGo(vm.Get(i))) - } - args, err := ConvertArgsToExpectedTypes(args, fn.ArgTypes) - if err != nil { - vm.Error(lua.LString(fmt.Sprintf("Error: %v", err)), 1) - return 0 - } - // 调用 Go 函数 - result, err := fn.Func(args...) - if err != nil { - vm.Error(lua.LString(fmt.Sprintf("Error: %v", err)), 1) - return 0 - } - - // 如果有回调,调用回调函数 - if callback != nil { - vm.Push(callback) - vm.Push(ConvertGoValueToLua(vm, result)) - if err := vm.PCall(1, 1, nil); err != nil { // 期待一个返回值 - vm.Error(lua.LString(fmt.Sprintf("Callback Error: %v", err)), 1) - return 0 - } - - return 1 - } else { - vm.Push(ConvertGoValueToLua(vm, result)) - return 1 - } - } - if !fn.NoCache { - luaFunctionCache[fn.String()] = luaFn - } - - return luaFn -} - -// Convert the []interface{} and map[string]interface{} to the expected types defined in ArgTypes -func ConvertArgsToExpectedTypes(args []interface{}, argTypes []reflect.Type) ([]interface{}, error) { - if len(args) != len(argTypes) { - return nil, fmt.Errorf("argument count mismatch: expected %d, got %d", len(argTypes), len(args)) - } - - convertedArgs := make([]interface{}, len(args)) - - for i, arg := range args { - expectedType := argTypes[i] - val := reflect.ValueOf(arg) - - // Skip conversion if types are already identical - if val.Type() == expectedType { - convertedArgs[i] = arg - continue - } - - // Handle string conversion with ToString - if expectedType.Kind() == reflect.String { - convertedArgs[i] = iutils.ToString(arg) - continue - } - - // Handle slice conversion - if expectedType.Kind() == reflect.Slice && val.Kind() == reflect.Slice { - elemType := expectedType.Elem() - sliceVal := reflect.MakeSlice(expectedType, val.Len(), val.Len()) - for j := 0; j < val.Len(); j++ { - elem := val.Index(j) - convertedElem, err := convertValueToExpectedType(elem.Interface(), elemType) - if err != nil { - return nil, fmt.Errorf("cannot convert slice element at index %d: %v", j, err) - } - sliceVal.Index(j).Set(reflect.ValueOf(convertedElem)) - } - convertedArgs[i] = sliceVal.Interface() - continue - } - - // Handle map conversion - if expectedType.Kind() == reflect.Map && val.Kind() == reflect.Map { - keyType := expectedType.Key() - elemType := expectedType.Elem() - mapVal := reflect.MakeMap(expectedType) - for _, key := range val.MapKeys() { - convertedKey, err := convertValueToExpectedType(key.Interface(), keyType) - if err != nil { - return nil, fmt.Errorf("cannot convert map key %v: %v", key, err) - } - convertedValue, err := convertValueToExpectedType(val.MapIndex(key).Interface(), elemType) - if err != nil { - return nil, fmt.Errorf("cannot convert map value for key %v: %v", key, err) - } - mapVal.SetMapIndex(reflect.ValueOf(convertedKey), reflect.ValueOf(convertedValue)) - } - convertedArgs[i] = mapVal.Interface() - continue - } - - // Default conversion using reflect.Convert - if val.Type().ConvertibleTo(expectedType) { - convertedArgs[i] = val.Convert(expectedType).Interface() - } else { - return nil, fmt.Errorf("cannot convert argument %d to %s", i+1, expectedType) - } - } - return convertedArgs, nil -} - -// Helper function to convert individual values to the expected type -func convertValueToExpectedType(value interface{}, expectedType reflect.Type) (interface{}, error) { - val := reflect.ValueOf(value) - - // Skip conversion if types are already identical - if val.Type() == expectedType { - return value, nil - } - - // Handle string conversion - if expectedType.Kind() == reflect.String { - return iutils.ToString(value), nil - } - - // Handle slice conversion - if expectedType.Kind() == reflect.Slice && val.Kind() == reflect.Slice { - elemType := expectedType.Elem() - sliceVal := reflect.MakeSlice(expectedType, val.Len(), val.Len()) - for j := 0; j < val.Len(); j++ { - convertedElem, err := convertValueToExpectedType(val.Index(j).Interface(), elemType) - if err != nil { - return nil, fmt.Errorf("cannot convert slice element at index %d: %v", j, err) - } - sliceVal.Index(j).Set(reflect.ValueOf(convertedElem)) - } - return sliceVal.Interface(), nil - } - - // Handle map conversion - if expectedType.Kind() == reflect.Map && val.Kind() == reflect.Map { - keyType := expectedType.Key() - elemType := expectedType.Elem() - mapVal := reflect.MakeMap(expectedType) - for _, key := range val.MapKeys() { - convertedKey, err := convertValueToExpectedType(key.Interface(), keyType) - if err != nil { - return nil, fmt.Errorf("cannot convert map key %v: %v", key, err) - } - convertedValue, err := convertValueToExpectedType(val.MapIndex(key).Interface(), elemType) - if err != nil { - return nil, fmt.Errorf("cannot convert map value for key %v: %v", key, err) - } - mapVal.SetMapIndex(reflect.ValueOf(convertedKey), reflect.ValueOf(convertedValue)) - } - return mapVal.Interface(), nil - } - - // Default conversion - if val.Type().ConvertibleTo(expectedType) { - return val.Convert(expectedType).Interface(), nil - } - - return nil, fmt.Errorf("cannot convert value to %s", expectedType) -} - -func isArray(tbl *lua.LTable) bool { - length := tbl.Len() // Length of the array part - count := 0 - isSequential := true - tbl.ForEach(func(key, val lua.LValue) { - if k, ok := key.(lua.LNumber); ok { - index := int(k) - if index != count+1 { - isSequential = false - } - count++ - } else { - isSequential = false - } - }) - return isSequential && count == length -} - -// ConvertLuaTableToGo takes a Lua table and converts it into a Go slice or map -func ConvertLuaTableToGo(tbl *lua.LTable) interface{} { - // Check if the Lua table is an array (keys are sequential integers starting from 1) - if isArray(tbl) { - // Convert to Go slice - var array []interface{} - tbl.ForEach(func(key, val lua.LValue) { - array = append(array, ConvertLuaValueToGo(val)) - }) - return array - } - - // Otherwise, convert to Go map - m := make(map[string]interface{}) - tbl.ForEach(func(key, val lua.LValue) { - m[key.String()] = ConvertLuaValueToGo(val) - }) - return m -} - -func ConvertLuaValueToGo(value lua.LValue) interface{} { - switch v := value.(type) { - case lua.LString: - return string(v) - case lua.LNumber: - if v == lua.LNumber(int64(v)) { - return int64(v) - } - return float64(v) - case lua.LBool: - return bool(v) - case *lua.LTable: - return ConvertLuaTableToGo(v) - case *lua.LUserData: - switch v.Value.(type) { - case proto.Message: - return v.Value.(proto.Message) - default: - stringer, ok := v.Value.(fmt.Stringer) - if ok { - return stringer.String() - } else { - return v.Value - } - } - - case *lua.LNilType: - return nil - case *lua.LFunction: - return v - default: - return v.String() - } -} - -// 将 Lua 的 lua.LValue 转换为 Go 的 interface{} -func ConvertGoValueToLua(L *lua.LState, value interface{}) lua.LValue { - switch v := value.(type) { - case proto.Message: - // 如果是 proto.Message 类型,将其封装为 LUserData 并设置元表 - ud := L.NewUserData() - ud.Value = v - L.SetMetatable(ud, L.GetTypeMetatable("ProtobufMessage")) - return ud - case []string: - // 如果是 []string 类型,将其转换为 Lua 表 - luaTable := L.NewTable() - for _, str := range v { - luaTable.Append(lua.LString(str)) // 将每个 string 添加到表中 - } - return luaTable - default: - return luar.New(L, value) - } -} - -func ConvertGoValueToLuaType(L *lua.LState, t reflect.Type) string { - switch t.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Float32, reflect.Float64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return "number" - case reflect.Bool: - return "boolean" - case reflect.String: - return "string" - case reflect.Slice: - if t.Elem().Kind() == reflect.String { - return "table" - } - return "table" - case reflect.Ptr: - if t.Implements(reflect.TypeOf((*proto.Message)(nil)).Elem()) { - return t.Elem().Name() - } - if t.Elem().Kind() == reflect.Struct { - return "table" - } - return ConvertGoValueToLuaType(L, t.Elem()) // 递归处理指针类型 - case reflect.Func: - return "function" - default: - if t.Implements(reflect.TypeOf((*context.Context)(nil)).Elem()) { - return "context" - } - return "any" - } -} - -func ConvertNumericType(value int64, kind reflect.Kind) interface{} { - switch kind { - case reflect.Int: - return int(value) - case reflect.Int8: - return int8(value) - case reflect.Int16: - return int16(value) - case reflect.Int32: - return int32(value) - case reflect.Int64: - return int64(value) - case reflect.Uint: - return uint(value) - case reflect.Uint8: - return uint8(value) - case reflect.Uint16: - return uint16(value) - case reflect.Uint32: - return uint32(value) - case reflect.Uint64: - return uint64(value) - case reflect.Float32: - return float32(value) - case reflect.Float64: - return value - default: - return value // 其他类型,保持不变 - } -} diff --git a/client/core/intermediate/utils.go b/client/core/intermediate/utils.go index 221a7ae9..8e0e4863 100644 --- a/client/core/intermediate/utils.go +++ b/client/core/intermediate/utils.go @@ -3,12 +3,12 @@ package intermediate import ( "context" "fmt" + "github.com/chainreactors/malice-network/helper/utils/fileutils" "github.com/chainreactors/malice-network/helper/utils/pe" "math" "os" "path/filepath" - "github.com/chainreactors/files" "github.com/chainreactors/logs" "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/helper/consts" @@ -20,7 +20,7 @@ import ( func GetResourceFile(pluginName, filename string) (string, error) { resourceFile := filepath.Join(assets.GetMalsDir(), pluginName, "resources", filename) - if files.IsExist(resourceFile) { + if fileutils.Exist(resourceFile) { return resourceFile, nil } return "", fmt.Errorf("file not found") @@ -28,7 +28,7 @@ func GetResourceFile(pluginName, filename string) (string, error) { func GetGlobalResourceFile(filename string) (string, error) { resourceFile := filepath.Join(assets.GetResourceDir(), filename) - if files.IsExist(resourceFile) { + if fileutils.Exist(resourceFile) { return resourceFile, nil } return "", fmt.Errorf("file not found") diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index f49c612b..e57d5aad 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -9,46 +9,17 @@ import ( "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/types" - "github.com/cjoudrey/gluahttp" + "github.com/chainreactors/mals" "github.com/kballard/go-shellquote" "github.com/spf13/cobra" - luacrypto "github.com/tengattack/gluacrypto/crypto" - "github.com/vadv/gopher-lua-libs/argparse" - "github.com/vadv/gopher-lua-libs/base64" - "github.com/vadv/gopher-lua-libs/cmd" - "github.com/vadv/gopher-lua-libs/db" - luafilepath "github.com/vadv/gopher-lua-libs/filepath" - "github.com/vadv/gopher-lua-libs/goos" - "github.com/vadv/gopher-lua-libs/humanize" - "github.com/vadv/gopher-lua-libs/inspect" - "github.com/vadv/gopher-lua-libs/ioutil" - "github.com/vadv/gopher-lua-libs/json" - "github.com/vadv/gopher-lua-libs/log" - "github.com/vadv/gopher-lua-libs/plugin" - "github.com/vadv/gopher-lua-libs/regexp" - "github.com/vadv/gopher-lua-libs/shellescape" - "github.com/vadv/gopher-lua-libs/stats" - "github.com/vadv/gopher-lua-libs/storage" - luastrings "github.com/vadv/gopher-lua-libs/strings" - "github.com/vadv/gopher-lua-libs/tcp" - "github.com/vadv/gopher-lua-libs/template" - "github.com/vadv/gopher-lua-libs/time" - luayaml "github.com/vadv/gopher-lua-libs/yaml" lua "github.com/yuin/gopher-lua" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "net/http" "os" "path/filepath" "reflect" "slices" - "sort" "strconv" "strings" "sync" - "unicode" ) var ( @@ -234,7 +205,7 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { case "cmdline": vm.Push(lua.LString(shellquote.Join(args...))) case "args": - vm.Push(intermediate.ConvertGoValueToLua(vm, args)) + vm.Push(mals.ConvertGoValueToLua(vm, args)) default: val, err := cmd.Flags().GetString(paramName) if err != nil { @@ -275,7 +246,7 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { for i := 1; i <= resultCount; i++ { // 从栈顶依次弹出返回值 result := vm.Get(-resultCount + i - 1) - _, err := outFunc(intermediate.ConvertLuaValueToGo(result)) + _, err := outFunc(mals.ConvertLuaValueToGo(result)) if err != nil { logs.Log.Errorf("error calling outFunc:\n%s", err.Error()) return @@ -310,7 +281,7 @@ func (plug *LuaPlugin) registerLuaOnHook(name string, condition intermediate.Eve plug.lock.Lock() defer plug.lock.Unlock() vm.Push(fn) - vm.Push(intermediate.ConvertGoValueToLua(vm, event)) + vm.Push(mals.ConvertGoValueToLua(vm, event)) if err := vm.PCall(1, lua.MultRet, nil); err != nil { return false, fmt.Errorf("error calling Lua function %s: %w", name, err) @@ -324,581 +295,26 @@ func (plug *LuaPlugin) registerLuaOnHook(name string, condition intermediate.Eve func (plug *LuaPlugin) registerLuaFunction(name string, fn interface{}) { vm := plug.vm - wrappedFunc := intermediate.WrapInternalFunc(fn) + wrappedFunc := mals.WrapInternalFunc(fn) wrappedFunc.Package = intermediate.BuiltinPackage wrappedFunc.Name = name wrappedFunc.NoCache = true - vm.SetGlobal(name, vm.NewFunction(intermediate.WrapFuncForLua(wrappedFunc))) + vm.SetGlobal(name, vm.NewFunction(mals.WrapFuncForLua(wrappedFunc))) } -func globalLoader(plug *DefaultPlugin) func(L *lua.LState) int { - return func(L *lua.LState) int { - if err := L.DoString(string(plug.Content)); err != nil { - logs.Log.Errorf("error loading Lua global script: %s", err.Error()) - } - mod := L.Get(-1) - L.Pop(1) - - if mod.Type() != lua.LTTable { - mod = L.NewTable() - } - L.SetField(mod, "_NAME", lua.LString(plug.Name)) - L.Push(mod) - return 1 - } -} - -func luaLoader(L *lua.LState) int { - // 从 LState 获取传入的包名 - packageName := L.ToString(1) - - mod := L.NewTable() - L.SetField(mod, "_NAME", lua.LString(packageName)) - // 查找 InternalFunctions 中属于该包的函数并注册 - for _, fn := range intermediate.InternalFunctions { - if fn.Package == packageName { - mod.RawSetString(fn.Name, L.NewFunction(intermediate.WrapFuncForLua(fn))) - } - } - - // 如果没有找到函数,则返回空表 - L.Push(mod) - return 1 -} - -func LoadLib(vm *lua.LState) { - vm.OpenLibs() - - // https://github.com/vadv/gopher-lua-libs - plugin.Preload(vm) - argparse.Preload(vm) - base64.Preload(vm) - luafilepath.Preload(vm) - goos.Preload(vm) - humanize.Preload(vm) - inspect.Preload(vm) - ioutil.Preload(vm) - json.Preload(vm) - //pprof.Preload(vm) - regexp.Preload(vm) - //runtime.Preload(vm) - shellescape.Preload(vm) - storage.Preload(vm) - luastrings.Preload(vm) - tcp.Preload(vm) - time.Preload(vm) - stats.Loader(vm) - //xmlpath.Preload(vm) - luayaml.Preload(vm) - db.Loader(vm) - template.Loader(vm) - log.Loader(vm) - cmd.Loader(vm) - - vm.PreloadModule("http", gluahttp.NewHttpModule(&http.Client{}).Loader) - vm.PreloadModule("crypto", luacrypto.Loader) - - // mal package - vm.PreloadModule(intermediate.BeaconPackage, luaLoader) - vm.PreloadModule(intermediate.RpcPackage, luaLoader) - vm.PreloadModule(intermediate.ArmoryPackage, luaLoader) - +func NewLuaVM() *lua.LState { + vm := mals.NewLuaVM() + mals.RegisterProtobufMessagesFromPackage(vm, "implantpb") + mals.RegisterProtobufMessagesFromPackage(vm, "clientpb") + mals.RegisterProtobufMessagesFromPackage(vm, "modulepb") + vm.PreloadModule(intermediate.BeaconPackage, mals.PackageLoader(intermediate.InternalFunctions.Package(intermediate.BeaconPackage))) + vm.PreloadModule(intermediate.RpcPackage, mals.PackageLoader(intermediate.InternalFunctions.Package(intermediate.RpcPackage))) for _, global := range GlobalPlugins { - vm.PreloadModule(global.Name, globalLoader(global)) + vm.PreloadModule(global.Name, mals.GlobalLoader(global.Name, global.Content)) } -} -func NewLuaVM() *lua.LState { - vm := lua.NewState() - LoadLib(vm) - RegisterProtobufMessageType(vm) - RegisterAllProtobufMessages(vm) - - for name, fun := range intermediate.InternalFunctions { - if fun.Package != intermediate.BuiltinPackage { - continue - } - vm.SetGlobal(name, vm.NewFunction(intermediate.WrapFuncForLua(fun))) + for name, fun := range intermediate.InternalFunctions.Package(intermediate.BuiltinPackage) { + vm.SetGlobal(name, vm.NewFunction(mals.WrapFuncForLua(fun))) } return vm } - -// // 注册 Protobuf Message 的类型和方法 -func RegisterProtobufMessageType(L *lua.LState) { - mt := L.NewTypeMetatable("ProtobufMessage") - L.SetGlobal("ProtobufMessage", mt) - - // 注册 __index 和 __newindex 元方法 - L.SetField(mt, "__index", L.NewFunction(protoIndex)) - L.SetField(mt, "__newindex", L.NewFunction(protoNewIndex)) - - // 注册 __tostring 元方法 - L.SetField(mt, "__tostring", L.NewFunction(protoToString)) - - L.SetField(mt, "New", L.NewFunction(protoNew)) -} - -func GenerateLuaDefinitionFile(L *lua.LState, filename string) error { - file, err := os.Create(filename) - if err != nil { - return err - } - defer file.Close() - - generateProtobufMessageClasses(L, file) - - // 按 package 分组,然后在每个分组内按 funcName 排序 - groupedFunctions := make(map[string][]string) - for funcName, signature := range intermediate.InternalFunctions { - if unicode.IsUpper(rune(funcName[0])) { - continue - } - groupedFunctions[signature.Package] = append(groupedFunctions[signature.Package], funcName) - } - - // 排序每个 package 内的函数名 - for _, funcs := range groupedFunctions { - sort.Strings(funcs) - } - - // 生成 Lua 定义文件 - for group, funcs := range groupedFunctions { - fmt.Fprintf(file, "-- Group: %s\n\n", group) - for _, funcName := range funcs { - signature := intermediate.InternalFunctions[funcName] - - fmt.Fprintf(file, "--- %s\n", funcName) - - // Short, Long, Example 描述 - if signature.Helper != nil { - if signature.Helper.Short != "" { - for _, line := range strings.Split(signature.Helper.Short, "\n") { - fmt.Fprintf(file, "--- %s\n", line) - } - fmt.Fprintf(file, "---\n") - } - if signature.Helper.Long != "" { - for _, line := range strings.Split(signature.Helper.Long, "\n") { - fmt.Fprintf(file, "--- %s\n", line) - } - fmt.Fprintf(file, "---\n") - } - if signature.Helper.Example != "" { - fmt.Fprintf(file, "--- @example\n") - for _, line := range strings.Split(signature.Helper.Example, "\n") { - fmt.Fprintf(file, "--- %s\n", line) - } - fmt.Fprintf(file, "---\n") - } - } - - // 参数和返回值描述 - var paramsName []string - for i, argType := range signature.ArgTypes { - luaType := intermediate.ConvertGoValueToLuaType(L, argType) - if signature.Helper == nil { - paramsName = append(paramsName, fmt.Sprintf("arg%d", i+1)) - fmt.Fprintf(file, "--- @param arg%d %s\n", i+1, luaType) - } else { - keys, values := signature.Helper.FormatInput() - if len(keys) > 0 { - paramsName = append(paramsName, keys[i]) - fmt.Fprintf(file, "--- @param %s %s %s\n", keys[i], luaType, values[i]) - } - } - } - for _, returnType := range signature.ReturnTypes { - luaType := intermediate.ConvertGoValueToLuaType(L, returnType) - if signature.Helper == nil { - fmt.Fprintf(file, "--- @return %s\n", luaType) - } else { - keys, values := signature.Helper.FormatOutput() - for i := range keys { - fmt.Fprintf(file, "--- @return %s %s %s\n", keys[i], luaType, values[i]) - } - } - } - - // 函数定义 - fmt.Fprintf(file, "function %s(", funcName) - for i := range signature.ArgTypes { - if i > 0 { - fmt.Fprintf(file, ", ") - } - if len(paramsName) > 0 { - fmt.Fprintf(file, paramsName[i]) - } - } - fmt.Fprintf(file, ") end\n\n") - } - } - - return nil -} - -func GenerateMarkdownDefinitionFile(L *lua.LState, pkg, filename string) error { - file, err := os.Create(filename) - if err != nil { - return err - } - defer file.Close() - - // 按 package 分组,然后在每个分组内按 funcName 排序 - groupedFunctions := make(map[string][]string) - for funcName, iFunc := range intermediate.InternalFunctions { - if iFunc.Package != pkg { - continue - } - group := "basic" - if iFunc.Helper != nil && iFunc.Helper.Group != "" { - group = iFunc.Helper.Group - } - groupedFunctions[group] = append(groupedFunctions[group], funcName) - } - var groups []string - for g, _ := range groupedFunctions { - groups = append(groups, g) - } - - sort.Strings(groups) - // 排序每个 package 内的函数名 - for _, funcs := range groupedFunctions { - sort.Strings(funcs) - } - - // 生成 Markdown 文档 - for _, pkg := range groups { - funcs := groupedFunctions[pkg] - // Package 名称作为二级标题 - fmt.Fprintf(file, "## %s\n\n", pkg) - for _, funcName := range funcs { - iFunc := intermediate.InternalFunctions[funcName] - - // 函数名作为三级标题 - fmt.Fprintf(file, "### %s\n\n", funcName) - - // 写入 Short 描述 - if iFunc.Helper != nil && iFunc.Helper.Short != "" { - fmt.Fprintf(file, "%s\n\n", iFunc.Helper.Short) - } - - // 写入 Long 描述 - if iFunc.Helper != nil && iFunc.Helper.Long != "" { - for _, line := range strings.Split(iFunc.Helper.Long, "\n") { - fmt.Fprintf(file, "%s\n", line) - } - fmt.Fprintf(file, "\n") - } - - // 写入参数描述. - if len(iFunc.ArgTypes) > 0 { - fmt.Fprintf(file, "**Arguments**\n\n") - for i, argType := range iFunc.ArgTypes { - luaType := intermediate.ConvertGoValueToLuaType(L, argType) - if iFunc.Helper == nil { - fmt.Fprintf(file, "- `$%d` [%s] \n", i+1, luaType) - } else { - keys, values := iFunc.Helper.FormatInput() - paramName := fmt.Sprintf("$%d", i+1) - if i < len(keys) && keys[i] != "" { - paramName = keys[i] - } - description := "" - if i < len(values) { - description = values[i] - } - fmt.Fprintf(file, "- `%s` [%s] - %s\n", paramName, luaType, description) - } - } - } - fmt.Fprintf(file, "\n") - - // Example - if iFunc.Helper != nil && iFunc.Helper.Example != "" { - fmt.Fprintf(file, "**Example**\n\n```\n") - for _, line := range strings.Split(iFunc.Helper.Example, "\n") { - fmt.Fprintf(file, "%s\n", line) - } - fmt.Fprintf(file, "```\n\n") - } - } - } - - return nil -} - -// generateProtobufMessageClasses 生成 Protobuf message 的 Lua class 定义 -func generateProtobufMessageClasses(L *lua.LState, file *os.File) { - // 使用 protoregistry 遍历所有注册的 Protobuf 结构体 - protoregistry.GlobalTypes.RangeMessages(func(mt protoreflect.MessageType) bool { - // 获取结构体名称 - messageName := mt.Descriptor().FullName() - var contains bool - for _, pkg := range ProtoPackage { - if strings.HasPrefix(string(messageName), pkg) { - contains = true - } - } - if !contains { - return true - } - - // 去掉前缀 - cleanName := removePrefix(string(messageName)) - - // 写入 class 定义 - fmt.Fprintf(file, "--- @class %s\n", cleanName) - - fields := mt.Descriptor().Fields() - for i := 0; i < fields.Len(); i++ { - field := fields.Get(i) - luaType := protoFieldToLuaType(field) - fmt.Fprintf(file, "--- @field %s %s\n", field.Name(), luaType) - } - - fmt.Fprintf(file, "\n") - return true - }) -} - -// 移除前缀 clientpb 或 implantpb -func removePrefix(messageName string) string { - i := strings.Index(messageName, ".") - if i == -1 { - return messageName - } else { - return messageName[i+1:] - } -} - -// protoFieldToLuaType 将 Protobuf 字段映射为 Lua 类型 -func protoFieldToLuaType(field protoreflect.FieldDescriptor) string { - switch field.Kind() { - case protoreflect.BoolKind: - return "boolean" - case protoreflect.Int32Kind, protoreflect.Int64Kind, protoreflect.Uint32Kind, protoreflect.Uint64Kind, protoreflect.FloatKind, protoreflect.DoubleKind: - return "number" - case protoreflect.StringKind: - return "string" - case protoreflect.BytesKind: - return "string" // Lua 中处理为 string - case protoreflect.MessageKind: - if field.Cardinality() == protoreflect.Repeated { - return "table" - } - return removePrefix(string(field.Message().FullName())) - case protoreflect.EnumKind: - return "string" // 枚举可以映射为字符串 - default: - return "any" - } -} - -// RegisterProtobufMessagesFromPackage 注册指定包中所有的 Protobuf Message -func RegisterProtobufMessagesFromPackage(L *lua.LState, pkg string) { - // 通过 protoregistry 获取所有注册的消息 - protoregistry.GlobalTypes.RangeMessages(func(mt protoreflect.MessageType) bool { - messageName := string(mt.Descriptor().FullName()) - - // 检查 message 是否属于指定包 - if len(pkg) == 0 || messageName == pkg || (len(messageName) >= len(pkg) && messageName[:len(pkg)] == pkg) { - // 将每个 message 注册为 Lua 类型 - RegisterProtobufMessage(L, messageName, mt.New().Interface().(proto.Message)) - } - return true - }) -} - -// RegisterAllProtobufMessages 注册 implantpb 和 clientpb 中的所有 Protobuf Message -func RegisterAllProtobufMessages(L *lua.LState) { - RegisterProtobufMessagesFromPackage(L, "implantpb") - RegisterProtobufMessagesFromPackage(L, "clientpb") - RegisterProtobufMessagesFromPackage(L, "modulepb") -} - -// RegisterProtobufMessage 注册 Protobuf message 类型到 Lua -func RegisterProtobufMessage(L *lua.LState, msgType string, msg proto.Message) { - mt := L.NewTypeMetatable(msgType) - L.SetGlobal(msgType, mt) - - // 注册 Protobuf 操作 - L.SetField(mt, "__index", L.NewFunction(protoIndex)) - L.SetField(mt, "__newindex", L.NewFunction(protoNewIndex)) - L.SetField(mt, "__tostring", L.NewFunction(protoToString)) - - // 新增 New 方法,用于创建该消息的空实例 - L.SetField(mt, "New", L.NewFunction(func(L *lua.LState) int { - // 创建一个该消息的空实例 - newMsg := proto.Clone(msg).(proto.Message) - - // 将新创建的消息封装为 UserData - ud := L.NewUserData() - ud.Value = newMsg - L.SetMetatable(ud, L.GetTypeMetatable(msgType)) - L.Push(ud) - - return 1 // 返回新建的消息实例 - })) -} - -// __tostring 元方法:将 Protobuf 消息转换为字符串 -func protoToString(L *lua.LState) int { - ud := L.CheckUserData(1) - if msg, ok := ud.Value.(proto.Message); ok { - // 使用反射遍历并处理 Protobuf 消息的字段 - truncatedMsg := truncateMessageFields(msg) - - // 使用 protojson 将处理后的 Protobuf 消息转换为 JSON 字符串 - marshaler := protojson.MarshalOptions{ - Indent: " ", - } - jsonStr, err := marshaler.Marshal(truncatedMsg) - if err != nil { - L.Push(lua.LString(fmt.Sprintf("Error: %v", err))) - } else { - L.Push(lua.LString(fmt.Sprintf(" %s", proto.MessageName(msg), string(jsonStr)))) - } - return 1 - } - L.Push(lua.LString("")) - return 1 -} - -// truncateLongFields 递归处理 map 中的字符串字段,截断长度超过 1024 的字符串 -func truncateMessageFields(msg proto.Message) proto.Message { - // 创建消息的深拷贝,以避免修改原始消息 - copyMsg := proto.Clone(msg) - - msgValue := reflect.ValueOf(copyMsg).Elem() - msgType := msgValue.Type() - - for i := 0; i < msgType.NumField(); i++ { - fieldValue := msgValue.Field(i) - - // 处理字符串类型字段 - if fieldValue.Kind() == reflect.String && fieldValue.Len() > 1024 { - truncatedStr := fieldValue.String()[:1024] + "......" - fieldValue.SetString(truncatedStr) - } - - // 处理字节数组([]byte)类型字段 - if fieldValue.Kind() == reflect.Slice && fieldValue.Type().Elem().Kind() == reflect.Uint8 { - // 如果字节数组长度大于 1024,则截断 - if fieldValue.Len() > 1024 { - truncatedBytes := append(fieldValue.Slice(0, 1024).Bytes(), []byte("......")...) - fieldValue.SetBytes(truncatedBytes) - } - } - - // 处理嵌套的消息类型字段 - if fieldValue.Kind() == reflect.Ptr && !fieldValue.IsNil() && fieldValue.Elem().Kind() == reflect.Struct { - nestedMsg, ok := fieldValue.Interface().(proto.Message) - if ok { - truncateMessageFields(nestedMsg) - } - } - - // 处理 repeated 字段(slice 类型) - if fieldValue.Kind() == reflect.Slice && fieldValue.Type().Elem().Kind() == reflect.Ptr { - for j := 0; j < fieldValue.Len(); j++ { - item := fieldValue.Index(j) - if item.Kind() == reflect.Ptr && item.Elem().Kind() == reflect.Struct { - nestedMsg, ok := item.Interface().(proto.Message) - if ok { - truncateMessageFields(nestedMsg) - } - } - } - } - } - - return copyMsg -} - -func protoNew(L *lua.LState) int { - // 获取消息类型名称 - msgTypeName := L.CheckString(2) // 这里确保第一个参数是字符串类型 - - // 查找消息类型 - msgType, err := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(msgTypeName)) - if err != nil { - L.Push(lua.LNil) - L.Push(lua.LString("invalid message type: " + msgTypeName)) - return 2 - } - - // 创建消息实例 - msg := msgType.New().Interface() - - // 初始化字段 - if L.GetTop() > 1 { - initTable := L.CheckTable(3) - initTable.ForEach(func(key lua.LValue, value lua.LValue) { - fieldName := key.String() - fieldValue := intermediate.ConvertLuaValueToGo(value) - setFieldByName(msg, fieldName, fieldValue) - }) - } - - // 将消息实例返回给 Lua - ud := L.NewUserData() - ud.Value = msg - L.SetMetatable(ud, L.GetTypeMetatable("ProtobufMessage")) - L.Push(ud) - return 1 -} - -// __index 元方法:获取 Protobuf 消息的字段值 -func protoIndex(L *lua.LState) int { - ud := L.CheckUserData(1) - fieldName := L.CheckString(2) - - if msg, ok := ud.Value.(proto.Message); ok { - val := getFieldByName(msg, fieldName) - L.Push(intermediate.ConvertGoValueToLua(L, val)) - return 1 - } - return 0 -} - -// __newindex 元方法:设置 Protobuf 消息的字段值 -func protoNewIndex(L *lua.LState) int { - ud := L.CheckUserData(1) - fieldName := L.CheckString(2) - newValue := intermediate.ConvertLuaValueToGo(L.Get(3)) - - if msg, ok := ud.Value.(proto.Message); ok { - setFieldByName(msg, fieldName, newValue) - } - return 0 -} - -// 使用反射获取字段值 -func getFieldByName(msg proto.Message, fieldName string) interface{} { - val := reflect.ValueOf(msg).Elem().FieldByName(fieldName) - if val.IsValid() { - return val.Interface() - } - return nil -} - -// 使用反射设置字段值 -func setFieldByName(msg proto.Message, fieldName string, newValue interface{}) { - val := reflect.ValueOf(msg).Elem().FieldByName(fieldName) - if val.IsValid() && val.CanSet() { - // 将 Lua 值转换为 Go 值并直接设置 - newVal := reflect.ValueOf(newValue) - - // 特别处理 []byte 类型 - if val.Kind() == reflect.Slice && val.Type().Elem().Kind() == reflect.Uint8 { - if str, ok := newValue.(string); ok { - newVal = reflect.ValueOf([]byte(str)) - } - } - - // 检查是否可以直接设置值 - if newVal.Type().ConvertibleTo(val.Type()) { - val.Set(newVal.Convert(val.Type())) - } - } -} diff --git a/client/repl/console.go b/client/repl/console.go index 7d2ccd2c..0ae518d9 100644 --- a/client/repl/console.go +++ b/client/repl/console.go @@ -8,6 +8,7 @@ import ( "github.com/chainreactors/malice-network/client/core" "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/mals" "github.com/chainreactors/tui" "github.com/reeflective/console" "github.com/rsteube/carapace/pkg/x" @@ -190,7 +191,7 @@ func (c *Console) RegisterBuiltinFunc(pkg, name string, fn interface{}, callback return intermediate.RegisterInternalFunc(pkg, name, WrapImplantFunc(c, fn, callback), implantCallback) } -func (c *Console) RegisterServerFunc(name string, fn interface{}, helper *intermediate.Helper) error { +func (c *Console) RegisterServerFunc(name string, fn interface{}, helper *mals.Helper) error { err := intermediate.RegisterInternalFunc(intermediate.BuiltinPackage, name, WrapServerFunc(c, fn), nil) if helper != nil { return intermediate.AddHelper(name, helper) @@ -210,7 +211,7 @@ func (c *Console) AddCommandFuncHelper(cmdName string, funcName string, example } else { group = cmd.GroupID } - return intermediate.AddHelper(funcName, &intermediate.Helper{ + return intermediate.AddHelper(funcName, &mals.Helper{ CMDName: cmdName, Group: group, Short: cmd.Short, @@ -220,7 +221,7 @@ func (c *Console) AddCommandFuncHelper(cmdName string, funcName string, example Example: example, }) } else { - return intermediate.AddHelper(funcName, &intermediate.Helper{ + return intermediate.AddHelper(funcName, &mals.Helper{ CMDName: cmdName, Input: input, Output: output, diff --git a/client/repl/plugin.go b/client/repl/plugin.go index 54b11346..311288c0 100644 --- a/client/repl/plugin.go +++ b/client/repl/plugin.go @@ -11,6 +11,7 @@ import ( "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" "github.com/chainreactors/malice-network/helper/utils/handler" + "github.com/chainreactors/mals" "github.com/chainreactors/tui" "github.com/spf13/cobra" "reflect" @@ -116,7 +117,7 @@ func wrapImplantFunc(fun interface{}) implantFunc { expectedType := funcType.In(i + 2) paramType := reflect.TypeOf(param) if paramType.Kind() == reflect.Int64 { - param = intermediate.ConvertNumericType(param.(int64), expectedType.Kind()) + param = mals.ConvertNumericType(param.(int64), expectedType.Kind()) } if reflect.TypeOf(param) != expectedType { return nil, fmt.Errorf("argument %d should be %v, got %v", i+1, funcType.In(i+3), reflect.TypeOf(param)) @@ -138,10 +139,10 @@ func wrapImplantFunc(fun interface{}) implantFunc { } } -func WrapImplantFunc(con *Console, fun interface{}, callback ImplantFuncCallback) *intermediate.InternalFunc { +func WrapImplantFunc(con *Console, fun interface{}, callback ImplantFuncCallback) *mals.MalFunction { wrappedFunc := wrapImplantFunc(fun) - interFunc := intermediate.GetInternalFuncSignature(fun) + interFunc := mals.GetInternalFuncSignature(fun) interFunc.ArgTypes = interFunc.ArgTypes[1:] interFunc.HasLuaCallback = true interFunc.Func = func(args ...interface{}) (interface{}, error) { @@ -189,7 +190,7 @@ func WrapImplantFunc(con *Console, fun interface{}, callback ImplantFuncCallback return interFunc } -func WrapServerFunc(con *Console, fun interface{}) *intermediate.InternalFunc { +func WrapServerFunc(con *Console, fun interface{}) *mals.MalFunction { wrappedFunc := func(con *Console, params ...interface{}) (interface{}, error) { funcValue := reflect.ValueOf(fun) funcType := funcValue.Type() @@ -220,7 +221,7 @@ func WrapServerFunc(con *Console, fun interface{}) *intermediate.InternalFunc { return results[0].Interface(), err } - internalFunc := intermediate.GetInternalFuncSignature(fun) + internalFunc := mals.GetInternalFuncSignature(fun) internalFunc.ArgTypes = internalFunc.ArgTypes[1:] internalFunc.Func = func(args ...interface{}) (interface{}, error) { return wrappedFunc(con, args...) diff --git a/go.mod b/go.mod index c374e5f7..fc22df4e 100644 --- a/go.mod +++ b/go.mod @@ -2,18 +2,15 @@ module github.com/chainreactors/malice-network go 1.22 -toolchain go1.22.7 - require ( filippo.io/age v1.1.1 - github.com/chainreactors/files v0.0.0-20231102192550-a652458cee26 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 + github.com/chainreactors/mals v0.0.0-20250106091223-041f71c6b57b github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 - github.com/chainreactors/utils v0.0.0-20240805193040-ff3b97aa3c3f + github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 github.com/charmbracelet/glamour v0.8.0 github.com/charmbracelet/lipgloss v0.13.0 - github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9 github.com/docker/docker v27.3.1+incompatible github.com/evertras/bubble-table v0.17.1 github.com/gofrs/uuid v4.4.0+incompatible @@ -32,46 +29,42 @@ require ( github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/tengattack/gluacrypto v0.0.0-20240324200146-54b58c95c255 github.com/tetratelabs/wazero v1.5.0 github.com/traefik/yaegi v0.16.1 - github.com/vadv/gopher-lua-libs v0.5.0 github.com/wabzsy/gonut v1.0.0 github.com/yuin/gopher-lua v1.1.1 golang.org/x/crypto v0.28.0 + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa golang.org/x/text v0.19.0 google.golang.org/grpc v1.67.1 - google.golang.org/protobuf v1.35.2 + google.golang.org/protobuf v1.36.1 gopkg.in/yaml.v3 v3.0.1 gorm.io/gorm v1.25.4 - layeh.com/gopher-luar v1.0.11 ) require ( + al.essio.dev/pkg/shellescape v1.5.1 // indirect atomicgo.dev/cursor v0.2.0 // indirect atomicgo.dev/keyboard v0.2.9 // indirect atomicgo.dev/schedule v0.1.0 // indirect dario.cat/mergo v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a // indirect github.com/Microsoft/go-winio v0.4.14 // indirect - github.com/VividCortex/ewma v1.1.1 // indirect github.com/alecthomas/chroma/v2 v2.14.0 // indirect - github.com/alessio/shellescape v1.4.1 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go v1.34.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect - github.com/beorn7/perks v1.0.1 // indirect github.com/blinkbean/dingtalk v1.1.3 // indirect - github.com/cbroglie/mustache v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cbroglie/mustache v1.4.0 // indirect + github.com/chainreactors/files v0.2.0 // indirect github.com/charmbracelet/bubbles v0.18.0 // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect github.com/charmbracelet/x/ansi v0.1.4 // indirect github.com/charmbracelet/x/input v0.1.0 // indirect github.com/charmbracelet/x/term v0.1.1 // indirect github.com/charmbracelet/x/windows v0.1.0 // indirect - github.com/cheggaaa/pb/v3 v3.0.5 // indirect + github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -90,18 +83,16 @@ require ( github.com/go-lark/lark v1.14.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-sql-driver/mysql v1.5.0 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect github.com/goccy/go-yaml v1.12.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/gookit/color v1.5.4 // indirect github.com/gookit/goutil v0.6.15 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/lib/pq v1.10.9 // indirect github.com/lithammer/fuzzysearch v1.1.8 // indirect @@ -110,13 +101,12 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect - github.com/mattn/go-sqlite3 v1.14.22 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mattn/go-sqlite3 v1.14.24 // indirect github.com/microcosm-cc/bluemonday v1.0.27 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.0 // indirect - github.com/montanaflynn/stats v0.6.3 // indirect + github.com/montanaflynn/stats v0.7.1 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect @@ -126,10 +116,6 @@ require ( github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect github.com/reeflective/readline v1.0.15 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -138,6 +124,7 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/technoweenie/multipartstreamer v1.0.1 // indirect + github.com/tengattack/gluacrypto v0.0.0-20240324200146-54b58c95c255 // indirect github.com/twmb/murmur3 v1.1.8 // indirect github.com/wabzsy/compression v0.0.0-20230725232933-73109bacf457 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect @@ -150,14 +137,13 @@ require ( go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/sdk v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect - golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect golang.org/x/net v0.30.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/term v0.25.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect - gopkg.in/xmlpath.v2 v2.0.0-20150820204837-860cbeca3ebc // indirect gotest.tools/v3 v3.5.1 // indirect + layeh.com/gopher-luar v1.0.11 // indirect mvdan.cc/sh/v3 v3.7.0 // indirect ) diff --git a/go.sum b/go.sum index 523b55ec..6f0c93ec 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho= +al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= atomicgo.dev/assert v0.0.2 h1:FiKeMiZSgRrZsPo9qn/7vmr7mCsh5SZyXY4YGYiYwrg= atomicgo.dev/assert v0.0.2/go.mod h1:ut4NcI3QDdJtlmAxQULOmA13Gz6e2DWbSAS8RUOmNYQ= atomicgo.dev/cursor v0.2.0 h1:H6XN5alUJ52FZZUkI7AlJbUc1aW38GWZalpYRPpoPOw= @@ -6,49 +8,16 @@ atomicgo.dev/keyboard v0.2.9 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8= atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ= atomicgo.dev/schedule v0.1.0 h1:nTthAbhZS5YZmgYbb2+DH8uQIZcTlIrd4eYr3UQxEjs= atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8pEU= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a h1:4c0nc0krv8eh7gD809n+swLaCuFyHpxdrxwx0ZmHvBw= github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a/go.mod h1:QzgxDLY/qdKlvnbnb65eqTedhvQPbaSP2NqIbcuKvsQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs= github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8= github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII= @@ -60,59 +29,38 @@ github.com/MarvinJWendt/testza v0.5.2 h1:53KDo64C1z/h/d/stCYCPY69bt/OSwjq5KpFNwi github.com/MarvinJWendt/testza v0.5.2/go.mod h1:xu53QFE5sCdjtMCKk8YMQ2MnymimEctc4n3EjyIYvEY= github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= -github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE= github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E= github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= -github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/aws-sdk-go v1.34.0 h1:brux2dRrlwCF5JhTL7MUT3WUwo9zfDHZZp3+g3Mvlmo= -github.com/aws/aws-sdk-go v1.34.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blinkbean/dingtalk v1.1.3 h1:MbidFZYom7DTFHD/YIs+eaI7kRy52kmWE/sy0xjo6E4= github.com/blinkbean/dingtalk v1.1.3/go.mod h1:9BaLuGSBqY3vT5hstValh48DbsKO7vaHaJnG9pXwbto= -github.com/cbroglie/mustache v1.0.1 h1:ivMg8MguXq/rrz2eu3tw6g3b16+PQhoTn6EZAhst2mw= -github.com/cbroglie/mustache v1.0.1/go.mod h1:R/RUa+SobQ14qkP4jtx5Vke5sDytONDQXNLPY/PO69g= +github.com/cbroglie/mustache v1.4.0 h1:Azg0dVhxTml5me+7PsZ7WPrQq1Gkf3WApcHMjMprYoU= +github.com/cbroglie/mustache v1.4.0/go.mod h1:SS1FTIghy0sjse4DUVGV1k/40B1qE1XkD9DtDsHo9iM= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chainreactors/files v0.0.0-20231102192550-a652458cee26 h1:p+RrnAjk2EsjTDLJ46Gwy4P1qRPX3VWHIBAgBrEwz8E= github.com/chainreactors/files v0.0.0-20231102192550-a652458cee26/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= +github.com/chainreactors/files v0.2.0 h1:LeN97o4VxIvK9ZACjXfdRTR+N7puXuWyQO5GarCkMLM= +github.com/chainreactors/files v0.2.0/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= -github.com/chainreactors/tui v0.0.0-20241203114431-17449fd7eef3 h1:0mweOb/3KmW9MiwYvgDbNB2I5piIbjTyG38jlGCeYWI= -github.com/chainreactors/tui v0.0.0-20241203114431-17449fd7eef3/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= -github.com/chainreactors/tui v0.0.0-20241226071726-9a327cb703a2 h1:EcgTKnuttOKL+/53aJcZmg5B3rw2w1GdbIwxf6d329Q= -github.com/chainreactors/tui v0.0.0-20241226071726-9a327cb703a2/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= +github.com/chainreactors/mals v0.0.0-20250106091223-041f71c6b57b h1:hij8Z4HTg3iEEiClUSQ7d3cG4B/hpIZhWLlLPR23Pos= +github.com/chainreactors/mals v0.0.0-20250106091223-041f71c6b57b/go.mod h1:GEN7Uo+sVjeEX9jSwmF3zaB1DLMygzBGBm6n0Vv4fJE= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= -github.com/chainreactors/utils v0.0.0-20240805193040-ff3b97aa3c3f h1:2NKmadFYP9vCwC0YrazgttFACleOhxScTPzg0i76YAY= -github.com/chainreactors/utils v0.0.0-20240805193040-ff3b97aa3c3f/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= +github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 h1:YRQRjgb3MUOOqT0CdUDC51dsXbWpI3l6w3H4xexqKr8= +github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= github.com/charmbracelet/bubbletea v0.27.1 h1:/yhaJKX52pxG4jZVKCNWj/oq0QouPdXycriDRA6m6r8= @@ -133,15 +81,11 @@ github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXD github.com/charmbracelet/x/term v0.1.1/go.mod h1:wB1fHt5ECsu3mXYusyzcngVWWlu1KKUmmLhfgr/Flxw= github.com/charmbracelet/x/windows v0.1.0 h1:gTaxdvzDM5oMa/I2ZNF7wN78X/atWemG9Wph7Ika2k4= github.com/charmbracelet/x/windows v0.1.0/go.mod h1:GLEO/l+lizvFDBPLIOk+49gdX49L9YWMB5t+DZd0jkQ= -github.com/cheggaaa/pb/v3 v3.0.5 h1:lmZOti7CraK9RSjzExsY53+WWfub9Qv13B5m4ptEoPE= -github.com/cheggaaa/pb/v3 v3.0.5/go.mod h1:X1L61/+36nz9bjIsrDU52qHKOQukUQe2Ge+YvGuquCw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9 h1:rdWOzitWlNYeUsXmz+IQfa9NkGEq3gA/qQ3mOEqBU6o= github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9/go.mod h1:X97UjDTXp+7bayQSFZk2hPvCTmTZIicUjZQRtkwgAKY= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= @@ -163,18 +107,12 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/evertras/bubble-table v0.17.1 h1:HJwq3iQrZulXDE93ZcqJNiUVQCBbN4IJ2CkB/IxO3kk= github.com/evertras/bubble-table v0.17.1/go.mod h1:ifHujS1YxwnYSOgcR2+m3GnJ84f7CVU/4kUOxUCjEbQ= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -187,19 +125,8 @@ github.com/go-dedup/simhash v0.0.0-20170904020510-9ecaca7b509c h1:mucYYQn+sMGNSx github.com/go-dedup/simhash v0.0.0-20170904020510-9ecaca7b509c/go.mod h1:gO3u2bjRAgUaLdQd2XK+3oooxrheOAx1BzS7WmPzw1s= github.com/go-dedup/text v0.0.0-20170907015346-8bb1b95e3cb7 h1:11wFcswN+37U+ByjxdKzsRY5KzNqqq5Uk5ztxnLOc7w= github.com/go-dedup/text v0.0.0-20170907015346-8bb1b95e3cb7/go.mod h1:wSsK4VOECOSfSYTzkBFw+iGY7wj59e7X96ABtNj9aCQ= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-lark/lark v1.14.1 h1:qWYQTk6wLwf/08u8WbdNAHNmfqavdOvmsENlQ+Cb8aY= github.com/go-lark/lark v1.14.1/go.mod h1:6ltbSztPZRT6IaO9ZIQyVaY5pVp/KeMizDYtfZkU+vM= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -211,78 +138,25 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible h1:2cauKuaELYAEARXRkq2LrJ0yDDv1rW7+wrTEdVL3uaU= github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM= github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM= github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= @@ -297,11 +171,8 @@ github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= @@ -310,24 +181,10 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA= github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -340,8 +197,6 @@ github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuOb github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -353,51 +208,37 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4= github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= -github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= -github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= +github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-tty v0.0.7 h1:KJ486B6qI8+wBO7kQxYgmmEFDaFEE96JMBQ7h400N8Q= github.com/mattn/go-tty v0.0.7/go.mod h1:f2i5ZOvXBU/tCABmLmOfzLz9azMo5wdAaElRNnJKr+k= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.6.3 h1:F8446DrvIF5V5smZfZ8K9nrmmix0AFgevPdLruGOmzk= -github.com/montanaflynn/stats v0.6.3/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= +github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= @@ -408,8 +249,6 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a h1:2MaM6YC3mGu54x+RKAA6JiFFHlHDY1UbkxqppT7wYOg= github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a/go.mod h1:hxSnBBYLK21Vtq/PHd0S2FYCxBXzBua8ov5s1RobyRQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/ncruces/go-sqlite3 v0.9.0 h1:tl5eEmGEyzZH2ur8sDgPJTdzV4CRnKpsFngoP1QRjD8= github.com/ncruces/go-sqlite3 v0.9.0/go.mod h1:IyRoNwT0Z+mNRXIVeP2DgWPNl78Kmc/B+pO9i6GNgRg= github.com/ncruces/julianday v0.1.5 h1:hDJ9ejiMp3DHsoZ5KW4c1lwfMjbARS7u/gbYcd0FBZk= @@ -421,39 +260,11 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI= github.com/pterm/pterm v0.12.29/go.mod h1:WI3qxgvoQFFGKGjGnJR849gU0TsEOvKn5Q8LlY1U7lg= github.com/pterm/pterm v0.12.30/go.mod h1:MOqLIyMOgmTDz9yorcYbcw+HsgoZo3BQfg2wtl3HEFE= @@ -473,7 +284,6 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/robfig/cron/v3 v3.0.0 h1:kQ6Cb7aHOHTSzNVNEhmp8EcWKLb4CbiMW9h9VyIhO4E= github.com/robfig/cron/v3 v3.0.0/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= @@ -487,10 +297,7 @@ github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wr github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= @@ -505,9 +312,7 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -525,8 +330,6 @@ github.com/traefik/yaegi v0.16.1 h1:f1De3DVJqIDKmnasUF6MwmWv1dSEEat0wcpXhD2On3E= github.com/traefik/yaegi v0.16.1/go.mod h1:4eVhbPb3LnD2VigQjhYbEJ69vDRFdT2HQNrXx8eEwUY= github.com/twmb/murmur3 v1.1.8 h1:8Yt9taO/WN3l08xErzjeschgZU2QSrwm1kclYq+0aRg= github.com/twmb/murmur3 v1.1.8/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= -github.com/vadv/gopher-lua-libs v0.5.0 h1:m0hhWia1A1U3PIRmtdHWBj88ogzuIjm6HUBmtUa0Tz4= -github.com/vadv/gopher-lua-libs v0.5.0/go.mod h1:mlSOxmrjug7DwisiH7xBFnBellHobPbvAIhVeI/4SYY= github.com/wabzsy/compression v0.0.0-20230725232933-73109bacf457 h1:kR0qkMaKhi6GRveEKP6zB9lxpZxCUB1aWfjRV2gXWeg= github.com/wabzsy/compression v0.0.0-20230725232933-73109bacf457/go.mod h1:3anGK27b6w/V1xJYX3VQ0YRzmIwspU3pU6MUF1mWd7Q= github.com/wabzsy/gonut v1.0.0 h1:s1sDtkWhtGwBC8dvpj6lw4XgZqA2n6CsDTmKLD9ZA6w= @@ -536,9 +339,7 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yuin/gluamapper v0.0.0-20150323120927-d836955830e7 h1:noHsffKZsNfU38DwcXWEPldrTjIZ8FPNKx8mYMGnqjs= github.com/yuin/gluamapper v0.0.0-20150323120927-d836955830e7/go.mod h1:bbMEM6aU1WDF1ErA5YJ0p91652pGv140gGw4Ww3RGp8= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= @@ -547,15 +348,9 @@ github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRla github.com/yuin/goldmark-emoji v1.0.3 h1:aLRkLHOuBR2czCY4R8olwMjID+tENfhyFDMCRhbIQY4= github.com/yuin/goldmark-emoji v1.0.3/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U= github.com/yuin/gopher-lua v0.0.0-20190206043414-8bfc7677f583/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= -github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= @@ -572,155 +367,48 @@ go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HY go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -736,63 +424,18 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= @@ -802,107 +445,21 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d h1:/hmn0Ku5kWij/kjGsrcJeC1T/MrJi2iNWwgAqrihFwc= google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg= google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M= google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= +google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/xmlpath.v2 v2.0.0-20150820204837-860cbeca3ebc h1:LMEBgNcZUqXaP7evD1PZcL6EcDVa2QOFuI+cqM3+AJM= -gopkg.in/xmlpath.v2 v2.0.0-20150820204837-860cbeca3ebc/go.mod h1:N8UOSI6/c2yOpa/XDz3KVUiegocTziPiqNkeNTMiG1k= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= @@ -911,17 +468,7 @@ gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw= gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= layeh.com/gopher-luar v1.0.11 h1:8zJudpKI6HWkoh9eyyNFaTM79PY6CAPcIr6X/KTiliw= layeh.com/gopher-luar v1.0.11/go.mod h1:TPnIVCZ2RJBndm7ohXyaqfhzjlZ+OA2SZR/YwL8tECk= mvdan.cc/sh/v3 v3.7.0 h1:lSTjdP/1xsddtaKfGg7Myu7DnlHItd3/M2tomOcNNBg= mvdan.cc/sh/v3 v3.7.0/go.mod h1:K2gwkaesF/D7av7Kxl0HbF5kGOd2ArupNTX3X44+8l8= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 68ab2ad8f5e89421395e58629568d958c3d8236d Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 6 Jan 2025 17:49:25 +0800 Subject: [PATCH 03/40] refactor: mv intermediate to helper --- client/cmd/genlua/gen_lua.go | 2 +- client/command/alias/commands.go | 2 +- client/command/build/command.go | 2 +- client/command/common/parser.go | 2 +- client/command/exec/commands.go | 2 +- client/command/exec/dllspwan.go | 2 +- client/command/exec/execute-dll.go | 2 +- client/command/extension/commands.go | 2 +- client/command/file/commands.go | 2 +- client/command/generic/commands.go | 2 +- client/command/mutant/commands.go | 2 +- client/core/event.go | 2 +- client/core/intermediate/lua.go | 8 -------- client/core/plugin/lua.go | 2 +- client/core/plugin/plugin.go | 2 +- client/core/plugin/yaegi.go | 2 +- client/core/server.go | 2 +- client/repl/console.go | 2 +- client/repl/plugin.go | 2 +- {client/core => helper}/intermediate/builtin.go | 8 ++++++++ {client/core => helper}/intermediate/event.go | 0 {client/core => helper}/intermediate/function.go | 0 {client/core => helper}/intermediate/utils.go | 4 ++-- 23 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 client/core/intermediate/lua.go rename {client/core => helper}/intermediate/builtin.go (99%) rename {client/core => helper}/intermediate/event.go (100%) rename {client/core => helper}/intermediate/function.go (100%) rename {client/core => helper}/intermediate/utils.go (100%) diff --git a/client/cmd/genlua/gen_lua.go b/client/cmd/genlua/gen_lua.go index 10c8e0d1..8e7acd6a 100644 --- a/client/cmd/genlua/gen_lua.go +++ b/client/cmd/genlua/gen_lua.go @@ -4,9 +4,9 @@ import ( "fmt" _ "github.com/chainreactors/malice-network/client/cmd/cli" "github.com/chainreactors/malice-network/client/command" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/core/plugin" "github.com/chainreactors/malice-network/client/repl" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" "github.com/chainreactors/mals" "github.com/spf13/cobra" diff --git a/client/command/alias/commands.go b/client/command/alias/commands.go index dadf6f1c..dbb36a60 100644 --- a/client/command/alias/commands.go +++ b/client/command/alias/commands.go @@ -2,9 +2,9 @@ package alias import ( "github.com/chainreactors/malice-network/client/command/common" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/rsteube/carapace" "github.com/spf13/cobra" ) diff --git a/client/command/build/command.go b/client/command/build/command.go index 1aa2d3ad..a6fd1f85 100644 --- a/client/command/build/command.go +++ b/client/command/build/command.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/mals" "github.com/rsteube/carapace" diff --git a/client/command/common/parser.go b/client/command/common/parser.go index 26ef7d9c..bd4cfd16 100644 --- a/client/command/common/parser.go +++ b/client/command/common/parser.go @@ -4,11 +4,11 @@ import ( "bytes" "encoding/binary" "fmt" + "github.com/chainreactors/malice-network/helper/intermediate" "io" "math" "strings" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" diff --git a/client/command/exec/commands.go b/client/command/exec/commands.go index 86c326f6..99578b00 100644 --- a/client/command/exec/commands.go +++ b/client/command/exec/commands.go @@ -5,9 +5,9 @@ import ( "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/utils/pe" "github.com/rsteube/carapace" "github.com/spf13/cobra" diff --git a/client/command/exec/dllspwan.go b/client/command/exec/dllspwan.go index 443b1897..8c5ba052 100644 --- a/client/command/exec/dllspwan.go +++ b/client/command/exec/dllspwan.go @@ -2,12 +2,12 @@ package exec import ( "errors" + "github.com/chainreactors/malice-network/helper/intermediate" "math" "os" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" diff --git a/client/command/exec/execute-dll.go b/client/command/exec/execute-dll.go index 488fbcb7..9de9126c 100644 --- a/client/command/exec/execute-dll.go +++ b/client/command/exec/execute-dll.go @@ -4,9 +4,9 @@ import ( "errors" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" diff --git a/client/command/extension/commands.go b/client/command/extension/commands.go index 6602380b..bd38f3e0 100644 --- a/client/command/extension/commands.go +++ b/client/command/extension/commands.go @@ -2,9 +2,9 @@ package extension import ( "github.com/chainreactors/malice-network/client/command/common" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/rsteube/carapace" "github.com/spf13/cobra" ) diff --git a/client/command/file/commands.go b/client/command/file/commands.go index b121ca6f..e0fe933f 100644 --- a/client/command/file/commands.go +++ b/client/command/file/commands.go @@ -2,7 +2,7 @@ package file import ( "fmt" - "github.com/chainreactors/malice-network/client/core/intermediate" + "github.com/chainreactors/malice-network/helper/intermediate" "path/filepath" "github.com/chainreactors/malice-network/client/command/common" diff --git a/client/command/generic/commands.go b/client/command/generic/commands.go index a959f30c..9bb16293 100644 --- a/client/command/generic/commands.go +++ b/client/command/generic/commands.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/mals" "github.com/spf13/cobra" diff --git a/client/command/mutant/commands.go b/client/command/mutant/commands.go index fa9f9d66..e6809371 100644 --- a/client/command/mutant/commands.go +++ b/client/command/mutant/commands.go @@ -2,9 +2,9 @@ package mutant import ( "github.com/chainreactors/malice-network/client/command/common" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/utils/donut" "github.com/chainreactors/mals" diff --git a/client/core/event.go b/client/core/event.go index 77f2796e..3e05f54d 100644 --- a/client/core/event.go +++ b/client/core/event.go @@ -4,8 +4,8 @@ import ( "context" "fmt" "github.com/chainreactors/logs" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/utils/handler" "io" diff --git a/client/core/intermediate/lua.go b/client/core/intermediate/lua.go deleted file mode 100644 index d4221b76..00000000 --- a/client/core/intermediate/lua.go +++ /dev/null @@ -1,8 +0,0 @@ -package intermediate - -const ( - BeaconPackage = "beacon" - RpcPackage = "rpc" - ArmoryPackage = "armory" - BuiltinPackage = "builtin" -) diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index e57d5aad..26db5a08 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -5,8 +5,8 @@ import ( "github.com/chainreactors/logs" "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/types" "github.com/chainreactors/mals" diff --git a/client/core/plugin/plugin.go b/client/core/plugin/plugin.go index ffb3819f..3051d3c5 100644 --- a/client/core/plugin/plugin.go +++ b/client/core/plugin/plugin.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/chainreactors/logs" "github.com/chainreactors/malice-network/client/assets" - "github.com/chainreactors/malice-network/client/core/intermediate" + "github.com/chainreactors/malice-network/helper/intermediate" "gopkg.in/yaml.v3" "os" "path/filepath" diff --git a/client/core/plugin/yaegi.go b/client/core/plugin/yaegi.go index 820bcd89..0963675b 100644 --- a/client/core/plugin/yaegi.go +++ b/client/core/plugin/yaegi.go @@ -2,7 +2,7 @@ package plugin import ( "fmt" - "github.com/chainreactors/malice-network/client/core/intermediate" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/traefik/yaegi/interp" "github.com/traefik/yaegi/stdlib" "reflect" diff --git a/client/core/server.go b/client/core/server.go index 646e0318..07534b60 100644 --- a/client/core/server.go +++ b/client/core/server.go @@ -3,7 +3,7 @@ package core import ( "context" "errors" - "github.com/chainreactors/malice-network/client/core/intermediate" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" diff --git a/client/repl/console.go b/client/repl/console.go index 0ae518d9..f243695b 100644 --- a/client/repl/console.go +++ b/client/repl/console.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/mals" "github.com/chainreactors/tui" "github.com/reeflective/console" diff --git a/client/repl/plugin.go b/client/repl/plugin.go index 311288c0..6e37e8b4 100644 --- a/client/repl/plugin.go +++ b/client/repl/plugin.go @@ -5,9 +5,9 @@ import ( "errors" "fmt" "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/client/core/intermediate" "github.com/chainreactors/malice-network/client/core/plugin" "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" "github.com/chainreactors/malice-network/helper/utils/handler" diff --git a/client/core/intermediate/builtin.go b/helper/intermediate/builtin.go similarity index 99% rename from client/core/intermediate/builtin.go rename to helper/intermediate/builtin.go index 669155d7..29439448 100644 --- a/client/core/intermediate/builtin.go +++ b/helper/intermediate/builtin.go @@ -30,6 +30,14 @@ const ( GroupArtifact = "artifact" ) +// lua package +const ( + BeaconPackage = "beacon" + RpcPackage = "rpc" + ArmoryPackage = "armory" + BuiltinPackage = "builtin" +) + type BuiltinCallback func(content interface{}) (bool, error) func RegisterBuiltin(rpc clientrpc.MaliceRPCClient) { diff --git a/client/core/intermediate/event.go b/helper/intermediate/event.go similarity index 100% rename from client/core/intermediate/event.go rename to helper/intermediate/event.go diff --git a/client/core/intermediate/function.go b/helper/intermediate/function.go similarity index 100% rename from client/core/intermediate/function.go rename to helper/intermediate/function.go diff --git a/client/core/intermediate/utils.go b/helper/intermediate/utils.go similarity index 100% rename from client/core/intermediate/utils.go rename to helper/intermediate/utils.go index 8e0e4863..8ce5217f 100644 --- a/client/core/intermediate/utils.go +++ b/helper/intermediate/utils.go @@ -3,8 +3,6 @@ package intermediate import ( "context" "fmt" - "github.com/chainreactors/malice-network/helper/utils/fileutils" - "github.com/chainreactors/malice-network/helper/utils/pe" "math" "os" "path/filepath" @@ -15,7 +13,9 @@ import ( "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" + "github.com/chainreactors/malice-network/helper/utils/fileutils" "github.com/chainreactors/malice-network/helper/utils/handler" + "github.com/chainreactors/malice-network/helper/utils/pe" ) func GetResourceFile(pluginName, filename string) (string, error) { From fced834f8a8d653600c20aea97a506999b47bd46 Mon Sep 17 00:00:00 2001 From: h3zh1 Date: Wed, 8 Jan 2025 18:22:46 +0800 Subject: [PATCH 04/40] fix: address multiple bugs in system operations - Added handler for BOF response. - Configured Opsec settings. - Fixed binding flag for RegAddCmd. - Updated several built-in functions. - Update mals to latest --- client/assets/settings.go | 12 +-- client/command/common/monitor.go | 4 +- client/command/exec/commands.go | 32 +------ client/command/exec/execute-bof.go | 4 +- client/command/reg/commands.go | 2 +- go.mod | 2 +- go.sum | 4 +- helper/intermediate/builtin.go | 55 +++++++----- helper/utils/fileutils/path.go | 84 +++++++++++++++++- helper/utils/pe/bof.go | 133 +++++++++++++++++++++++------ 10 files changed, 243 insertions(+), 89 deletions(-) diff --git a/client/assets/settings.go b/client/assets/settings.go index 118cb880..2dda329c 100644 --- a/client/assets/settings.go +++ b/client/assets/settings.go @@ -12,12 +12,12 @@ import ( //) type Settings struct { - MaxServerLogSize int `yaml:"max_server_log_size" config:"max_server_log_size" default:"10"` - GithubRepo string `yaml:"github_repo" config:"github_repo" default:""` - GithubOwner string `yaml:"github_owner" config:"github_owner" default:""` - GithubToken string `yaml:"github_token" config:"github_token" default:""` - GithubWorkflowFile string `yaml:"github_workflow_file" config:"github_workflow_file" default:"generate.yaml"` - OpsecThreshold string `yaml:"opsec_threshold" config:"opsec_threshold" default:"6"` + MaxServerLogSize int `yaml:"max_server_log_size" config:"max_server_log_size" default:"10"` + GithubRepo string `yaml:"github_repo" config:"github_repo" default:""` + GithubOwner string `yaml:"github_owner" config:"github_owner" default:""` + GithubToken string `yaml:"github_token" config:"github_token" default:""` + GithubWorkflowFile string `yaml:"github_workflow_file" config:"github_workflow_file" default:"generate.yaml"` + OpsecThreshold float64 `yaml:"opsec_threshold" config:"opsec_threshold" default:"6.0"` //VtApiKey string `yaml:"vt_api_key" config:"vt_api_key" default:""` } diff --git a/client/command/common/monitor.go b/client/command/common/monitor.go index ef28947e..26b3be8f 100644 --- a/client/command/common/monitor.go +++ b/client/command/common/monitor.go @@ -10,11 +10,11 @@ import ( ) func OpsecConfirm(cmd *cobra.Command) error { - opsec, err := strconv.Atoi(cmd.Annotations["opsec"]) + opsec, err := strconv.ParseFloat(cmd.Annotations["opsec"], 64) if err != nil { return err } - threshold, err := strconv.Atoi(assets.GetProfile().Settings.OpsecThreshold) + threshold := assets.GetProfile().Settings.OpsecThreshold if err != nil { return err } diff --git a/client/command/exec/commands.go b/client/command/exec/commands.go index 99578b00..c57d5f5a 100644 --- a/client/command/exec/commands.go +++ b/client/command/exec/commands.go @@ -2,7 +2,6 @@ package exec import ( "fmt" - "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" "github.com/chainreactors/malice-network/client/repl" @@ -498,40 +497,15 @@ func Register(con *repl.Console) { RegisterExeFunc(con) RegisterBofFunc(con) - con.RegisterServerFunc("callback_bof", func(con *repl.Console, sess *core.Session, filename string) (intermediate.BuiltinCallback, error) { + con.RegisterServerFunc("callback_bof", func(con *repl.Console, sess *core.Session) (intermediate.BuiltinCallback, error) { return func(content interface{}) (bool, error) { resps, ok := content.(pe.BOFResponses) if !ok { return false, fmt.Errorf("invalid response type") } log := con.ObserverLog(sess.SessionId) - for _, resp := range resps { - if resp.CallbackType == pe.CALLBACK_SCREENSHOT { - if resp.Length == 0 { - log.Errorf("null screenshot data") - continue - } - screenfile, err := assets.GenerateTempFile(sess.SessionId, filename) - if err != nil { - log.Errorf("failed to create screenshot file: %s", err.Error()) - continue - } - defer func() { - if closeErr := screenfile.Close(); closeErr != nil { - log.Errorf("failed to close screenshot file: %s", closeErr.Error()) - } - }() - - data := resp.Data[4:] - if _, err := screenfile.Write(data); err != nil { - log.Errorf("failed to write screenshot data: %s", err.Error()) - continue - } - log.Infof("\nScreenshot saved to %s\n", screenfile.Name()) - } - } - - log.Console(resps.String()) + results := resps.Handler(sess.Session) + log.Console(results) return true, nil }, nil }, nil) diff --git a/client/command/exec/execute-bof.go b/client/command/exec/execute-bof.go index f7cf1b5c..e140bd6f 100644 --- a/client/command/exec/execute-bof.go +++ b/client/command/exec/execute-bof.go @@ -52,8 +52,8 @@ func RegisterBofFunc(con *repl.Console) { if err != nil { return "", err } - - return bofResps.(pe.BOFResponses).String(), nil + results := bofResps.(pe.BOFResponses).Handler(content.Session) + return results, nil }) con.AddCommandFuncHelper( diff --git a/client/command/reg/commands.go b/client/command/reg/commands.go index 4a628178..42ace6fc 100644 --- a/client/command/reg/commands.go +++ b/client/command/reg/commands.go @@ -66,7 +66,7 @@ func Commands(con *repl.Console) []*cobra.Command { reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example TestKey --string_value "example" --dword_value 1 ~~~`, } - common.BindFlag(regQueryCmd, func(f *pflag.FlagSet) { + common.BindFlag(regAddCmd, func(f *pflag.FlagSet) { f.String("string_value", "", "String value to write") f.BytesBase64("byte_value", []byte{}, "Byte array value to write") f.Uint32("dword_value", 0, "DWORD value to write") diff --git a/go.mod b/go.mod index fc22df4e..a5bc2af0 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22 require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 - github.com/chainreactors/mals v0.0.0-20250106091223-041f71c6b57b + github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342 github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 diff --git a/go.sum b/go.sum index 6f0c93ec..7fdc819b 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ github.com/chainreactors/files v0.2.0 h1:LeN97o4VxIvK9ZACjXfdRTR+N7puXuWyQO5GarC github.com/chainreactors/files v0.2.0/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= -github.com/chainreactors/mals v0.0.0-20250106091223-041f71c6b57b h1:hij8Z4HTg3iEEiClUSQ7d3cG4B/hpIZhWLlLPR23Pos= -github.com/chainreactors/mals v0.0.0-20250106091223-041f71c6b57b/go.mod h1:GEN7Uo+sVjeEX9jSwmF3zaB1DLMygzBGBm6n0Vv4fJE= +github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342 h1:LHqpNvL2Ry7kwCxz6nTF1pgVQEaS080gPWkQxN7T9nA= +github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342/go.mod h1:cpmqFZvxfRalmLq0cGQs21HKiHymkEo7D5Sp1VWYHas= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 h1:YRQRjgb3MUOOqT0CdUDC51dsXbWpI3l6w3H4xexqKr8= diff --git a/helper/intermediate/builtin.go b/helper/intermediate/builtin.go index 29439448..a509d6a1 100644 --- a/helper/intermediate/builtin.go +++ b/helper/intermediate/builtin.go @@ -4,17 +4,20 @@ import ( "crypto/rand" "encoding/base64" "fmt" - "github.com/chainreactors/mals" - "github.com/kballard/go-shellquote" "math/big" "os" + "path/filepath" "reflect" "regexp" "strconv" "strings" "time" + "github.com/chainreactors/mals" + "github.com/kballard/go-shellquote" + "github.com/chainreactors/logs" + "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/helper/encoders/hash" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" @@ -477,27 +480,39 @@ format_path("C:\\Windows\\System32\\calc.exe") }) // timestamp - RegisterFunction("timestampMillis", func() int64 { - timestampMillis := time.Now().UnixNano() / int64(time.Millisecond) - return timestampMillis + + RegisterFunction("timestamp", func() string { + return fmt.Sprintf("%d", time.Now().UnixNano()/int64(time.Millisecond)) }) + + RegisterFunction("timestamp_format", func(optionalFormat string) string { + return time.Now().Format(optionalFormat) + }) + AddHelper( - "timestampMillis", + "timestamp", &mals.Helper{ - Group: GroupEncode, - Short: "get current timestamp in milliseconds", - Input: []string{}, - Output: []string{ - "int64", - }, - Example: `timestampMillis()`, - }) - // tstamp - RegisterFunction("tstamp", func(timestampMillis int64) string { - seconds := timestampMillis / 1000 - nanoseconds := (timestampMillis % 1000) * int64(time.Millisecond) - t := time.Unix(seconds, nanoseconds) - return t.Format("01/02 15:04") + Group: GroupEncode, + Short: "Get current timestamp in milliseconds or formatted date string.", + Input: []string{"string (optional, format)"}, + Output: []string{"string"}, + Example: `timestampOrFormatted(), timestampOrFormatted("01/02 15:04")`, + }, + ) + + RegisterFunction("is_full_path", func(path string) bool { + return fileutils.CheckFullPath(path) + }) + + RegisterFunction("get_sess_dir", func(sessid string) string { + session_dir := filepath.Join(assets.GetTempDir(), sessid) + if _, err := os.Stat(session_dir); os.IsNotExist(err) { + err = os.MkdirAll(session_dir, 0700) + if err != nil { + logs.Log.Errorf(err.Error()) + } + } + return session_dir }) // 0o744 0744 diff --git a/helper/utils/fileutils/path.go b/helper/utils/fileutils/path.go index b4949518..c7df1e14 100644 --- a/helper/utils/fileutils/path.go +++ b/helper/utils/fileutils/path.go @@ -1,7 +1,89 @@ package fileutils -import "path/filepath" +import ( + "path/filepath" + "regexp" + "strings" +) func FormatWindowPath(path string) string { return filepath.FromSlash(path) } + +func CheckWindowsPath(path string) bool { + paths := strings.Split(path, "\\") + + if len(paths) < 2 { + return false + } + + for i, p := range paths { + if p == "" { + return false + } + if len(p) > 224 { + return false + } + + if i > 0 { + if strings.Contains(p, ":") { + return false + } + if strings.TrimSpace(p) != p { + return false + } + if strings.Contains(p, "/") { + return false + } + } else { + if !strings.Contains(p, ":") || strings.Contains(p, " ") { + return false + } + if len(strings.Split(p, ":")) != 2 { + return false + } + matched, _ := regexp.MatchString("[a-zA-Z]", strings.Split(p, ":")[0]) + if !matched { + return false + } + } + } + + invalidChars := []string{"?", "/", "|", "<", ">", "*", `"`} + for _, char := range invalidChars { + if strings.Contains(path, char) { + return false + } + } + return true +} + +func CheckLinuxPath(path string) bool { + if path == "" || path[0] != '/' { + return false + } + + paths := strings.Split(path, "/") + if len(paths) < 2 { + return false + } + + for i, p := range paths { + if i != 0 && (p == "" || strings.TrimSpace(p) != p) { + return false + } + } + + invalidChars := []string{"?", "|", "<", ">", "*", `"`, ":"} + for _, char := range invalidChars { + if strings.Contains(path, char) { + return false + } + } + return true +} +func CheckFullPath(path string) bool { + checkWindowsPath := CheckWindowsPath(path) + checkLinuxPath := CheckLinuxPath(path) + return checkWindowsPath || checkLinuxPath +} diff --git a/helper/utils/pe/bof.go b/helper/utils/pe/bof.go index 7be51374..a535b340 100644 --- a/helper/utils/pe/bof.go +++ b/helper/utils/pe/bof.go @@ -2,10 +2,14 @@ package pe import ( "encoding/base64" + "encoding/binary" "fmt" + "github.com/chainreactors/malice-network/client/assets" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "io" "net/http" "os" + "path/filepath" "strconv" "strings" ) @@ -160,7 +164,6 @@ func UnPackFile(data string) ([]byte, error) { if strings.HasPrefix(data, "file:") { data = data[5:] } - return os.ReadFile(data) } @@ -182,8 +185,9 @@ func UnpackURL(data string) ([]byte, error) { func Unpack(data string) ([]byte, error) { unpakced := strings.SplitN(data, ":", 2) - if len(unpakced) == 1 { - return UnPackFile(data) + result, err := UnPackFile(data) + if err == nil { + return result, err } switch unpakced[0] { case "file": @@ -199,10 +203,13 @@ func Unpack(data string) ([]byte, error) { const ( CALLBACK_OUTPUT = 0 - CALLBACK_SCREENSHOT = 3 - CALLBACK_ERROR = 13 - CALLBACK_OUTPUT_OEM = 30 - CALLBACK_OUTPUT_UTF8 = 32 + CALLBACK_FILE = 0x02 + CALLBACK_FILE_WRITE = 0x08 + CALLBACK_FILE_CLOSE = 0x09 + CALLBACK_SCREENSHOT = 0x03 + CALLBACK_ERROR = 0x0d + CALLBACK_OUTPUT_OEM = 0x1e + CALLBACK_OUTPUT_UTF8 = 0x20 ) type BOFResponse struct { @@ -212,25 +219,101 @@ type BOFResponse struct { Data []byte } -func (bof *BOFResponse) String() string { - switch bof.CallbackType { - case CALLBACK_OUTPUT, CALLBACK_OUTPUT_OEM, CALLBACK_OUTPUT_UTF8: - return string(bof.Data) - case CALLBACK_ERROR: - return fmt.Sprintf("Error: %s", string(bof.Data)) - case CALLBACK_SCREENSHOT: - return "screenshot" - default: - return fmt.Sprintf("\nUnimplemented callback type ID: %d.\nData: %s", bof.CallbackType, bof.Data) - } -} - type BOFResponses []*BOFResponse -func (bofs BOFResponses) String() string { - var s strings.Builder - for _, r := range bofs { - s.WriteString(r.String() + "\n") +func (bofResps BOFResponses) Handler(sess *clientpb.Session) string { + var file *os.File + var fileMap map[string]*os.File + var err error + var results strings.Builder + + fileMap = make(map[string]*os.File) + + for _, bofResp := range bofResps { + var result string + switch bofResp.CallbackType { + case CALLBACK_OUTPUT, CALLBACK_OUTPUT_OEM, CALLBACK_OUTPUT_UTF8: + result = string(bofResp.Data) + case CALLBACK_ERROR: + result = fmt.Sprintf("Error occurred: %s", string(bofResp.Data)) + case CALLBACK_SCREENSHOT: + fileName := "screenshot.jpg" + result = func() string { + if bofResp.Length-4 <= 0 { + return fmt.Sprintf("Null screenshot data") + } + screenfile, err := assets.GenerateTempFile(sess.SessionId, fileName) + if err != nil { + return fmt.Sprintf("Failed to create screenshot file") + } + defer func() { + err := screenfile.Close() + if err != nil { + return + } + }() + data := bofResp.Data[4:] + if _, err := screenfile.Write(data); err != nil { + return fmt.Sprintf("Failed to write screenshot data: %s", err.Error()) + } + return fmt.Sprintf("Screenshot saved to %s", screenfile.Name()) + }() + case CALLBACK_FILE: + result = func() string { + fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) + fileName := string(bofResp.Data[8:]) + file, err = os.OpenFile(fileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + return fmt.Sprintf("Could not open file '%s' (ID: %s): %s", filepath.Base(file.Name()), fileId, err) + } + fileMap[fileId] = file + return fmt.Sprintf("File '%s' (ID: %s) opened successfully", filepath.Base(file.Name()), fileId) + }() + case CALLBACK_FILE_WRITE: + result = func() string { + fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) + file = fileMap[fileId] + if file == nil { + return fmt.Sprintf("No open file to write to (ID: %s)", fileId) + } + _, err = file.Write(bofResp.Data[4:]) + if err != nil { + return fmt.Sprintf("Error writing to file (ID: %s): %s", fileId, err) + } + return fmt.Sprintf("Data(Size: %d) written to file (ID: %s) successfully", bofResp.Length-4, fileId) + }() + case CALLBACK_FILE_CLOSE: + result = func() string { + fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) + file = fileMap[fileId] + if file == nil { + return fmt.Sprintf("No open file to close (ID: %s)", fileId) + } + err = file.Close() + if err != nil { + return fmt.Sprintf("Error closing file (ID: %s): %s", fileId, err) + } + delete(fileMap, fileId) + return fmt.Sprintf("File (ID: %s) closed successfully", fileId) + }() + default: + result = func() string { + return fmt.Sprintf("Unimplemented callback type : %d", bofResp.CallbackType) + }() + } + results.WriteString(result + "\n") + } + // Close any remaining open files + for fileId, file := range fileMap { + if file != nil { + err := file.Close() + if err != nil { + results.WriteString(fmt.Sprintf("Error closing file (ID: %s): %s\n", fileId, err)) + } else { + results.WriteString(fmt.Sprintf("File (ID: %s) closed automatically due to end of processing\n", fileId)) + } + delete(fileMap, fileId) + } } - return s.String() + return results.String() } From 823cbb46edc7c9d14d39dc704deccb29807d7980 Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Wed, 8 Jan 2025 11:27:17 +0800 Subject: [PATCH 05/40] =?UTF-8?q?fix=EF=BC=9Awebsite=20stop=20failed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/command/listener/commands.go | 2 +- client/command/listener/website.go | 24 ++++++++++++++---------- server/internal/db/helper.go | 2 +- server/rpc/rpc-website.go | 19 +++++++++++-------- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/client/command/listener/commands.go b/client/command/listener/commands.go index 25703afc..4773b0a9 100644 --- a/client/command/listener/commands.go +++ b/client/command/listener/commands.go @@ -311,7 +311,7 @@ website add /path/to/content.html --website web_test --path /custom/path --type ~~~`, } - common.BindFlag(websiteAddContentCmd, func(f *pflag.FlagSet) { + common.BindFlag(websiteAddContentCmd, common.EncryptionFlagSet, func(f *pflag.FlagSet) { f.String("website", "", "website name (required)") f.String("path", "", "web path for the content (defaults to filename)") f.String("type", "raw", "content type of the file") diff --git a/client/command/listener/website.go b/client/command/listener/website.go index d173286a..a9db572a 100644 --- a/client/command/listener/website.go +++ b/client/command/listener/website.go @@ -132,6 +132,7 @@ func AddWebContentCmd(cmd *cobra.Command, con *repl.Console) error { websiteName, _ := cmd.Flags().GetString("website") webPath, _ := cmd.Flags().GetString("path") contentType, _ := cmd.Flags().GetString("type") + encryption := common.ParseEncryptionFlags(cmd) if webPath == "" { webPath = "/" + filepath.Base(filePath) @@ -145,11 +146,12 @@ func AddWebContentCmd(cmd *cobra.Command, con *repl.Console) error { website := &clientpb.Website{ Contents: map[string]*clientpb.WebContent{ webPath: { - WebsiteId: websiteName, - File: filePath, - Path: webPath, - Type: contentType, - Content: content, + WebsiteId: websiteName, + File: filePath, + Path: webPath, + Type: contentType, + Content: content, + Encryption: encryption, }, }, } @@ -169,6 +171,7 @@ func UpdateWebContentCmd(cmd *cobra.Command, con *repl.Console) error { filePath := cmd.Flags().Arg(1) websiteName, _ := cmd.Flags().GetString("website") contentType, _ := cmd.Flags().GetString("type") + encryption := common.ParseEncryptionFlags(cmd) content, err := os.ReadFile(filePath) if err != nil { @@ -176,11 +179,12 @@ func UpdateWebContentCmd(cmd *cobra.Command, con *repl.Console) error { } webContent := &clientpb.WebContent{ - Id: contentId, - WebsiteId: websiteName, - File: filepath.Base(filePath), - Type: contentType, - Content: content, + Id: contentId, + WebsiteId: websiteName, + File: filepath.Base(filePath), + Type: contentType, + Content: content, + Encryption: encryption, } _, err = con.Rpc.WebsiteUpdateContent(con.Context(), webContent) diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index 16062877..fe19e6e1 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -255,7 +255,7 @@ func ListPipelines(listenerID string) ([]models.Pipeline, error) { func DeleteWebsite(name string) error { website := models.WebsiteContent{} - result := Session().Where("name = ?", name).First(&website) + result := Session().Where("pipeline_id = ?", name).First(&website) if result.Error != nil { return result.Error } diff --git a/server/rpc/rpc-website.go b/server/rpc/rpc-website.go index 6a61abc8..dcea341f 100644 --- a/server/rpc/rpc-website.go +++ b/server/rpc/rpc-website.go @@ -2,6 +2,7 @@ package rpc import ( "context" + "errors" "fmt" "os" "path/filepath" @@ -235,6 +236,15 @@ func (rpc *Server) DeleteWebsite(ctx context.Context, req *clientpb.CtrlPipeline } listener.RemovePipeline(pipeline) + err = db.DeletePipeline(req.Name) + if err != nil { + return nil, err + } + err = db.DeleteWebsite(req.Name) + if err != nil && !errors.Is(err, db.ErrRecordNotFound) { + return nil, err + } + job := core.Jobs.Get(req.Name) if job == nil { return nil, fmt.Errorf("website %s not found", req.Name) @@ -245,13 +255,6 @@ func (rpc *Server) DeleteWebsite(ctx context.Context, req *clientpb.CtrlPipeline Ctrl: consts.CtrlWebsiteStop, Job: job.ToProtobuf(), } - err = db.DeletePipeline(req.Name) - if err != nil { - return nil, err - } - err = db.DeleteWebsite(req.Name) - if err != nil { - return nil, err - } + return &clientpb.Empty{}, nil } From 2a4fa61cdf9d84c5bf045234d1e1f4dbc4127a19 Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Wed, 8 Jan 2025 18:39:09 +0800 Subject: [PATCH 06/40] feat: add config refresh and update --- client/command/client.go | 2 + client/command/config/commands.go | 68 + client/command/config/config.go | 20 + client/command/config/github.go | 48 + client/command/config/notify.go | 32 + client/command/listener/commands.go | 93 +- helper/consts/message.go | 4 + helper/errs/grpc.go | 3 + helper/proto/client/clientpb/client.pb.go | 1707 ++++++++++++++--- helper/proto/client/rootpb/root.pb.go | 52 +- helper/proto/implant/implantpb/implant.pb.go | 99 +- helper/proto/implant/implantpb/module.pb.go | 1242 +++++++++--- helper/proto/services/clientrpc/service.pb.go | 388 ++-- .../services/clientrpc/service_grpc.pb.go | 646 ++++--- .../proto/services/listenerrpc/service.pb.go | 6 +- .../services/listenerrpc/service_grpc.pb.go | 224 ++- server/internal/configs/config.go | 28 + server/internal/configs/server.go | 46 +- server/rpc/rpc-config.go | 109 ++ 19 files changed, 3605 insertions(+), 1212 deletions(-) create mode 100644 client/command/config/commands.go create mode 100644 client/command/config/config.go create mode 100644 client/command/config/github.go create mode 100644 client/command/config/notify.go create mode 100644 server/rpc/rpc-config.go diff --git a/client/command/client.go b/client/command/client.go index 570f2eea..f9d2f9e4 100644 --- a/client/command/client.go +++ b/client/command/client.go @@ -6,6 +6,7 @@ import ( "github.com/chainreactors/malice-network/client/command/armory" "github.com/chainreactors/malice-network/client/command/build" "github.com/chainreactors/malice-network/client/command/common" + "github.com/chainreactors/malice-network/client/command/config" "github.com/chainreactors/malice-network/client/command/extension" "github.com/chainreactors/malice-network/client/command/generic" "github.com/chainreactors/malice-network/client/command/help" @@ -30,6 +31,7 @@ func BindCommonCommands(bind BindFunc) { extension.Commands, armory.Commands, mal.Commands, + config.Commands, ) bind(consts.ListenerGroup, diff --git a/client/command/config/commands.go b/client/command/config/commands.go new file mode 100644 index 00000000..614f8ab7 --- /dev/null +++ b/client/command/config/commands.go @@ -0,0 +1,68 @@ +package config + +import ( + "github.com/chainreactors/malice-network/client/command/common" + "github.com/chainreactors/malice-network/client/repl" + "github.com/chainreactors/malice-network/helper/consts" + "github.com/spf13/cobra" +) + +func Commands(con *repl.Console) []*cobra.Command { + configCmd := &cobra.Command{ + Use: consts.CommandConfig, + Short: "Config operations", + RunE: func(cmd *cobra.Command, args []string) error { + return cmd.Help() + }, + } + + configRefreshCmd := &cobra.Command{ + Use: consts.CommandRefresh, + Short: "Refresh config", + RunE: func(cmd *cobra.Command, args []string) error { + return RefreshCmd(cmd, con) + }, + } + + githubCmd := &cobra.Command{ + Use: consts.CommandGithub, + Short: "Show Github config and more operations", + RunE: func(cmd *cobra.Command, args []string) error { + return GetGithubConfigCmd(cmd, con) + }, + } + githubUpdateCmd := &cobra.Command{ + Use: consts.CommandConfigUpdate, + Short: "Update Github config", + RunE: func(cmd *cobra.Command, args []string) error { + return UpdateGithubConfigCmd(cmd, con) + }, + } + + common.BindFlag(githubUpdateCmd, common.GithubFlagSet) + + githubCmd.AddCommand(githubUpdateCmd) + + notifyCmd := &cobra.Command{ + Use: consts.CommandNotify, + Short: "Show Notify config and more operations", + RunE: func(cmd *cobra.Command, args []string) error { + return GetNotifyCmd(cmd, con) + }, + } + + notifyUpdateCmd := &cobra.Command{ + Use: consts.CommandConfigUpdate, + Short: "Update Notify config", + RunE: func(cmd *cobra.Command, args []string) error { + return UpdateNotifyCmd(cmd, con) + }, + } + + common.BindFlag(notifyUpdateCmd, common.TelegramSet, common.DingTalkSet, common.LarkSet, common.ServerChanSet) + + notifyCmd.AddCommand(notifyUpdateCmd) + + configCmd.AddCommand(configRefreshCmd, githubCmd, notifyCmd) + return []*cobra.Command{configCmd} +} diff --git a/client/command/config/config.go b/client/command/config/config.go new file mode 100644 index 00000000..bec38fb8 --- /dev/null +++ b/client/command/config/config.go @@ -0,0 +1,20 @@ +package config + +import ( + "github.com/chainreactors/malice-network/client/repl" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/spf13/cobra" +) + +func RefreshCmd(cmd *cobra.Command, con *repl.Console) error { + _, err := Refresh(con) + if err != nil { + return err + } + con.Log.Console("Refresh config success\n") + return nil +} + +func Refresh(con *repl.Console) (*clientpb.Empty, error) { + return con.Rpc.RefreshConfig(con.Context(), &clientpb.Empty{}) +} diff --git a/client/command/config/github.go b/client/command/config/github.go new file mode 100644 index 00000000..2e578918 --- /dev/null +++ b/client/command/config/github.go @@ -0,0 +1,48 @@ +package config + +import ( + "github.com/chainreactors/malice-network/client/command/common" + "github.com/chainreactors/malice-network/client/repl" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/tui" + "github.com/spf13/cobra" +) + +var githubConfig struct { + Repo string + Owner string + Token string + Workflow string +} + +func GetGithubConfigCmd(cmd *cobra.Command, con *repl.Console) error { + resp, err := con.Rpc.GetGithubConfig(con.Context(), &clientpb.Empty{}) + if err != nil { + return err + } + githubConfig.Repo = resp.Repo + githubConfig.Owner = resp.Owner + githubConfig.Token = resp.Token + githubConfig.Workflow = resp.WorkflowId + con.Log.Console(tui.RendStructDefault(githubConfig) + "\n") + return nil +} + +func UpdateGithubConfigCmd(cmd *cobra.Command, con *repl.Console) error { + owner, repo, token, workflow := common.ParseGithubFlags(cmd) + _, err := UpdateGithubConfig(con, owner, repo, token, workflow) + if err != nil { + return err + } + con.Log.Console("Update github config success\n") + return nil +} + +func UpdateGithubConfig(con *repl.Console, owner, repo, token, workflow string) (*clientpb.Empty, error) { + return con.Rpc.UpdateGithubConfig(con.Context(), &clientpb.GithubWorkflowRequest{ + Owner: owner, + Repo: repo, + Token: token, + WorkflowId: workflow, + }) +} diff --git a/client/command/config/notify.go b/client/command/config/notify.go new file mode 100644 index 00000000..f59a43e8 --- /dev/null +++ b/client/command/config/notify.go @@ -0,0 +1,32 @@ +package config + +import ( + "github.com/chainreactors/malice-network/client/command/common" + "github.com/chainreactors/malice-network/client/repl" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/tui" + "github.com/spf13/cobra" +) + +func GetNotifyCmd(cmd *cobra.Command, con *repl.Console) error { + notifyConfig, err := con.Rpc.GetNotifyConfig(con.Context(), &clientpb.Empty{}) + if err != nil { + return err + } + con.Log.Console(tui.RendStructDefault(notifyConfig) + "\n") + return nil +} + +func UpdateNotifyCmd(cmd *cobra.Command, con *repl.Console) error { + notify := common.ParseNotifyFlags(cmd) + _, err := UpdateNotify(con, notify) + if err != nil { + return err + } + con.Log.Console("Update notify config success\n") + return nil +} + +func UpdateNotify(con *repl.Console, notify *clientpb.Notify) (*clientpb.Empty, error) { + return con.Rpc.UpdateNotifyConfig(con.Context(), notify) +} diff --git a/client/command/listener/commands.go b/client/command/listener/commands.go index 4773b0a9..ba7e1cb1 100644 --- a/client/command/listener/commands.go +++ b/client/command/listener/commands.go @@ -37,41 +37,26 @@ job tcpCmd := &cobra.Command{ Use: consts.CommandPipelineTcp, - Short: "List tcp pipelines in listener", - Long: "Use a table to list TCP pipelines along with their corresponding listeners", - Args: cobra.MaximumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - return cmd.Help() - }, - Example: `~~~ -tcp listener -~~~`, - } - - newTCPPipelineCmd := &cobra.Command{ - Use: consts.CommandPipelineNew + " [name] ", Short: "Register a new TCP pipeline and start it", - Long: `Register a new TCP pipeline with the specified listener. -If **name** is not provided, it will be generated in the format **listenerID_tcp_port**.`, + Long: "Register a new TCP pipeline with the specified listener.", RunE: func(cmd *cobra.Command, args []string) error { return NewTcpPipelineCmd(cmd, con) }, Args: cobra.MaximumNArgs(1), Example: `~~~ // Register a TCP pipeline with the default settings -tcp register --listener tcp_default +tcp --listener tcp_default // Register a TCP pipeline with a custom name, host, and port -tcp register --name tcp_test --listener tcp_default --host 192.168.0.43 --port 5003 +tcp --name tcp_test --listener tcp_default --host 192.168.0.43 --port 5003 // Register a TCP pipeline with TLS enabled and specify certificate and key paths -tcp register --listener tcp_default --tls --cert_path /path/to/cert --key_path /path/to/key +tcp --listener tcp_default --tls --cert_path /path/to/cert --key_path /path/to/key ~~~`, } + common.BindFlag(tcpCmd, common.TlsCertFlagSet, common.PipelineFlagSet, common.EncryptionFlagSet) - common.BindFlag(newTCPPipelineCmd, common.TlsCertFlagSet, common.PipelineFlagSet, common.EncryptionFlagSet) - - common.BindFlagCompletions(newTCPPipelineCmd, func(comp carapace.ActionMap) { + common.BindFlagCompletions(tcpCmd, func(comp carapace.ActionMap) { comp["listener"] = common.ListenerIDCompleter(con) comp["host"] = carapace.ActionValues().Usage("tcp host") comp["port"] = carapace.ActionValues().Usage("tcp port") @@ -79,19 +64,10 @@ tcp register --listener tcp_default --tls --cert_path /path/to/cert --key_path / comp["key_path"] = carapace.ActionFiles().Usage("path to the key file") comp["tls"] = carapace.ActionValues().Usage("enable tls") }) - newTCPPipelineCmd.MarkFlagRequired("listener") - tcpCmd.AddCommand(newTCPPipelineCmd) + tcpCmd.MarkFlagRequired("listener") bindCmd := &cobra.Command{ Use: consts.CommandPipelineBind, - Short: "manage bind pipeline to a listener", - RunE: func(cmd *cobra.Command, args []string) error { - return cmd.Help() - }, - } - - newBindCmd := &cobra.Command{ - Use: consts.CommandPipelineNew + " [name]", Short: "Register a new bind pipeline and start it", RunE: func(cmd *cobra.Command, args []string) error { return NewBindPipelineCmd(cmd, con) @@ -99,20 +75,19 @@ tcp register --listener tcp_default --tls --cert_path /path/to/cert --key_path / Example: ` new bind pipeline ~~~ -bind new listener +bind listener ~~~ `, } - common.BindFlag(newBindCmd, func(f *pflag.FlagSet) { + common.BindFlag(bindCmd, func(f *pflag.FlagSet) { f.String("listener", "", "listener id") }) - common.BindFlagCompletions(newBindCmd, func(comp carapace.ActionMap) { + common.BindFlagCompletions(bindCmd, func(comp carapace.ActionMap) { comp["listener"] = common.ListenerIDCompleter(con) }) - bindCmd.AddCommand(newBindCmd) pipelineCmd := &cobra.Command{ Use: consts.CommandPipeline, Short: "manage pipeline", @@ -191,28 +166,6 @@ pipeline list listener_id websiteCmd := &cobra.Command{ Use: consts.CommandWebsite, - Short: "website manager", - RunE: func(cmd *cobra.Command, args []string) error { - return cmd.Help() - }, - } - - common.BindArgCompletions(websiteCmd, nil, common.ListenerIDCompleter(con)) - - websiteListCmd := &cobra.Command{ - Use: consts.CommandPipelineList, - Short: "List website in listener", - Long: "Use a table to list websites along with their corresponding listeners", - RunE: func(cmd *cobra.Command, args []string) error { - return ListWebsitesCmd(cmd, con) - }, - Example: `~~~ -website [listener] -~~~`, - } - - websiteRegisterCmd := &cobra.Command{ - Use: consts.CommandPipelineNew + " [name]", Short: "Register a new website", Args: cobra.MaximumNArgs(1), Long: `Register a new website with the specified listener. If **name** is not provided, it will be generated in the format **listenerID_web_port**.`, @@ -221,21 +174,21 @@ website [listener] }, Example: `~~~ // Register a website with the default settings -website new --listener tcp_default --root /webtest +website web_test --listener tcp_default --root /webtest // Register a website with a custom name and port -website new web_test --listener tcp_default --port 5003 --root /webtest +website web_test --listener tcp_default --port 5003 --root /webtest // Register a website with TLS enabled -website new --listener tcp_default --root /webtest --tls --cert /path/to/cert --key /path/to/key +website web_test --listener tcp_default --root /webtest --tls --cert /path/to/cert --key /path/to/key ~~~`, } - common.BindFlag(websiteRegisterCmd, common.TlsCertFlagSet, common.PipelineFlagSet, func(f *pflag.FlagSet) { + common.BindFlag(websiteCmd, common.TlsCertFlagSet, common.PipelineFlagSet, func(f *pflag.FlagSet) { f.String("root", "/", "website root path") }) - common.BindFlagCompletions(websiteRegisterCmd, func(comp carapace.ActionMap) { + common.BindFlagCompletions(websiteCmd, func(comp carapace.ActionMap) { comp["listener"] = common.ListenerIDCompleter(con) comp["port"] = carapace.ActionValues().Usage("website port") comp["root"] = carapace.ActionValues().Usage("website root path") @@ -244,6 +197,20 @@ website new --listener tcp_default --root /webtest --tls --cert /path/to/cert -- comp["tls"] = carapace.ActionValues().Usage("enable tls") }) + common.BindArgCompletions(websiteCmd, nil, carapace.ActionValues().Usage("website name")) + + websiteListCmd := &cobra.Command{ + Use: consts.CommandPipelineList, + Short: "List website in listener", + Long: "Use a table to list websites along with their corresponding listeners", + RunE: func(cmd *cobra.Command, args []string) error { + return ListWebsitesCmd(cmd, con) + }, + Example: `~~~ +website [listener] +~~~`, + } + websiteStartCmd := &cobra.Command{ Use: consts.CommandPipelineStart + " [name]", Short: "Start a website", @@ -384,7 +351,7 @@ website list-content web_test common.BindArgCompletions(websiteListContentCmd, nil, common.WebsiteCompleter(con)) - websiteCmd.AddCommand(websiteListCmd, websiteRegisterCmd, websiteStartCmd, websiteStopCmd, + websiteCmd.AddCommand(websiteListCmd, websiteStartCmd, websiteStopCmd, websiteAddContentCmd, websiteUpdateContentCmd, websiteRemoveContentCmd, websiteListContentCmd) return []*cobra.Command{listenerCmd, jobCmd, pipelineCmd, tcpCmd, bindCmd, websiteCmd} diff --git a/helper/consts/message.go b/helper/consts/message.go index 2c4147c2..2f518fd5 100644 --- a/helper/consts/message.go +++ b/helper/consts/message.go @@ -215,6 +215,10 @@ const ( CommandActionEnable = "enable" CommandActionDisable = "disable" CommandActionList = "list" + CommandConfig = "config" + CommandRefresh = "refresh" + CommandConfigUpdate = "update" + CommandGithub = "github" ) const ( diff --git a/helper/errs/grpc.go b/helper/errs/grpc.go index 9afaaf66..13a87507 100644 --- a/helper/errs/grpc.go +++ b/helper/errs/grpc.go @@ -37,4 +37,7 @@ var ( ErrorWorkflowNotActive = status.Error(codes.Unknown, "workflow not active") ErrorDockerNotActive = status.Error(codes.Unknown, "docker not active") //ErrInvalidBeaconTaskCancelState = status.Error(codes.InvalidArgument, fmt.Sprintf("Invalid task state, must be '%s' to cancel", models.PENDING)) + + ErrNotFoundGithubConfig = status.Error(codes.NotFound, "Github config not found") + ErrNotFoundNotifyConfig = status.Error(codes.NotFound, "Notify config not found") ) diff --git a/helper/proto/client/clientpb/client.pb.go b/helper/proto/client/clientpb/client.pb.go index d0bd715e..3ec3caaf 100644 --- a/helper/proto/client/clientpb/client.pb.go +++ b/helper/proto/client/clientpb/client.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v3.20.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: client/clientpb/client.proto package clientpb @@ -29,9 +29,11 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} - mi := &file_client_clientpb_client_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Empty) String() string { @@ -42,7 +44,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74,9 +76,11 @@ type Basic struct { func (x *Basic) Reset() { *x = Basic{} - mi := &file_client_clientpb_client_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Basic) String() string { @@ -87,7 +91,7 @@ func (*Basic) ProtoMessage() {} func (x *Basic) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,9 +194,11 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - mi := &file_client_clientpb_client_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Session) String() string { @@ -203,7 +209,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,9 +396,11 @@ type SessionRequest struct { func (x *SessionRequest) Reset() { *x = SessionRequest{} - mi := &file_client_clientpb_client_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SessionRequest) String() string { @@ -403,7 +411,7 @@ func (*SessionRequest) ProtoMessage() {} func (x *SessionRequest) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,9 +451,11 @@ type TaskRequest struct { func (x *TaskRequest) Reset() { *x = TaskRequest{} - mi := &file_client_clientpb_client_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskRequest) String() string { @@ -456,7 +466,7 @@ func (*TaskRequest) ProtoMessage() {} func (x *TaskRequest) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,9 +505,11 @@ type Int struct { func (x *Int) Reset() { *x = Int{} - mi := &file_client_clientpb_client_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Int) String() string { @@ -508,7 +520,7 @@ func (*Int) ProtoMessage() {} func (x *Int) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -542,9 +554,11 @@ type BasicUpdateSession struct { func (x *BasicUpdateSession) Reset() { *x = BasicUpdateSession{} - mi := &file_client_clientpb_client_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BasicUpdateSession) String() string { @@ -555,7 +569,7 @@ func (*BasicUpdateSession) ProtoMessage() {} func (x *BasicUpdateSession) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,9 +615,11 @@ type Sessions struct { func (x *Sessions) Reset() { *x = Sessions{} - mi := &file_client_clientpb_client_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Sessions) String() string { @@ -614,7 +630,7 @@ func (*Sessions) ProtoMessage() {} func (x *Sessions) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,9 +662,11 @@ type SpiteCache struct { func (x *SpiteCache) Reset() { *x = SpiteCache{} - mi := &file_client_clientpb_client_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SpiteCache) String() string { @@ -659,7 +677,7 @@ func (*SpiteCache) ProtoMessage() {} func (x *SpiteCache) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,9 +712,11 @@ type SpiteCacheItem struct { func (x *SpiteCacheItem) Reset() { *x = SpiteCacheItem{} - mi := &file_client_clientpb_client_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SpiteCacheItem) String() string { @@ -707,7 +727,7 @@ func (*SpiteCacheItem) ProtoMessage() {} func (x *SpiteCacheItem) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,9 +783,11 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - mi := &file_client_clientpb_client_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Job) String() string { @@ -776,7 +798,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,9 +851,11 @@ type Jobs struct { func (x *Jobs) Reset() { *x = Jobs{} - mi := &file_client_clientpb_client_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Jobs) String() string { @@ -842,7 +866,7 @@ func (*Jobs) ProtoMessage() {} func (x *Jobs) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -876,9 +900,11 @@ type JobCtrl struct { func (x *JobCtrl) Reset() { *x = JobCtrl{} - mi := &file_client_clientpb_client_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *JobCtrl) String() string { @@ -889,7 +915,7 @@ func (*JobCtrl) ProtoMessage() {} func (x *JobCtrl) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -939,9 +965,11 @@ type JobStatus struct { func (x *JobStatus) Reset() { *x = JobStatus{} - mi := &file_client_clientpb_client_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *JobStatus) String() string { @@ -952,7 +980,7 @@ func (*JobStatus) ProtoMessage() {} func (x *JobStatus) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1015,9 +1043,11 @@ type Listener struct { func (x *Listener) Reset() { *x = Listener{} - mi := &file_client_clientpb_client_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Listener) String() string { @@ -1028,7 +1058,7 @@ func (*Listener) ProtoMessage() {} func (x *Listener) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1081,9 +1111,11 @@ type Listeners struct { func (x *Listeners) Reset() { *x = Listeners{} - mi := &file_client_clientpb_client_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Listeners) String() string { @@ -1094,7 +1126,7 @@ func (*Listeners) ProtoMessage() {} func (x *Listeners) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,9 +1161,11 @@ type Client struct { func (x *Client) Reset() { *x = Client{} - mi := &file_client_clientpb_client_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Client) String() string { @@ -1142,7 +1176,7 @@ func (*Client) ProtoMessage() {} func (x *Client) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1195,9 +1229,11 @@ type Clients struct { func (x *Clients) Reset() { *x = Clients{} - mi := &file_client_clientpb_client_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Clients) String() string { @@ -1208,7 +1244,7 @@ func (*Clients) ProtoMessage() {} func (x *Clients) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1249,9 +1285,11 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - mi := &file_client_clientpb_client_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Event) String() string { @@ -1262,7 +1300,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1357,9 +1395,11 @@ type Events struct { func (x *Events) Reset() { *x = Events{} - mi := &file_client_clientpb_client_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Events) String() string { @@ -1370,7 +1410,7 @@ func (*Events) ProtoMessage() {} func (x *Events) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1409,9 +1449,11 @@ type On struct { func (x *On) Reset() { *x = On{} - mi := &file_client_clientpb_client_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *On) String() string { @@ -1422,7 +1464,7 @@ func (*On) ProtoMessage() {} func (x *On) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,9 +1547,11 @@ type LoginReq struct { func (x *LoginReq) Reset() { *x = LoginReq{} - mi := &file_client_clientpb_client_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoginReq) String() string { @@ -1518,7 +1562,7 @@ func (*LoginReq) ProtoMessage() {} func (x *LoginReq) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1566,9 +1610,11 @@ type RegisterResp struct { func (x *RegisterResp) Reset() { *x = RegisterResp{} - mi := &file_client_clientpb_client_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegisterResp) String() string { @@ -1579,7 +1625,7 @@ func (*RegisterResp) ProtoMessage() {} func (x *RegisterResp) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1625,9 +1671,11 @@ type Sync struct { func (x *Sync) Reset() { *x = Sync{} - mi := &file_client_clientpb_client_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Sync) String() string { @@ -1638,7 +1686,7 @@ func (*Sync) ProtoMessage() {} func (x *Sync) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1671,9 +1719,11 @@ type SyncResp struct { func (x *SyncResp) Reset() { *x = SyncResp{} - mi := &file_client_clientpb_client_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SyncResp) String() string { @@ -1684,7 +1734,7 @@ func (*SyncResp) ProtoMessage() {} func (x *SyncResp) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1725,9 +1775,11 @@ type TaskContext struct { func (x *TaskContext) Reset() { *x = TaskContext{} - mi := &file_client_clientpb_client_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskContext) String() string { @@ -1738,7 +1790,7 @@ func (*TaskContext) ProtoMessage() {} func (x *TaskContext) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1786,9 +1838,11 @@ type TaskContexts struct { func (x *TaskContexts) Reset() { *x = TaskContexts{} - mi := &file_client_clientpb_client_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskContexts) String() string { @@ -1799,7 +1853,7 @@ func (*TaskContexts) ProtoMessage() {} func (x *TaskContexts) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1845,9 +1899,11 @@ type TasksContext struct { func (x *TasksContext) Reset() { *x = TasksContext{} - mi := &file_client_clientpb_client_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TasksContext) String() string { @@ -1858,7 +1914,7 @@ func (*TasksContext) ProtoMessage() {} func (x *TasksContext) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1901,9 +1957,11 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - mi := &file_client_clientpb_client_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Task) String() string { @@ -1914,7 +1972,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2023,9 +2081,11 @@ type Tasks struct { func (x *Tasks) Reset() { *x = Tasks{} - mi := &file_client_clientpb_client_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Tasks) String() string { @@ -2036,7 +2096,7 @@ func (*Tasks) ProtoMessage() {} func (x *Tasks) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2068,9 +2128,11 @@ type TaskDescs struct { func (x *TaskDescs) Reset() { *x = TaskDescs{} - mi := &file_client_clientpb_client_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskDescs) String() string { @@ -2081,7 +2143,7 @@ func (*TaskDescs) ProtoMessage() {} func (x *TaskDescs) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2119,9 +2181,11 @@ type File struct { func (x *File) Reset() { *x = File{} - mi := &file_client_clientpb_client_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *File) String() string { @@ -2132,7 +2196,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2206,9 +2270,11 @@ type Files struct { func (x *Files) Reset() { *x = Files{} - mi := &file_client_clientpb_client_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Files) String() string { @@ -2219,7 +2285,7 @@ func (*Files) ProtoMessage() {} func (x *Files) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2256,9 +2322,11 @@ type TaskDesc struct { func (x *TaskDesc) Reset() { *x = TaskDesc{} - mi := &file_client_clientpb_client_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskDesc) String() string { @@ -2269,7 +2337,7 @@ func (*TaskDesc) ProtoMessage() {} func (x *TaskDesc) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2336,9 +2404,11 @@ type Plugins struct { func (x *Plugins) Reset() { *x = Plugins{} - mi := &file_client_clientpb_client_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Plugins) String() string { @@ -2349,7 +2419,7 @@ func (*Plugins) ProtoMessage() {} func (x *Plugins) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2382,9 +2452,11 @@ type Plugin struct { func (x *Plugin) Reset() { *x = Plugin{} - mi := &file_client_clientpb_client_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Plugin) String() string { @@ -2395,7 +2467,7 @@ func (*Plugin) ProtoMessage() {} func (x *Plugin) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2437,9 +2509,11 @@ type EXE2Shellcode struct { func (x *EXE2Shellcode) Reset() { *x = EXE2Shellcode{} - mi := &file_client_clientpb_client_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EXE2Shellcode) String() string { @@ -2450,7 +2524,7 @@ func (*EXE2Shellcode) ProtoMessage() {} func (x *EXE2Shellcode) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2507,9 +2581,11 @@ type DLL2Shellcode struct { func (x *DLL2Shellcode) Reset() { *x = DLL2Shellcode{} - mi := &file_client_clientpb_client_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DLL2Shellcode) String() string { @@ -2520,7 +2596,7 @@ func (*DLL2Shellcode) ProtoMessage() {} func (x *DLL2Shellcode) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2583,9 +2659,11 @@ type ShellcodeEncode struct { func (x *ShellcodeEncode) Reset() { *x = ShellcodeEncode{} - mi := &file_client_clientpb_client_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ShellcodeEncode) String() string { @@ -2596,7 +2674,7 @@ func (*ShellcodeEncode) ProtoMessage() {} func (x *ShellcodeEncode) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2649,9 +2727,11 @@ type Bin struct { func (x *Bin) Reset() { *x = Bin{} - mi := &file_client_clientpb_client_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Bin) String() string { @@ -2662,7 +2742,7 @@ func (*Bin) ProtoMessage() {} func (x *Bin) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2711,9 +2791,11 @@ type Builder struct { func (x *Builder) Reset() { *x = Builder{} - mi := &file_client_clientpb_client_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Builder) String() string { @@ -2724,7 +2806,7 @@ func (*Builder) ProtoMessage() {} func (x *Builder) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2886,9 +2968,11 @@ type Artifact struct { func (x *Artifact) Reset() { *x = Artifact{} - mi := &file_client_clientpb_client_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Artifact) String() string { @@ -2899,7 +2983,7 @@ func (*Artifact) ProtoMessage() {} func (x *Artifact) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3008,9 +3092,11 @@ type Artifacts struct { func (x *Artifacts) Reset() { *x = Artifacts{} - mi := &file_client_clientpb_client_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Artifacts) String() string { @@ -3021,7 +3107,7 @@ func (*Artifacts) ProtoMessage() {} func (x *Artifacts) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3063,9 +3149,11 @@ type Profile struct { func (x *Profile) Reset() { *x = Profile{} - mi := &file_client_clientpb_client_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Profile) String() string { @@ -3076,7 +3164,7 @@ func (*Profile) ProtoMessage() {} func (x *Profile) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3178,9 +3266,11 @@ type Profiles struct { func (x *Profiles) Reset() { *x = Profiles{} - mi := &file_client_clientpb_client_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Profiles) String() string { @@ -3191,7 +3281,7 @@ func (*Profiles) ProtoMessage() {} func (x *Profiles) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3235,9 +3325,11 @@ type Generate struct { func (x *Generate) Reset() { *x = Generate{} - mi := &file_client_clientpb_client_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Generate) String() string { @@ -3248,7 +3340,7 @@ func (*Generate) ProtoMessage() {} func (x *Generate) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3364,9 +3456,11 @@ type Builders struct { func (x *Builders) Reset() { *x = Builders{} - mi := &file_client_clientpb_client_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Builders) String() string { @@ -3377,7 +3471,7 @@ func (*Builders) ProtoMessage() {} func (x *Builders) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3415,9 +3509,11 @@ type RegisterSession struct { func (x *RegisterSession) Reset() { *x = RegisterSession{} - mi := &file_client_clientpb_client_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegisterSession) String() string { @@ -3428,7 +3524,7 @@ func (*RegisterSession) ProtoMessage() {} func (x *RegisterSession) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3506,9 +3602,11 @@ type RegisterListener struct { func (x *RegisterListener) Reset() { *x = RegisterListener{} - mi := &file_client_clientpb_client_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegisterListener) String() string { @@ -3519,7 +3617,7 @@ func (*RegisterListener) ProtoMessage() {} func (x *RegisterListener) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3582,9 +3680,11 @@ type SpiteRequest struct { func (x *SpiteRequest) Reset() { *x = SpiteRequest{} - mi := &file_client_clientpb_client_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SpiteRequest) String() string { @@ -3595,7 +3695,7 @@ func (*SpiteRequest) ProtoMessage() {} func (x *SpiteRequest) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3651,9 +3751,11 @@ type SpiteResponse struct { func (x *SpiteResponse) Reset() { *x = SpiteResponse{} - mi := &file_client_clientpb_client_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SpiteResponse) String() string { @@ -3664,7 +3766,7 @@ func (*SpiteResponse) ProtoMessage() {} func (x *SpiteResponse) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3717,9 +3819,11 @@ type Pipelines struct { func (x *Pipelines) Reset() { *x = Pipelines{} - mi := &file_client_clientpb_client_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Pipelines) String() string { @@ -3730,7 +3834,7 @@ func (*Pipelines) ProtoMessage() {} func (x *Pipelines) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3763,7 +3867,6 @@ type Pipeline struct { Parser string `protobuf:"bytes,4,opt,name=parser,proto3" json:"parser,omitempty"` Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` // Types that are assignable to Body: - // // *Pipeline_Tcp // *Pipeline_Bind // *Pipeline_Web @@ -3775,9 +3878,11 @@ type Pipeline struct { func (x *Pipeline) Reset() { *x = Pipeline{} - mi := &file_client_clientpb_client_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Pipeline) String() string { @@ -3788,7 +3893,7 @@ func (*Pipeline) ProtoMessage() {} func (x *Pipeline) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[52] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3926,9 +4031,11 @@ type CtrlPipeline struct { func (x *CtrlPipeline) Reset() { *x = CtrlPipeline{} - mi := &file_client_clientpb_client_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CtrlPipeline) String() string { @@ -3939,7 +4046,7 @@ func (*CtrlPipeline) ProtoMessage() {} func (x *CtrlPipeline) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3980,9 +4087,11 @@ type TLS struct { func (x *TLS) Reset() { *x = TLS{} - mi := &file_client_clientpb_client_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TLS) String() string { @@ -3993,7 +4102,7 @@ func (*TLS) ProtoMessage() {} func (x *TLS) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[54] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4041,9 +4150,11 @@ type Encryption struct { func (x *Encryption) Reset() { *x = Encryption{} - mi := &file_client_clientpb_client_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Encryption) String() string { @@ -4054,7 +4165,7 @@ func (*Encryption) ProtoMessage() {} func (x *Encryption) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[55] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4101,9 +4212,11 @@ type BindPipeline struct { func (x *BindPipeline) Reset() { *x = BindPipeline{} - mi := &file_client_clientpb_client_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BindPipeline) String() string { @@ -4114,7 +4227,7 @@ func (*BindPipeline) ProtoMessage() {} func (x *BindPipeline) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[56] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4156,9 +4269,11 @@ type REM struct { func (x *REM) Reset() { *x = REM{} - mi := &file_client_clientpb_client_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *REM) String() string { @@ -4169,7 +4284,7 @@ func (*REM) ProtoMessage() {} func (x *REM) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[57] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4225,9 +4340,11 @@ type TCPPipeline struct { func (x *TCPPipeline) Reset() { *x = TCPPipeline{} - mi := &file_client_clientpb_client_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TCPPipeline) String() string { @@ -4238,7 +4355,7 @@ func (*TCPPipeline) ProtoMessage() {} func (x *TCPPipeline) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[58] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4300,9 +4417,11 @@ type WebContent struct { func (x *WebContent) Reset() { *x = WebContent{} - mi := &file_client_clientpb_client_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WebContent) String() string { @@ -4313,7 +4432,7 @@ func (*WebContent) ProtoMessage() {} func (x *WebContent) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[59] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4412,9 +4531,11 @@ type Website struct { func (x *Website) Reset() { *x = Website{} - mi := &file_client_clientpb_client_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Website) String() string { @@ -4425,7 +4546,7 @@ func (*Website) ProtoMessage() {} func (x *Website) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[60] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4485,9 +4606,11 @@ type Websites struct { func (x *Websites) Reset() { *x = Websites{} - mi := &file_client_clientpb_client_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Websites) String() string { @@ -4498,7 +4621,7 @@ func (*Websites) ProtoMessage() {} func (x *Websites) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[61] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4530,9 +4653,11 @@ type WebContents struct { func (x *WebContents) Reset() { *x = WebContents{} - mi := &file_client_clientpb_client_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WebContents) String() string { @@ -4543,7 +4668,7 @@ func (*WebContents) ProtoMessage() {} func (x *WebContents) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[62] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4579,9 +4704,11 @@ type Polling struct { func (x *Polling) Reset() { *x = Polling{} - mi := &file_client_clientpb_client_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Polling) String() string { @@ -4592,7 +4719,7 @@ func (*Polling) ProtoMessage() {} func (x *Polling) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[63] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4663,9 +4790,11 @@ type GithubWorkflowRequest struct { func (x *GithubWorkflowRequest) Reset() { *x = GithubWorkflowRequest{} - mi := &file_client_clientpb_client_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GithubWorkflowRequest) String() string { @@ -4676,7 +4805,7 @@ func (*GithubWorkflowRequest) ProtoMessage() {} func (x *GithubWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[64] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4785,9 +4914,11 @@ type GithubWorkflows struct { func (x *GithubWorkflows) Reset() { *x = GithubWorkflows{} - mi := &file_client_clientpb_client_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GithubWorkflows) String() string { @@ -4798,7 +4929,7 @@ func (*GithubWorkflows) ProtoMessage() {} func (x *GithubWorkflows) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[65] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4839,9 +4970,11 @@ type GithubWorkflow struct { func (x *GithubWorkflow) Reset() { *x = GithubWorkflow{} - mi := &file_client_clientpb_client_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GithubWorkflow) String() string { @@ -4852,7 +4985,7 @@ func (*GithubWorkflow) ProtoMessage() {} func (x *GithubWorkflow) ProtoReflect() protoreflect.Message { mi := &file_client_clientpb_client_proto_msgTypes[66] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4937,6 +5070,125 @@ func (x *GithubWorkflow) GetBadgeUrl() string { return "" } +type Notify struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TelegramEnable bool `protobuf:"varint,1,opt,name=telegram_enable,json=telegramEnable,proto3" json:"telegram_enable,omitempty"` + TelegramApiKey string `protobuf:"bytes,2,opt,name=telegram_api_key,json=telegramApiKey,proto3" json:"telegram_api_key,omitempty"` + TelegramChatId int64 `protobuf:"varint,3,opt,name=telegram_chat_id,json=telegramChatId,proto3" json:"telegram_chat_id,omitempty"` + DingtalkEnable bool `protobuf:"varint,4,opt,name=dingtalk_enable,json=dingtalkEnable,proto3" json:"dingtalk_enable,omitempty"` + DingtalkSecret string `protobuf:"bytes,5,opt,name=dingtalk_secret,json=dingtalkSecret,proto3" json:"dingtalk_secret,omitempty"` + DingtalkToken string `protobuf:"bytes,6,opt,name=dingtalk_token,json=dingtalkToken,proto3" json:"dingtalk_token,omitempty"` + LarkEnable bool `protobuf:"varint,7,opt,name=lark_enable,json=larkEnable,proto3" json:"lark_enable,omitempty"` + LarkWebhookUrl string `protobuf:"bytes,8,opt,name=lark_webhook_url,json=larkWebhookUrl,proto3" json:"lark_webhook_url,omitempty"` + ServerchanEnable bool `protobuf:"varint,9,opt,name=serverchan_enable,json=serverchanEnable,proto3" json:"serverchan_enable,omitempty"` + ServerchanUrl string `protobuf:"bytes,10,opt,name=serverchan_url,json=serverchanUrl,proto3" json:"serverchan_url,omitempty"` +} + +func (x *Notify) Reset() { + *x = Notify{} + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Notify) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Notify) ProtoMessage() {} + +func (x *Notify) ProtoReflect() protoreflect.Message { + mi := &file_client_clientpb_client_proto_msgTypes[67] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Notify.ProtoReflect.Descriptor instead. +func (*Notify) Descriptor() ([]byte, []int) { + return file_client_clientpb_client_proto_rawDescGZIP(), []int{67} +} + +func (x *Notify) GetTelegramEnable() bool { + if x != nil { + return x.TelegramEnable + } + return false +} + +func (x *Notify) GetTelegramApiKey() string { + if x != nil { + return x.TelegramApiKey + } + return "" +} + +func (x *Notify) GetTelegramChatId() int64 { + if x != nil { + return x.TelegramChatId + } + return 0 +} + +func (x *Notify) GetDingtalkEnable() bool { + if x != nil { + return x.DingtalkEnable + } + return false +} + +func (x *Notify) GetDingtalkSecret() string { + if x != nil { + return x.DingtalkSecret + } + return "" +} + +func (x *Notify) GetDingtalkToken() string { + if x != nil { + return x.DingtalkToken + } + return "" +} + +func (x *Notify) GetLarkEnable() bool { + if x != nil { + return x.LarkEnable + } + return false +} + +func (x *Notify) GetLarkWebhookUrl() string { + if x != nil { + return x.LarkWebhookUrl + } + return "" +} + +func (x *Notify) GetServerchanEnable() bool { + if x != nil { + return x.ServerchanEnable + } + return false +} + +func (x *Notify) GetServerchanUrl() string { + if x != nil { + return x.ServerchanUrl + } + return "" +} + var File_client_clientpb_client_proto protoreflect.FileDescriptor var file_client_clientpb_client_proto_rawDesc = []byte{ @@ -5551,7 +5803,33 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x12, 0x19, 0x0a, 0x08, 0x68, 0x74, 0x6d, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x74, 0x6d, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x64, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x61, 0x64, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, + 0x62, 0x61, 0x64, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x06, 0x4e, 0x6f, 0x74, + 0x69, 0x66, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x65, + 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, + 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, + 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, + 0x61, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x74, 0x49, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, + 0x61, 0x6c, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, + 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x6e, 0x67, + 0x74, 0x61, 0x6c, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x72, + 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x6c, 0x61, 0x72, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, + 0x72, 0x6b, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x72, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, + 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x63, 0x68, 0x61, 0x6e, 0x55, 0x72, 0x6c, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, @@ -5571,8 +5849,8 @@ func file_client_clientpb_client_proto_rawDescGZIP() []byte { return file_client_clientpb_client_proto_rawDescData } -var file_client_clientpb_client_proto_msgTypes = make([]protoimpl.MessageInfo, 73) -var file_client_clientpb_client_proto_goTypes = []any{ +var file_client_clientpb_client_proto_msgTypes = make([]protoimpl.MessageInfo, 74) +var file_client_clientpb_client_proto_goTypes = []interface{}{ (*Empty)(nil), // 0: clientpb.Empty (*Basic)(nil), // 1: clientpb.Basic (*Session)(nil), // 2: clientpb.Session @@ -5640,33 +5918,34 @@ var file_client_clientpb_client_proto_goTypes = []any{ (*GithubWorkflowRequest)(nil), // 64: clientpb.GithubWorkflowRequest (*GithubWorkflows)(nil), // 65: clientpb.GithubWorkflows (*GithubWorkflow)(nil), // 66: clientpb.GithubWorkflow - nil, // 67: clientpb.Session.ArgueEntry - nil, // 68: clientpb.Session.DataEntry - nil, // 69: clientpb.Session.LootEntry - nil, // 70: clientpb.Job.ContentsEntry - nil, // 71: clientpb.Website.ContentsEntry - nil, // 72: clientpb.GithubWorkflowRequest.InputsEntry - (*implantpb.Os)(nil), // 73: modulepb.Os - (*implantpb.Process)(nil), // 74: modulepb.Process - (*implantpb.Timer)(nil), // 75: modulepb.Timer - (*implantpb.Addon)(nil), // 76: modulepb.Addon - (*implantpb.Spite)(nil), // 77: implantpb.Spite - (*implantpb.Register)(nil), // 78: modulepb.Register + (*Notify)(nil), // 67: clientpb.Notify + nil, // 68: clientpb.Session.ArgueEntry + nil, // 69: clientpb.Session.DataEntry + nil, // 70: clientpb.Session.LootEntry + nil, // 71: clientpb.Job.ContentsEntry + nil, // 72: clientpb.Website.ContentsEntry + nil, // 73: clientpb.GithubWorkflowRequest.InputsEntry + (*implantpb.Os)(nil), // 74: modulepb.Os + (*implantpb.Process)(nil), // 75: modulepb.Process + (*implantpb.Timer)(nil), // 76: modulepb.Timer + (*implantpb.Addon)(nil), // 77: modulepb.Addon + (*implantpb.Spite)(nil), // 78: implantpb.Spite + (*implantpb.Register)(nil), // 79: modulepb.Register } var file_client_clientpb_client_proto_depIdxs = []int32{ 29, // 0: clientpb.Session.tasks:type_name -> clientpb.Tasks - 73, // 1: clientpb.Session.os:type_name -> modulepb.Os - 74, // 2: clientpb.Session.process:type_name -> modulepb.Process - 75, // 3: clientpb.Session.timer:type_name -> modulepb.Timer - 76, // 4: clientpb.Session.addons:type_name -> modulepb.Addon - 67, // 5: clientpb.Session.argue:type_name -> clientpb.Session.ArgueEntry - 68, // 6: clientpb.Session.data:type_name -> clientpb.Session.DataEntry - 69, // 7: clientpb.Session.loot:type_name -> clientpb.Session.LootEntry + 74, // 1: clientpb.Session.os:type_name -> modulepb.Os + 75, // 2: clientpb.Session.process:type_name -> modulepb.Process + 76, // 3: clientpb.Session.timer:type_name -> modulepb.Timer + 77, // 4: clientpb.Session.addons:type_name -> modulepb.Addon + 68, // 5: clientpb.Session.argue:type_name -> clientpb.Session.ArgueEntry + 69, // 6: clientpb.Session.data:type_name -> clientpb.Session.DataEntry + 70, // 7: clientpb.Session.loot:type_name -> clientpb.Session.LootEntry 2, // 8: clientpb.Sessions.sessions:type_name -> clientpb.Session 9, // 9: clientpb.SpiteCache.items:type_name -> clientpb.SpiteCacheItem - 77, // 10: clientpb.SpiteCacheItem.spite:type_name -> implantpb.Spite + 78, // 10: clientpb.SpiteCacheItem.spite:type_name -> implantpb.Spite 52, // 11: clientpb.Job.pipeline:type_name -> clientpb.Pipeline - 70, // 12: clientpb.Job.contents:type_name -> clientpb.Job.ContentsEntry + 71, // 12: clientpb.Job.contents:type_name -> clientpb.Job.ContentsEntry 10, // 13: clientpb.Jobs.job:type_name -> clientpb.Job 10, // 14: clientpb.JobCtrl.job:type_name -> clientpb.Job 10, // 15: clientpb.JobStatus.job:type_name -> clientpb.Job @@ -5677,14 +5956,14 @@ var file_client_clientpb_client_proto_depIdxs = []int32{ 10, // 20: clientpb.Event.job:type_name -> clientpb.Job 16, // 21: clientpb.Event.client:type_name -> clientpb.Client 28, // 22: clientpb.Event.task:type_name -> clientpb.Task - 77, // 23: clientpb.Event.spite:type_name -> implantpb.Spite + 78, // 23: clientpb.Event.spite:type_name -> implantpb.Spite 18, // 24: clientpb.Events.events:type_name -> clientpb.Event 28, // 25: clientpb.TaskContext.task:type_name -> clientpb.Task 2, // 26: clientpb.TaskContext.session:type_name -> clientpb.Session - 77, // 27: clientpb.TaskContext.spite:type_name -> implantpb.Spite + 78, // 27: clientpb.TaskContext.spite:type_name -> implantpb.Spite 28, // 28: clientpb.TaskContexts.task:type_name -> clientpb.Task 2, // 29: clientpb.TaskContexts.session:type_name -> clientpb.Session - 77, // 30: clientpb.TaskContexts.spites:type_name -> implantpb.Spite + 78, // 30: clientpb.TaskContexts.spites:type_name -> implantpb.Spite 25, // 31: clientpb.TasksContext.contexts:type_name -> clientpb.TaskContext 28, // 32: clientpb.Tasks.tasks:type_name -> clientpb.Task 33, // 33: clientpb.TaskDescs.tasks:type_name -> clientpb.TaskDesc @@ -5693,12 +5972,12 @@ var file_client_clientpb_client_proto_depIdxs = []int32{ 41, // 36: clientpb.Artifacts.artifacts:type_name -> clientpb.Artifact 43, // 37: clientpb.Profiles.profiles:type_name -> clientpb.Profile 40, // 38: clientpb.Builders.builders:type_name -> clientpb.Builder - 78, // 39: clientpb.RegisterSession.register_data:type_name -> modulepb.Register + 79, // 39: clientpb.RegisterSession.register_data:type_name -> modulepb.Register 51, // 40: clientpb.RegisterListener.pipelines:type_name -> clientpb.Pipelines 2, // 41: clientpb.SpiteRequest.session:type_name -> clientpb.Session 28, // 42: clientpb.SpiteRequest.task:type_name -> clientpb.Task - 77, // 43: clientpb.SpiteRequest.spite:type_name -> implantpb.Spite - 77, // 44: clientpb.SpiteResponse.spite:type_name -> implantpb.Spite + 78, // 43: clientpb.SpiteRequest.spite:type_name -> implantpb.Spite + 78, // 44: clientpb.SpiteResponse.spite:type_name -> implantpb.Spite 52, // 45: clientpb.Pipelines.pipelines:type_name -> clientpb.Pipeline 58, // 46: clientpb.Pipeline.tcp:type_name -> clientpb.TCPPipeline 56, // 47: clientpb.Pipeline.bind:type_name -> clientpb.BindPipeline @@ -5707,10 +5986,10 @@ var file_client_clientpb_client_proto_depIdxs = []int32{ 54, // 50: clientpb.Pipeline.tls:type_name -> clientpb.TLS 55, // 51: clientpb.Pipeline.encryption:type_name -> clientpb.Encryption 55, // 52: clientpb.WebContent.encryption:type_name -> clientpb.Encryption - 71, // 53: clientpb.Website.contents:type_name -> clientpb.Website.ContentsEntry + 72, // 53: clientpb.Website.contents:type_name -> clientpb.Website.ContentsEntry 60, // 54: clientpb.Websites.websites:type_name -> clientpb.Website 59, // 55: clientpb.WebContents.contents:type_name -> clientpb.WebContent - 72, // 56: clientpb.GithubWorkflowRequest.inputs:type_name -> clientpb.GithubWorkflowRequest.InputsEntry + 73, // 56: clientpb.GithubWorkflowRequest.inputs:type_name -> clientpb.GithubWorkflowRequest.InputsEntry 66, // 57: clientpb.GithubWorkflows.workflows:type_name -> clientpb.GithubWorkflow 59, // 58: clientpb.Job.ContentsEntry.value:type_name -> clientpb.WebContent 59, // 59: clientpb.Website.ContentsEntry.value:type_name -> clientpb.WebContent @@ -5726,7 +6005,825 @@ func file_client_clientpb_client_proto_init() { if File_client_clientpb_client_proto != nil { return } - file_client_clientpb_client_proto_msgTypes[52].OneofWrappers = []any{ + if !protoimpl.UnsafeEnabled { + file_client_clientpb_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Basic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Session); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BasicUpdateSession); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sessions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpiteCache); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpiteCacheItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Job); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Jobs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobCtrl); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Listener); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Listeners); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Client); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Clients); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Events); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*On); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sync); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskContexts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TasksContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Task); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tasks); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskDescs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*File); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Files); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskDesc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Plugins); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Plugin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EXE2Shellcode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DLL2Shellcode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShellcodeEncode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Builder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Artifact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Artifacts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Profile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Profiles); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Generate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Builders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterSession); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterListener); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpiteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpiteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pipelines); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pipeline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CtrlPipeline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Encryption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BindPipeline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*REM); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TCPPipeline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebContent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Website); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Websites); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebContents); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Polling); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GithubWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GithubWorkflows); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GithubWorkflow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Notify); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_client_clientpb_client_proto_msgTypes[52].OneofWrappers = []interface{}{ (*Pipeline_Tcp)(nil), (*Pipeline_Bind)(nil), (*Pipeline_Web)(nil), @@ -5738,7 +6835,7 @@ func file_client_clientpb_client_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_clientpb_client_proto_rawDesc, NumEnums: 0, - NumMessages: 73, + NumMessages: 74, NumExtensions: 0, NumServices: 0, }, diff --git a/helper/proto/client/rootpb/root.pb.go b/helper/proto/client/rootpb/root.pb.go index 7bf5d1f0..f20762db 100644 --- a/helper/proto/client/rootpb/root.pb.go +++ b/helper/proto/client/rootpb/root.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v3.20.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: client/rootpb/root.proto package rootpb @@ -33,9 +33,11 @@ type Operator struct { func (x *Operator) Reset() { *x = Operator{} - mi := &file_client_rootpb_root_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_rootpb_root_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Operator) String() string { @@ -46,7 +48,7 @@ func (*Operator) ProtoMessage() {} func (x *Operator) ProtoReflect() protoreflect.Message { mi := &file_client_rootpb_root_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101,9 +103,11 @@ type Response struct { func (x *Response) Reset() { *x = Response{} - mi := &file_client_rootpb_root_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_client_rootpb_root_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Response) String() string { @@ -114,7 +118,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_client_rootpb_root_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,7 +196,7 @@ func file_client_rootpb_root_proto_rawDescGZIP() []byte { } var file_client_rootpb_root_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_client_rootpb_root_proto_goTypes = []any{ +var file_client_rootpb_root_proto_goTypes = []interface{}{ (*Operator)(nil), // 0: rootpb.Operator (*Response)(nil), // 1: rootpb.Response nil, // 2: rootpb.Operator.ParamsEntry @@ -211,6 +215,32 @@ func file_client_rootpb_root_proto_init() { if File_client_rootpb_root_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_client_rootpb_root_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_rootpb_root_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/helper/proto/implant/implantpb/implant.pb.go b/helper/proto/implant/implantpb/implant.pb.go index b2b4a62d..c0c2d299 100644 --- a/helper/proto/implant/implantpb/implant.pb.go +++ b/helper/proto/implant/implantpb/implant.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v3.20.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: implant/implantpb/implant.proto package implantpb @@ -28,9 +28,11 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} - mi := &file_implant_implantpb_implant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_implant_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Empty) String() string { @@ -41,7 +43,7 @@ func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_implant_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68,9 +70,11 @@ type Status struct { func (x *Status) Reset() { *x = Status{} - mi := &file_implant_implantpb_implant_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_implant_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Status) String() string { @@ -81,7 +85,7 @@ func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_implant_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130,7 +134,6 @@ type Spite struct { Error uint32 `protobuf:"varint,5,opt,name=error,proto3" json:"error,omitempty"` Status *Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` // Types that are assignable to Body: - // // *Spite_Empty // *Spite_Block // *Spite_Ack @@ -182,9 +185,11 @@ type Spite struct { func (x *Spite) Reset() { *x = Spite{} - mi := &file_implant_implantpb_implant_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_implant_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Spite) String() string { @@ -195,7 +200,7 @@ func (*Spite) ProtoMessage() {} func (x *Spite) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_implant_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,9 +876,11 @@ type Spites struct { func (x *Spites) Reset() { *x = Spites{} - mi := &file_implant_implantpb_implant_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_implant_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Spites) String() string { @@ -884,7 +891,7 @@ func (*Spites) ProtoMessage() {} func (x *Spites) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_implant_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,7 +1132,7 @@ func file_implant_implantpb_implant_proto_rawDescGZIP() []byte { } var file_implant_implantpb_implant_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_implant_implantpb_implant_proto_goTypes = []any{ +var file_implant_implantpb_implant_proto_goTypes = []interface{}{ (*Empty)(nil), // 0: implantpb.Empty (*Status)(nil), // 1: implantpb.Status (*Spite)(nil), // 2: implantpb.Spite @@ -1237,7 +1244,57 @@ func file_implant_implantpb_implant_proto_init() { return } file_implant_implantpb_module_proto_init() - file_implant_implantpb_implant_proto_msgTypes[2].OneofWrappers = []any{ + if !protoimpl.UnsafeEnabled { + file_implant_implantpb_implant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_implant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_implant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Spite); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_implant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Spites); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_implant_implantpb_implant_proto_msgTypes[2].OneofWrappers = []interface{}{ (*Spite_Empty)(nil), (*Spite_Block)(nil), (*Spite_Ack)(nil), diff --git a/helper/proto/implant/implantpb/module.pb.go b/helper/proto/implant/implantpb/module.pb.go index c9822e76..79e2c28c 100644 --- a/helper/proto/implant/implantpb/module.pb.go +++ b/helper/proto/implant/implantpb/module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v3.20.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: implant/implantpb/module.proto package implantpb @@ -30,9 +30,11 @@ type Ping struct { func (x *Ping) Reset() { *x = Ping{} - mi := &file_implant_implantpb_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Ping) String() string { @@ -43,7 +45,7 @@ func (*Ping) ProtoMessage() {} func (x *Ping) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80,9 +82,11 @@ type Register struct { func (x *Register) Reset() { *x = Register{} - mi := &file_implant_implantpb_module_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Register) String() string { @@ -93,7 +97,7 @@ func (*Register) ProtoMessage() {} func (x *Register) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,9 +164,11 @@ type Init struct { func (x *Init) Reset() { *x = Init{} - mi := &file_implant_implantpb_module_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Init) String() string { @@ -173,7 +179,7 @@ func (*Init) ProtoMessage() {} func (x *Init) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,9 +215,11 @@ type SysInfo struct { func (x *SysInfo) Reset() { *x = SysInfo{} - mi := &file_implant_implantpb_module_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SysInfo) String() string { @@ -222,7 +230,7 @@ func (*SysInfo) ProtoMessage() {} func (x *SysInfo) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,9 +291,11 @@ type Suicide struct { func (x *Suicide) Reset() { *x = Suicide{} - mi := &file_implant_implantpb_module_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Suicide) String() string { @@ -296,7 +306,7 @@ func (*Suicide) ProtoMessage() {} func (x *Suicide) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,9 +349,11 @@ type Request struct { func (x *Request) Reset() { *x = Request{} - mi := &file_implant_implantpb_module_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Request) String() string { @@ -352,7 +364,7 @@ func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,9 +420,11 @@ type Response struct { func (x *Response) Reset() { *x = Response{} - mi := &file_implant_implantpb_module_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Response) String() string { @@ -421,7 +435,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,9 +490,11 @@ type BypassRequest struct { func (x *BypassRequest) Reset() { *x = BypassRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BypassRequest) String() string { @@ -489,7 +505,7 @@ func (*BypassRequest) ProtoMessage() {} func (x *BypassRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,9 +554,11 @@ type NetInterface struct { func (x *NetInterface) Reset() { *x = NetInterface{} - mi := &file_implant_implantpb_module_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NetInterface) String() string { @@ -551,7 +569,7 @@ func (*NetInterface) ProtoMessage() {} func (x *NetInterface) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,16 +620,18 @@ type SockTabEntry struct { LocalAddr string `protobuf:"bytes,1,opt,name=local_addr,json=localAddr,proto3" json:"local_addr,omitempty"` RemoteAddr string `protobuf:"bytes,2,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` SkState string `protobuf:"bytes,3,opt,name=skState,proto3" json:"skState,omitempty"` - // uint32 uid = 4; + // uint32 uid = 4; Pid string `protobuf:"bytes,5,opt,name=pid,proto3" json:"pid,omitempty"` Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"` } func (x *SockTabEntry) Reset() { *x = SockTabEntry{} - mi := &file_implant_implantpb_module_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SockTabEntry) String() string { @@ -622,7 +642,7 @@ func (*SockTabEntry) ProtoMessage() {} func (x *SockTabEntry) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,9 +702,11 @@ type NetstatResponse struct { func (x *NetstatResponse) Reset() { *x = NetstatResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NetstatResponse) String() string { @@ -695,7 +717,7 @@ func (*NetstatResponse) ProtoMessage() {} func (x *NetstatResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -728,9 +750,11 @@ type ImplantTask struct { func (x *ImplantTask) Reset() { *x = ImplantTask{} - mi := &file_implant_implantpb_module_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ImplantTask) String() string { @@ -741,7 +765,7 @@ func (*ImplantTask) ProtoMessage() {} func (x *ImplantTask) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,9 +806,11 @@ type Block struct { func (x *Block) Reset() { *x = Block{} - mi := &file_implant_implantpb_module_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Block) String() string { @@ -795,7 +821,7 @@ func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,9 +869,11 @@ type ACK struct { func (x *ACK) Reset() { *x = ACK{} - mi := &file_implant_implantpb_module_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ACK) String() string { @@ -856,7 +884,7 @@ func (*ACK) ProtoMessage() {} func (x *ACK) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,9 +936,11 @@ type Os struct { func (x *Os) Reset() { *x = Os{} - mi := &file_implant_implantpb_module_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Os) String() string { @@ -921,7 +951,7 @@ func (*Os) ProtoMessage() {} func (x *Os) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,9 +1032,11 @@ type Process struct { func (x *Process) Reset() { *x = Process{} - mi := &file_implant_implantpb_module_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Process) String() string { @@ -1015,7 +1047,7 @@ func (*Process) ProtoMessage() {} func (x *Process) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1097,9 +1129,11 @@ type Timer struct { func (x *Timer) Reset() { *x = Timer{} - mi := &file_implant_implantpb_module_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Timer) String() string { @@ -1110,7 +1144,7 @@ func (*Timer) ProtoMessage() {} func (x *Timer) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,9 +1188,11 @@ type FileInfo struct { func (x *FileInfo) Reset() { *x = FileInfo{} - mi := &file_implant_implantpb_module_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FileInfo) String() string { @@ -1167,7 +1203,7 @@ func (*FileInfo) ProtoMessage() {} func (x *FileInfo) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,9 +1274,11 @@ type SacrificeProcess struct { func (x *SacrificeProcess) Reset() { *x = SacrificeProcess{} - mi := &file_implant_implantpb_module_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SacrificeProcess) String() string { @@ -1251,7 +1289,7 @@ func (*SacrificeProcess) ProtoMessage() {} func (x *SacrificeProcess) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,9 +1351,11 @@ type LsResponse struct { func (x *LsResponse) Reset() { *x = LsResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LsResponse) String() string { @@ -1326,7 +1366,7 @@ func (*LsResponse) ProtoMessage() {} func (x *LsResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1372,9 +1412,11 @@ type PsResponse struct { func (x *PsResponse) Reset() { *x = PsResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PsResponse) String() string { @@ -1385,7 +1427,7 @@ func (*PsResponse) ProtoMessage() {} func (x *PsResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1420,9 +1462,11 @@ type ExecRequest struct { func (x *ExecRequest) Reset() { *x = ExecRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExecRequest) String() string { @@ -1433,7 +1477,7 @@ func (*ExecRequest) ProtoMessage() {} func (x *ExecRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,9 +1533,11 @@ type ExecResponse struct { func (x *ExecResponse) Reset() { *x = ExecResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExecResponse) String() string { @@ -1502,7 +1548,7 @@ func (*ExecResponse) ProtoMessage() {} func (x *ExecResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,9 +1604,11 @@ type BinaryResponse struct { func (x *BinaryResponse) Reset() { *x = BinaryResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BinaryResponse) String() string { @@ -1571,7 +1619,7 @@ func (*BinaryResponse) ProtoMessage() {} func (x *BinaryResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1624,9 +1672,11 @@ type Modules struct { func (x *Modules) Reset() { *x = Modules{} - mi := &file_implant_implantpb_module_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Modules) String() string { @@ -1637,7 +1687,7 @@ func (*Modules) ProtoMessage() {} func (x *Modules) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,9 +1719,11 @@ type Addons struct { func (x *Addons) Reset() { *x = Addons{} - mi := &file_implant_implantpb_module_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Addons) String() string { @@ -1682,7 +1734,7 @@ func (*Addons) ProtoMessage() {} func (x *Addons) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1716,9 +1768,11 @@ type Addon struct { func (x *Addon) Reset() { *x = Addon{} - mi := &file_implant_implantpb_module_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Addon) String() string { @@ -1729,7 +1783,7 @@ func (*Addon) ProtoMessage() {} func (x *Addon) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1776,9 +1830,11 @@ type LoadModule struct { func (x *LoadModule) Reset() { *x = LoadModule{} - mi := &file_implant_implantpb_module_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoadModule) String() string { @@ -1789,7 +1845,7 @@ func (*LoadModule) ProtoMessage() {} func (x *LoadModule) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1831,9 +1887,11 @@ type LoadAddon struct { func (x *LoadAddon) Reset() { *x = LoadAddon{} - mi := &file_implant_implantpb_module_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoadAddon) String() string { @@ -1844,7 +1902,7 @@ func (*LoadAddon) ProtoMessage() {} func (x *LoadAddon) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1898,9 +1956,11 @@ type ExecuteAddon struct { func (x *ExecuteAddon) Reset() { *x = ExecuteAddon{} - mi := &file_implant_implantpb_module_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExecuteAddon) String() string { @@ -1911,7 +1971,7 @@ func (*ExecuteAddon) ProtoMessage() {} func (x *ExecuteAddon) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1962,9 +2022,11 @@ type ExecuteBinary struct { func (x *ExecuteBinary) Reset() { *x = ExecuteBinary{} - mi := &file_implant_implantpb_module_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExecuteBinary) String() string { @@ -1975,7 +2037,7 @@ func (*ExecuteBinary) ProtoMessage() {} func (x *ExecuteBinary) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2092,9 +2154,11 @@ type ExecuteCommand struct { func (x *ExecuteCommand) Reset() { *x = ExecuteCommand{} - mi := &file_implant_implantpb_module_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExecuteCommand) String() string { @@ -2105,7 +2169,7 @@ func (*ExecuteCommand) ProtoMessage() {} func (x *ExecuteCommand) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2148,9 +2212,11 @@ type UploadRequest struct { func (x *UploadRequest) Reset() { *x = UploadRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UploadRequest) String() string { @@ -2161,7 +2227,7 @@ func (*UploadRequest) ProtoMessage() {} func (x *UploadRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2223,9 +2289,11 @@ type DownloadRequest struct { func (x *DownloadRequest) Reset() { *x = DownloadRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DownloadRequest) String() string { @@ -2236,7 +2304,7 @@ func (*DownloadRequest) ProtoMessage() {} func (x *DownloadRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2283,9 +2351,11 @@ type DownloadResponse struct { func (x *DownloadResponse) Reset() { *x = DownloadResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DownloadResponse) String() string { @@ -2296,7 +2366,7 @@ func (*DownloadResponse) ProtoMessage() {} func (x *DownloadResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2340,9 +2410,11 @@ type CurlRequest struct { func (x *CurlRequest) Reset() { *x = CurlRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CurlRequest) String() string { @@ -2353,7 +2425,7 @@ func (*CurlRequest) ProtoMessage() {} func (x *CurlRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2423,9 +2495,11 @@ type ChownRequest struct { func (x *ChownRequest) Reset() { *x = ChownRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChownRequest) String() string { @@ -2436,7 +2510,7 @@ func (*ChownRequest) ProtoMessage() {} func (x *ChownRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2489,9 +2563,11 @@ type IfconfigResponse struct { func (x *IfconfigResponse) Reset() { *x = IfconfigResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *IfconfigResponse) String() string { @@ -2502,7 +2578,7 @@ func (*IfconfigResponse) ProtoMessage() {} func (x *IfconfigResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2536,9 +2612,11 @@ type RegistryRequest struct { func (x *RegistryRequest) Reset() { *x = RegistryRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegistryRequest) String() string { @@ -2549,7 +2627,7 @@ func (*RegistryRequest) ProtoMessage() {} func (x *RegistryRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2590,9 +2668,11 @@ type Registry struct { func (x *Registry) Reset() { *x = Registry{} - mi := &file_implant_implantpb_module_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Registry) String() string { @@ -2603,7 +2683,7 @@ func (*Registry) ProtoMessage() {} func (x *Registry) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2656,9 +2736,11 @@ type RegistryWriteRequest struct { func (x *RegistryWriteRequest) Reset() { *x = RegistryWriteRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegistryWriteRequest) String() string { @@ -2669,7 +2751,7 @@ func (*RegistryWriteRequest) ProtoMessage() {} func (x *RegistryWriteRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2751,9 +2833,11 @@ type TaskScheduleRequest struct { func (x *TaskScheduleRequest) Reset() { *x = TaskScheduleRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskScheduleRequest) String() string { @@ -2764,7 +2848,7 @@ func (*TaskScheduleRequest) ProtoMessage() {} func (x *TaskScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2811,9 +2895,11 @@ type TaskSchedule struct { func (x *TaskSchedule) Reset() { *x = TaskSchedule{} - mi := &file_implant_implantpb_module_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskSchedule) String() string { @@ -2824,7 +2910,7 @@ func (*TaskSchedule) ProtoMessage() {} func (x *TaskSchedule) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2912,9 +2998,11 @@ type TaskSchedulesResponse struct { func (x *TaskSchedulesResponse) Reset() { *x = TaskSchedulesResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskSchedulesResponse) String() string { @@ -2925,7 +3013,7 @@ func (*TaskSchedulesResponse) ProtoMessage() {} func (x *TaskSchedulesResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2959,9 +3047,11 @@ type ServiceRequest struct { func (x *ServiceRequest) Reset() { *x = ServiceRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServiceRequest) String() string { @@ -2972,7 +3062,7 @@ func (*ServiceRequest) ProtoMessage() {} func (x *ServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3016,9 +3106,11 @@ type ServiceConfig struct { func (x *ServiceConfig) Reset() { *x = ServiceConfig{} - mi := &file_implant_implantpb_module_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServiceConfig) String() string { @@ -3029,7 +3121,7 @@ func (*ServiceConfig) ProtoMessage() {} func (x *ServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3100,9 +3192,11 @@ type ServiceStatus struct { func (x *ServiceStatus) Reset() { *x = ServiceStatus{} - mi := &file_implant_implantpb_module_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServiceStatus) String() string { @@ -3113,7 +3207,7 @@ func (*ServiceStatus) ProtoMessage() {} func (x *ServiceStatus) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3174,9 +3268,11 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - mi := &file_implant_implantpb_module_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Service) String() string { @@ -3187,7 +3283,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3226,9 +3322,11 @@ type ServicesResponse struct { func (x *ServicesResponse) Reset() { *x = ServicesResponse{} - mi := &file_implant_implantpb_module_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServicesResponse) String() string { @@ -3239,7 +3337,7 @@ func (*ServicesResponse) ProtoMessage() {} func (x *ServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3272,9 +3370,11 @@ type WmiQueryRequest struct { func (x *WmiQueryRequest) Reset() { *x = WmiQueryRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WmiQueryRequest) String() string { @@ -3285,7 +3385,7 @@ func (*WmiQueryRequest) ProtoMessage() {} func (x *WmiQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3327,9 +3427,11 @@ type WmiMethodRequest struct { func (x *WmiMethodRequest) Reset() { *x = WmiMethodRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WmiMethodRequest) String() string { @@ -3340,7 +3442,7 @@ func (*WmiMethodRequest) ProtoMessage() {} func (x *WmiMethodRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3399,9 +3501,11 @@ type RunAsRequest struct { func (x *RunAsRequest) Reset() { *x = RunAsRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RunAsRequest) String() string { @@ -3412,7 +3516,7 @@ func (*RunAsRequest) ProtoMessage() {} func (x *RunAsRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3487,9 +3591,11 @@ type GetSystem struct { func (x *GetSystem) Reset() { *x = GetSystem{} - mi := &file_implant_implantpb_module_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetSystem) String() string { @@ -3500,7 +3606,7 @@ func (*GetSystem) ProtoMessage() {} func (x *GetSystem) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[52] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3540,9 +3646,11 @@ type Inject struct { func (x *Inject) Reset() { *x = Inject{} - mi := &file_implant_implantpb_module_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Inject) String() string { @@ -3553,7 +3661,7 @@ func (*Inject) ProtoMessage() {} func (x *Inject) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3594,9 +3702,11 @@ type Pipe struct { func (x *Pipe) Reset() { *x = Pipe{} - mi := &file_implant_implantpb_module_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Pipe) String() string { @@ -3607,7 +3717,7 @@ func (*Pipe) ProtoMessage() {} func (x *Pipe) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[54] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3654,9 +3764,11 @@ type PipeRequest struct { func (x *PipeRequest) Reset() { *x = PipeRequest{} - mi := &file_implant_implantpb_module_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_implant_implantpb_module_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PipeRequest) String() string { @@ -3667,7 +3779,7 @@ func (*PipeRequest) ProtoMessage() {} func (x *PipeRequest) ProtoReflect() protoreflect.Message { mi := &file_implant_implantpb_module_proto_msgTypes[55] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4135,7 +4247,7 @@ func file_implant_implantpb_module_proto_rawDescGZIP() []byte { } var file_implant_implantpb_module_proto_msgTypes = make([]protoimpl.MessageInfo, 61) -var file_implant_implantpb_module_proto_goTypes = []any{ +var file_implant_implantpb_module_proto_goTypes = []interface{}{ (*Ping)(nil), // 0: modulepb.Ping (*Register)(nil), // 1: modulepb.Register (*Init)(nil), // 2: modulepb.Init @@ -4237,6 +4349,680 @@ func file_implant_implantpb_module_proto_init() { if File_implant_implantpb_module_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_implant_implantpb_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ping); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Register); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Init); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SysInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Suicide); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BypassRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetInterface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SockTabEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetstatResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImplantTask); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ACK); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Os); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Process); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Timer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SacrificeProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BinaryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Modules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Addons); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Addon); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoadModule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoadAddon); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecuteAddon); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecuteBinary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecuteCommand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UploadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DownloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DownloadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CurlRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChownRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IfconfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Registry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistryWriteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskScheduleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskSchedule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskSchedulesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Service); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServicesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WmiQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WmiMethodRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunAsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Inject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pipe); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_implant_implantpb_module_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/helper/proto/services/clientrpc/service.pb.go b/helper/proto/services/clientrpc/service.pb.go index 64d3890a..adebd059 100644 --- a/helper/proto/services/clientrpc/service.pb.go +++ b/helper/proto/services/clientrpc/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v3.20.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: services/clientrpc/service.proto package clientrpc @@ -33,7 +33,7 @@ var file_services_clientrpc_service_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x89, 0x30, 0x0a, 0x09, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb8, 0x32, 0x0a, 0x09, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x52, 0x50, 0x43, 0x12, 0x33, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, @@ -418,35 +418,54 @@ var file_services_clientrpc_service_proto_rawDesc = []byte{ 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x32, 0xc3, 0x02, 0x0a, 0x07, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x50, 0x43, 0x12, 0x2f, 0x0a, - 0x09, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, - 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, - 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, - 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, - 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, - 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, - 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x36, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, + 0x79, 0x12, 0x46, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x31, 0x0a, + 0x0d, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x32, 0xc3, 0x02, 0x0a, 0x07, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x50, 0x43, 0x12, 0x2f, 0x0a, 0x09, + 0x41, 0x64, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, + 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, + 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, + 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, + 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, + 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x1a, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, - 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, + 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, + 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, + 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x1a, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, + 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_services_clientrpc_service_proto_goTypes = []any{ +var file_services_clientrpc_service_proto_goTypes = []interface{}{ (*clientpb.LoginReq)(nil), // 0: clientpb.LoginReq (*clientpb.Empty)(nil), // 1: clientpb.Empty (*clientpb.SessionRequest)(nil), // 2: clientpb.SessionRequest @@ -489,25 +508,26 @@ var file_services_clientrpc_service_proto_goTypes = []any{ (*clientpb.Builder)(nil), // 39: clientpb.Builder (*clientpb.Artifact)(nil), // 40: clientpb.Artifact (*clientpb.GithubWorkflowRequest)(nil), // 41: clientpb.GithubWorkflowRequest - (*rootpb.Operator)(nil), // 42: rootpb.Operator - (*clientpb.Client)(nil), // 43: clientpb.Client - (*clientpb.Basic)(nil), // 44: clientpb.Basic - (*clientpb.Clients)(nil), // 45: clientpb.Clients - (*clientpb.Sessions)(nil), // 46: clientpb.Sessions - (*clientpb.TasksContext)(nil), // 47: clientpb.TasksContext - (*clientpb.Listeners)(nil), // 48: clientpb.Listeners - (*clientpb.Pipelines)(nil), // 49: clientpb.Pipelines - (*clientpb.Jobs)(nil), // 50: clientpb.Jobs - (*clientpb.Tasks)(nil), // 51: clientpb.Tasks - (*clientpb.TaskContext)(nil), // 52: clientpb.TaskContext - (*clientpb.Files)(nil), // 53: clientpb.Files - (*clientpb.TaskContexts)(nil), // 54: clientpb.TaskContexts - (*clientpb.Events)(nil), // 55: clientpb.Events - (*clientpb.SyncResp)(nil), // 56: clientpb.SyncResp - (*clientpb.Bin)(nil), // 57: clientpb.Bin - (*clientpb.Profiles)(nil), // 58: clientpb.Profiles - (*clientpb.Builders)(nil), // 59: clientpb.Builders - (*rootpb.Response)(nil), // 60: rootpb.Response + (*clientpb.Notify)(nil), // 42: clientpb.Notify + (*rootpb.Operator)(nil), // 43: rootpb.Operator + (*clientpb.Client)(nil), // 44: clientpb.Client + (*clientpb.Basic)(nil), // 45: clientpb.Basic + (*clientpb.Clients)(nil), // 46: clientpb.Clients + (*clientpb.Sessions)(nil), // 47: clientpb.Sessions + (*clientpb.TasksContext)(nil), // 48: clientpb.TasksContext + (*clientpb.Listeners)(nil), // 49: clientpb.Listeners + (*clientpb.Pipelines)(nil), // 50: clientpb.Pipelines + (*clientpb.Jobs)(nil), // 51: clientpb.Jobs + (*clientpb.Tasks)(nil), // 52: clientpb.Tasks + (*clientpb.TaskContext)(nil), // 53: clientpb.TaskContext + (*clientpb.Files)(nil), // 54: clientpb.Files + (*clientpb.TaskContexts)(nil), // 55: clientpb.TaskContexts + (*clientpb.Events)(nil), // 56: clientpb.Events + (*clientpb.SyncResp)(nil), // 57: clientpb.SyncResp + (*clientpb.Bin)(nil), // 58: clientpb.Bin + (*clientpb.Profiles)(nil), // 59: clientpb.Profiles + (*clientpb.Builders)(nil), // 60: clientpb.Builders + (*rootpb.Response)(nil), // 61: rootpb.Response } var file_services_clientrpc_service_proto_depIdxs = []int32{ 0, // 0: clientrpc.MaliceRPC.LoginClient:input_type -> clientpb.LoginReq @@ -627,137 +647,147 @@ var file_services_clientrpc_service_proto_depIdxs = []int32{ 1, // 114: clientrpc.MaliceRPC.DockerStatus:input_type -> clientpb.Empty 41, // 115: clientrpc.MaliceRPC.TriggerWorkflowDispatch:input_type -> clientpb.GithubWorkflowRequest 41, // 116: clientrpc.MaliceRPC.WorkflowStatus:input_type -> clientpb.GithubWorkflowRequest - 42, // 117: clientrpc.RootRPC.AddClient:input_type -> rootpb.Operator - 42, // 118: clientrpc.RootRPC.RemoveClient:input_type -> rootpb.Operator - 42, // 119: clientrpc.RootRPC.ListClients:input_type -> rootpb.Operator - 42, // 120: clientrpc.RootRPC.AddListener:input_type -> rootpb.Operator - 42, // 121: clientrpc.RootRPC.RemoveListener:input_type -> rootpb.Operator - 42, // 122: clientrpc.RootRPC.ListListeners:input_type -> rootpb.Operator - 43, // 123: clientrpc.MaliceRPC.LoginClient:output_type -> clientpb.Client - 44, // 124: clientrpc.MaliceRPC.GetBasic:output_type -> clientpb.Basic - 45, // 125: clientrpc.MaliceRPC.GetClients:output_type -> clientpb.Clients - 46, // 126: clientrpc.MaliceRPC.GetSessions:output_type -> clientpb.Sessions - 7, // 127: clientrpc.MaliceRPC.GetSession:output_type -> clientpb.Session - 47, // 128: clientrpc.MaliceRPC.GetSessionHistory:output_type -> clientpb.TasksContext - 1, // 129: clientrpc.MaliceRPC.SessionManage:output_type -> clientpb.Empty - 48, // 130: clientrpc.MaliceRPC.GetListeners:output_type -> clientpb.Listeners - 49, // 131: clientrpc.MaliceRPC.GetPipelines:output_type -> clientpb.Pipelines - 50, // 132: clientrpc.MaliceRPC.GetJobs:output_type -> clientpb.Jobs - 51, // 133: clientrpc.MaliceRPC.GetTasks:output_type -> clientpb.Tasks - 52, // 134: clientrpc.MaliceRPC.GetTaskContent:output_type -> clientpb.TaskContext - 53, // 135: clientrpc.MaliceRPC.GetTaskFiles:output_type -> clientpb.Files - 52, // 136: clientrpc.MaliceRPC.WaitTaskContent:output_type -> clientpb.TaskContext - 52, // 137: clientrpc.MaliceRPC.WaitTaskFinish:output_type -> clientpb.TaskContext - 54, // 138: clientrpc.MaliceRPC.GetAllTaskContent:output_type -> clientpb.TaskContexts - 53, // 139: clientrpc.MaliceRPC.GetFiles:output_type -> clientpb.Files - 53, // 140: clientrpc.MaliceRPC.GetAllDownloadFiles:output_type -> clientpb.Files - 8, // 141: clientrpc.MaliceRPC.Events:output_type -> clientpb.Event - 1, // 142: clientrpc.MaliceRPC.Broadcast:output_type -> clientpb.Empty - 1, // 143: clientrpc.MaliceRPC.Notify:output_type -> clientpb.Empty - 55, // 144: clientrpc.MaliceRPC.GetEvent:output_type -> clientpb.Events - 1, // 145: clientrpc.MaliceRPC.SessionEvent:output_type -> clientpb.Empty - 1, // 146: clientrpc.MaliceRPC.OnHook:output_type -> clientpb.Empty - 6, // 147: clientrpc.MaliceRPC.Ping:output_type -> clientpb.Task - 6, // 148: clientrpc.MaliceRPC.Sleep:output_type -> clientpb.Task - 6, // 149: clientrpc.MaliceRPC.Suicide:output_type -> clientpb.Task - 6, // 150: clientrpc.MaliceRPC.ListModule:output_type -> clientpb.Task - 6, // 151: clientrpc.MaliceRPC.LoadModule:output_type -> clientpb.Task - 6, // 152: clientrpc.MaliceRPC.RefreshModule:output_type -> clientpb.Task - 6, // 153: clientrpc.MaliceRPC.ListAddon:output_type -> clientpb.Task - 6, // 154: clientrpc.MaliceRPC.LoadAddon:output_type -> clientpb.Task - 6, // 155: clientrpc.MaliceRPC.ExecuteAddon:output_type -> clientpb.Task - 6, // 156: clientrpc.MaliceRPC.Clear:output_type -> clientpb.Task - 6, // 157: clientrpc.MaliceRPC.CancelTask:output_type -> clientpb.Task - 1, // 158: clientrpc.MaliceRPC.Polling:output_type -> clientpb.Empty - 6, // 159: clientrpc.MaliceRPC.Upload:output_type -> clientpb.Task - 6, // 160: clientrpc.MaliceRPC.Download:output_type -> clientpb.Task - 56, // 161: clientrpc.MaliceRPC.Sync:output_type -> clientpb.SyncResp - 6, // 162: clientrpc.MaliceRPC.Pwd:output_type -> clientpb.Task - 6, // 163: clientrpc.MaliceRPC.Ls:output_type -> clientpb.Task - 6, // 164: clientrpc.MaliceRPC.Cd:output_type -> clientpb.Task - 6, // 165: clientrpc.MaliceRPC.Rm:output_type -> clientpb.Task - 6, // 166: clientrpc.MaliceRPC.Mv:output_type -> clientpb.Task - 6, // 167: clientrpc.MaliceRPC.Cp:output_type -> clientpb.Task - 6, // 168: clientrpc.MaliceRPC.Cat:output_type -> clientpb.Task - 6, // 169: clientrpc.MaliceRPC.Mkdir:output_type -> clientpb.Task - 6, // 170: clientrpc.MaliceRPC.Chmod:output_type -> clientpb.Task - 6, // 171: clientrpc.MaliceRPC.Chown:output_type -> clientpb.Task - 6, // 172: clientrpc.MaliceRPC.Kill:output_type -> clientpb.Task - 6, // 173: clientrpc.MaliceRPC.Ps:output_type -> clientpb.Task - 6, // 174: clientrpc.MaliceRPC.Netstat:output_type -> clientpb.Task - 6, // 175: clientrpc.MaliceRPC.Curl:output_type -> clientpb.Task - 6, // 176: clientrpc.MaliceRPC.Env:output_type -> clientpb.Task - 6, // 177: clientrpc.MaliceRPC.SetEnv:output_type -> clientpb.Task - 6, // 178: clientrpc.MaliceRPC.UnsetEnv:output_type -> clientpb.Task - 6, // 179: clientrpc.MaliceRPC.Whoami:output_type -> clientpb.Task - 6, // 180: clientrpc.MaliceRPC.Info:output_type -> clientpb.Task - 6, // 181: clientrpc.MaliceRPC.Bypass:output_type -> clientpb.Task - 6, // 182: clientrpc.MaliceRPC.RegQuery:output_type -> clientpb.Task - 6, // 183: clientrpc.MaliceRPC.RegAdd:output_type -> clientpb.Task - 6, // 184: clientrpc.MaliceRPC.RegDelete:output_type -> clientpb.Task - 6, // 185: clientrpc.MaliceRPC.RegListKey:output_type -> clientpb.Task - 6, // 186: clientrpc.MaliceRPC.RegListValue:output_type -> clientpb.Task - 6, // 187: clientrpc.MaliceRPC.ServiceList:output_type -> clientpb.Task - 6, // 188: clientrpc.MaliceRPC.ServiceCreate:output_type -> clientpb.Task - 6, // 189: clientrpc.MaliceRPC.ServiceStart:output_type -> clientpb.Task - 6, // 190: clientrpc.MaliceRPC.ServiceStop:output_type -> clientpb.Task - 6, // 191: clientrpc.MaliceRPC.ServiceQuery:output_type -> clientpb.Task - 6, // 192: clientrpc.MaliceRPC.ServiceDelete:output_type -> clientpb.Task - 6, // 193: clientrpc.MaliceRPC.TaskSchdList:output_type -> clientpb.Task - 6, // 194: clientrpc.MaliceRPC.TaskSchdCreate:output_type -> clientpb.Task - 6, // 195: clientrpc.MaliceRPC.TaskSchdStart:output_type -> clientpb.Task - 6, // 196: clientrpc.MaliceRPC.TaskSchdStop:output_type -> clientpb.Task - 6, // 197: clientrpc.MaliceRPC.TaskSchdDelete:output_type -> clientpb.Task - 6, // 198: clientrpc.MaliceRPC.TaskSchdQuery:output_type -> clientpb.Task - 6, // 199: clientrpc.MaliceRPC.TaskSchdRun:output_type -> clientpb.Task - 6, // 200: clientrpc.MaliceRPC.WmiQuery:output_type -> clientpb.Task - 6, // 201: clientrpc.MaliceRPC.WmiExecute:output_type -> clientpb.Task - 6, // 202: clientrpc.MaliceRPC.Runas:output_type -> clientpb.Task - 6, // 203: clientrpc.MaliceRPC.Privs:output_type -> clientpb.Task - 6, // 204: clientrpc.MaliceRPC.GetSystem:output_type -> clientpb.Task - 6, // 205: clientrpc.MaliceRPC.PipeUpload:output_type -> clientpb.Task - 6, // 206: clientrpc.MaliceRPC.PipeRead:output_type -> clientpb.Task - 6, // 207: clientrpc.MaliceRPC.PipeClose:output_type -> clientpb.Task - 6, // 208: clientrpc.MaliceRPC.Execute:output_type -> clientpb.Task - 6, // 209: clientrpc.MaliceRPC.ExecuteSpawn:output_type -> clientpb.Task - 6, // 210: clientrpc.MaliceRPC.ExecuteAssembly:output_type -> clientpb.Task - 6, // 211: clientrpc.MaliceRPC.ExecutePowerpick:output_type -> clientpb.Task - 6, // 212: clientrpc.MaliceRPC.ExecuteEXE:output_type -> clientpb.Task - 6, // 213: clientrpc.MaliceRPC.ExecuteDLL:output_type -> clientpb.Task - 6, // 214: clientrpc.MaliceRPC.ExecuteArmory:output_type -> clientpb.Task - 6, // 215: clientrpc.MaliceRPC.ExecuteShellcode:output_type -> clientpb.Task - 6, // 216: clientrpc.MaliceRPC.ExecuteBof:output_type -> clientpb.Task - 6, // 217: clientrpc.MaliceRPC.ExecuteLocal:output_type -> clientpb.Task - 6, // 218: clientrpc.MaliceRPC.InlineLocal:output_type -> clientpb.Task - 57, // 219: clientrpc.MaliceRPC.EXE2Shellcode:output_type -> clientpb.Bin - 57, // 220: clientrpc.MaliceRPC.DLL2Shellcode:output_type -> clientpb.Bin - 57, // 221: clientrpc.MaliceRPC.ShellcodeEncode:output_type -> clientpb.Bin - 49, // 222: clientrpc.MaliceRPC.ListJobs:output_type -> clientpb.Pipelines - 1, // 223: clientrpc.MaliceRPC.NewProfile:output_type -> clientpb.Empty - 58, // 224: clientrpc.MaliceRPC.GetProfiles:output_type -> clientpb.Profiles - 1, // 225: clientrpc.MaliceRPC.DeleteProfile:output_type -> clientpb.Empty - 1, // 226: clientrpc.MaliceRPC.UpdateProfile:output_type -> clientpb.Empty - 39, // 227: clientrpc.MaliceRPC.Build:output_type -> clientpb.Builder - 40, // 228: clientrpc.MaliceRPC.BuildModules:output_type -> clientpb.Artifact - 39, // 229: clientrpc.MaliceRPC.BuildLog:output_type -> clientpb.Builder - 59, // 230: clientrpc.MaliceRPC.ListBuilder:output_type -> clientpb.Builders - 59, // 231: clientrpc.MaliceRPC.GetArtifactsByProfile:output_type -> clientpb.Builders - 40, // 232: clientrpc.MaliceRPC.DownloadArtifact:output_type -> clientpb.Artifact - 39, // 233: clientrpc.MaliceRPC.UploadArtifact:output_type -> clientpb.Builder - 40, // 234: clientrpc.MaliceRPC.FindArtifact:output_type -> clientpb.Artifact - 1, // 235: clientrpc.MaliceRPC.DeleteArtifact:output_type -> clientpb.Empty - 40, // 236: clientrpc.MaliceRPC.MaleficSRDI:output_type -> clientpb.Artifact - 1, // 237: clientrpc.MaliceRPC.DockerStatus:output_type -> clientpb.Empty - 39, // 238: clientrpc.MaliceRPC.TriggerWorkflowDispatch:output_type -> clientpb.Builder - 1, // 239: clientrpc.MaliceRPC.WorkflowStatus:output_type -> clientpb.Empty - 60, // 240: clientrpc.RootRPC.AddClient:output_type -> rootpb.Response - 60, // 241: clientrpc.RootRPC.RemoveClient:output_type -> rootpb.Response - 45, // 242: clientrpc.RootRPC.ListClients:output_type -> clientpb.Clients - 60, // 243: clientrpc.RootRPC.AddListener:output_type -> rootpb.Response - 60, // 244: clientrpc.RootRPC.RemoveListener:output_type -> rootpb.Response - 48, // 245: clientrpc.RootRPC.ListListeners:output_type -> clientpb.Listeners - 123, // [123:246] is the sub-list for method output_type - 0, // [0:123] is the sub-list for method input_type + 41, // 117: clientrpc.MaliceRPC.UpdateGithubConfig:input_type -> clientpb.GithubWorkflowRequest + 1, // 118: clientrpc.MaliceRPC.GetGithubConfig:input_type -> clientpb.Empty + 42, // 119: clientrpc.MaliceRPC.UpdateNotifyConfig:input_type -> clientpb.Notify + 1, // 120: clientrpc.MaliceRPC.GetNotifyConfig:input_type -> clientpb.Empty + 1, // 121: clientrpc.MaliceRPC.RefreshConfig:input_type -> clientpb.Empty + 43, // 122: clientrpc.RootRPC.AddClient:input_type -> rootpb.Operator + 43, // 123: clientrpc.RootRPC.RemoveClient:input_type -> rootpb.Operator + 43, // 124: clientrpc.RootRPC.ListClients:input_type -> rootpb.Operator + 43, // 125: clientrpc.RootRPC.AddListener:input_type -> rootpb.Operator + 43, // 126: clientrpc.RootRPC.RemoveListener:input_type -> rootpb.Operator + 43, // 127: clientrpc.RootRPC.ListListeners:input_type -> rootpb.Operator + 44, // 128: clientrpc.MaliceRPC.LoginClient:output_type -> clientpb.Client + 45, // 129: clientrpc.MaliceRPC.GetBasic:output_type -> clientpb.Basic + 46, // 130: clientrpc.MaliceRPC.GetClients:output_type -> clientpb.Clients + 47, // 131: clientrpc.MaliceRPC.GetSessions:output_type -> clientpb.Sessions + 7, // 132: clientrpc.MaliceRPC.GetSession:output_type -> clientpb.Session + 48, // 133: clientrpc.MaliceRPC.GetSessionHistory:output_type -> clientpb.TasksContext + 1, // 134: clientrpc.MaliceRPC.SessionManage:output_type -> clientpb.Empty + 49, // 135: clientrpc.MaliceRPC.GetListeners:output_type -> clientpb.Listeners + 50, // 136: clientrpc.MaliceRPC.GetPipelines:output_type -> clientpb.Pipelines + 51, // 137: clientrpc.MaliceRPC.GetJobs:output_type -> clientpb.Jobs + 52, // 138: clientrpc.MaliceRPC.GetTasks:output_type -> clientpb.Tasks + 53, // 139: clientrpc.MaliceRPC.GetTaskContent:output_type -> clientpb.TaskContext + 54, // 140: clientrpc.MaliceRPC.GetTaskFiles:output_type -> clientpb.Files + 53, // 141: clientrpc.MaliceRPC.WaitTaskContent:output_type -> clientpb.TaskContext + 53, // 142: clientrpc.MaliceRPC.WaitTaskFinish:output_type -> clientpb.TaskContext + 55, // 143: clientrpc.MaliceRPC.GetAllTaskContent:output_type -> clientpb.TaskContexts + 54, // 144: clientrpc.MaliceRPC.GetFiles:output_type -> clientpb.Files + 54, // 145: clientrpc.MaliceRPC.GetAllDownloadFiles:output_type -> clientpb.Files + 8, // 146: clientrpc.MaliceRPC.Events:output_type -> clientpb.Event + 1, // 147: clientrpc.MaliceRPC.Broadcast:output_type -> clientpb.Empty + 1, // 148: clientrpc.MaliceRPC.Notify:output_type -> clientpb.Empty + 56, // 149: clientrpc.MaliceRPC.GetEvent:output_type -> clientpb.Events + 1, // 150: clientrpc.MaliceRPC.SessionEvent:output_type -> clientpb.Empty + 1, // 151: clientrpc.MaliceRPC.OnHook:output_type -> clientpb.Empty + 6, // 152: clientrpc.MaliceRPC.Ping:output_type -> clientpb.Task + 6, // 153: clientrpc.MaliceRPC.Sleep:output_type -> clientpb.Task + 6, // 154: clientrpc.MaliceRPC.Suicide:output_type -> clientpb.Task + 6, // 155: clientrpc.MaliceRPC.ListModule:output_type -> clientpb.Task + 6, // 156: clientrpc.MaliceRPC.LoadModule:output_type -> clientpb.Task + 6, // 157: clientrpc.MaliceRPC.RefreshModule:output_type -> clientpb.Task + 6, // 158: clientrpc.MaliceRPC.ListAddon:output_type -> clientpb.Task + 6, // 159: clientrpc.MaliceRPC.LoadAddon:output_type -> clientpb.Task + 6, // 160: clientrpc.MaliceRPC.ExecuteAddon:output_type -> clientpb.Task + 6, // 161: clientrpc.MaliceRPC.Clear:output_type -> clientpb.Task + 6, // 162: clientrpc.MaliceRPC.CancelTask:output_type -> clientpb.Task + 1, // 163: clientrpc.MaliceRPC.Polling:output_type -> clientpb.Empty + 6, // 164: clientrpc.MaliceRPC.Upload:output_type -> clientpb.Task + 6, // 165: clientrpc.MaliceRPC.Download:output_type -> clientpb.Task + 57, // 166: clientrpc.MaliceRPC.Sync:output_type -> clientpb.SyncResp + 6, // 167: clientrpc.MaliceRPC.Pwd:output_type -> clientpb.Task + 6, // 168: clientrpc.MaliceRPC.Ls:output_type -> clientpb.Task + 6, // 169: clientrpc.MaliceRPC.Cd:output_type -> clientpb.Task + 6, // 170: clientrpc.MaliceRPC.Rm:output_type -> clientpb.Task + 6, // 171: clientrpc.MaliceRPC.Mv:output_type -> clientpb.Task + 6, // 172: clientrpc.MaliceRPC.Cp:output_type -> clientpb.Task + 6, // 173: clientrpc.MaliceRPC.Cat:output_type -> clientpb.Task + 6, // 174: clientrpc.MaliceRPC.Mkdir:output_type -> clientpb.Task + 6, // 175: clientrpc.MaliceRPC.Chmod:output_type -> clientpb.Task + 6, // 176: clientrpc.MaliceRPC.Chown:output_type -> clientpb.Task + 6, // 177: clientrpc.MaliceRPC.Kill:output_type -> clientpb.Task + 6, // 178: clientrpc.MaliceRPC.Ps:output_type -> clientpb.Task + 6, // 179: clientrpc.MaliceRPC.Netstat:output_type -> clientpb.Task + 6, // 180: clientrpc.MaliceRPC.Curl:output_type -> clientpb.Task + 6, // 181: clientrpc.MaliceRPC.Env:output_type -> clientpb.Task + 6, // 182: clientrpc.MaliceRPC.SetEnv:output_type -> clientpb.Task + 6, // 183: clientrpc.MaliceRPC.UnsetEnv:output_type -> clientpb.Task + 6, // 184: clientrpc.MaliceRPC.Whoami:output_type -> clientpb.Task + 6, // 185: clientrpc.MaliceRPC.Info:output_type -> clientpb.Task + 6, // 186: clientrpc.MaliceRPC.Bypass:output_type -> clientpb.Task + 6, // 187: clientrpc.MaliceRPC.RegQuery:output_type -> clientpb.Task + 6, // 188: clientrpc.MaliceRPC.RegAdd:output_type -> clientpb.Task + 6, // 189: clientrpc.MaliceRPC.RegDelete:output_type -> clientpb.Task + 6, // 190: clientrpc.MaliceRPC.RegListKey:output_type -> clientpb.Task + 6, // 191: clientrpc.MaliceRPC.RegListValue:output_type -> clientpb.Task + 6, // 192: clientrpc.MaliceRPC.ServiceList:output_type -> clientpb.Task + 6, // 193: clientrpc.MaliceRPC.ServiceCreate:output_type -> clientpb.Task + 6, // 194: clientrpc.MaliceRPC.ServiceStart:output_type -> clientpb.Task + 6, // 195: clientrpc.MaliceRPC.ServiceStop:output_type -> clientpb.Task + 6, // 196: clientrpc.MaliceRPC.ServiceQuery:output_type -> clientpb.Task + 6, // 197: clientrpc.MaliceRPC.ServiceDelete:output_type -> clientpb.Task + 6, // 198: clientrpc.MaliceRPC.TaskSchdList:output_type -> clientpb.Task + 6, // 199: clientrpc.MaliceRPC.TaskSchdCreate:output_type -> clientpb.Task + 6, // 200: clientrpc.MaliceRPC.TaskSchdStart:output_type -> clientpb.Task + 6, // 201: clientrpc.MaliceRPC.TaskSchdStop:output_type -> clientpb.Task + 6, // 202: clientrpc.MaliceRPC.TaskSchdDelete:output_type -> clientpb.Task + 6, // 203: clientrpc.MaliceRPC.TaskSchdQuery:output_type -> clientpb.Task + 6, // 204: clientrpc.MaliceRPC.TaskSchdRun:output_type -> clientpb.Task + 6, // 205: clientrpc.MaliceRPC.WmiQuery:output_type -> clientpb.Task + 6, // 206: clientrpc.MaliceRPC.WmiExecute:output_type -> clientpb.Task + 6, // 207: clientrpc.MaliceRPC.Runas:output_type -> clientpb.Task + 6, // 208: clientrpc.MaliceRPC.Privs:output_type -> clientpb.Task + 6, // 209: clientrpc.MaliceRPC.GetSystem:output_type -> clientpb.Task + 6, // 210: clientrpc.MaliceRPC.PipeUpload:output_type -> clientpb.Task + 6, // 211: clientrpc.MaliceRPC.PipeRead:output_type -> clientpb.Task + 6, // 212: clientrpc.MaliceRPC.PipeClose:output_type -> clientpb.Task + 6, // 213: clientrpc.MaliceRPC.Execute:output_type -> clientpb.Task + 6, // 214: clientrpc.MaliceRPC.ExecuteSpawn:output_type -> clientpb.Task + 6, // 215: clientrpc.MaliceRPC.ExecuteAssembly:output_type -> clientpb.Task + 6, // 216: clientrpc.MaliceRPC.ExecutePowerpick:output_type -> clientpb.Task + 6, // 217: clientrpc.MaliceRPC.ExecuteEXE:output_type -> clientpb.Task + 6, // 218: clientrpc.MaliceRPC.ExecuteDLL:output_type -> clientpb.Task + 6, // 219: clientrpc.MaliceRPC.ExecuteArmory:output_type -> clientpb.Task + 6, // 220: clientrpc.MaliceRPC.ExecuteShellcode:output_type -> clientpb.Task + 6, // 221: clientrpc.MaliceRPC.ExecuteBof:output_type -> clientpb.Task + 6, // 222: clientrpc.MaliceRPC.ExecuteLocal:output_type -> clientpb.Task + 6, // 223: clientrpc.MaliceRPC.InlineLocal:output_type -> clientpb.Task + 58, // 224: clientrpc.MaliceRPC.EXE2Shellcode:output_type -> clientpb.Bin + 58, // 225: clientrpc.MaliceRPC.DLL2Shellcode:output_type -> clientpb.Bin + 58, // 226: clientrpc.MaliceRPC.ShellcodeEncode:output_type -> clientpb.Bin + 50, // 227: clientrpc.MaliceRPC.ListJobs:output_type -> clientpb.Pipelines + 1, // 228: clientrpc.MaliceRPC.NewProfile:output_type -> clientpb.Empty + 59, // 229: clientrpc.MaliceRPC.GetProfiles:output_type -> clientpb.Profiles + 1, // 230: clientrpc.MaliceRPC.DeleteProfile:output_type -> clientpb.Empty + 1, // 231: clientrpc.MaliceRPC.UpdateProfile:output_type -> clientpb.Empty + 39, // 232: clientrpc.MaliceRPC.Build:output_type -> clientpb.Builder + 40, // 233: clientrpc.MaliceRPC.BuildModules:output_type -> clientpb.Artifact + 39, // 234: clientrpc.MaliceRPC.BuildLog:output_type -> clientpb.Builder + 60, // 235: clientrpc.MaliceRPC.ListBuilder:output_type -> clientpb.Builders + 60, // 236: clientrpc.MaliceRPC.GetArtifactsByProfile:output_type -> clientpb.Builders + 40, // 237: clientrpc.MaliceRPC.DownloadArtifact:output_type -> clientpb.Artifact + 39, // 238: clientrpc.MaliceRPC.UploadArtifact:output_type -> clientpb.Builder + 40, // 239: clientrpc.MaliceRPC.FindArtifact:output_type -> clientpb.Artifact + 1, // 240: clientrpc.MaliceRPC.DeleteArtifact:output_type -> clientpb.Empty + 40, // 241: clientrpc.MaliceRPC.MaleficSRDI:output_type -> clientpb.Artifact + 1, // 242: clientrpc.MaliceRPC.DockerStatus:output_type -> clientpb.Empty + 39, // 243: clientrpc.MaliceRPC.TriggerWorkflowDispatch:output_type -> clientpb.Builder + 1, // 244: clientrpc.MaliceRPC.WorkflowStatus:output_type -> clientpb.Empty + 1, // 245: clientrpc.MaliceRPC.UpdateGithubConfig:output_type -> clientpb.Empty + 41, // 246: clientrpc.MaliceRPC.GetGithubConfig:output_type -> clientpb.GithubWorkflowRequest + 1, // 247: clientrpc.MaliceRPC.UpdateNotifyConfig:output_type -> clientpb.Empty + 42, // 248: clientrpc.MaliceRPC.GetNotifyConfig:output_type -> clientpb.Notify + 1, // 249: clientrpc.MaliceRPC.RefreshConfig:output_type -> clientpb.Empty + 61, // 250: clientrpc.RootRPC.AddClient:output_type -> rootpb.Response + 61, // 251: clientrpc.RootRPC.RemoveClient:output_type -> rootpb.Response + 46, // 252: clientrpc.RootRPC.ListClients:output_type -> clientpb.Clients + 61, // 253: clientrpc.RootRPC.AddListener:output_type -> rootpb.Response + 61, // 254: clientrpc.RootRPC.RemoveListener:output_type -> rootpb.Response + 49, // 255: clientrpc.RootRPC.ListListeners:output_type -> clientpb.Listeners + 128, // [128:256] is the sub-list for method output_type + 0, // [0:128] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/helper/proto/services/clientrpc/service_grpc.pb.go b/helper/proto/services/clientrpc/service_grpc.pb.go index c90db0c7..e596d48a 100644 --- a/helper/proto/services/clientrpc/service_grpc.pb.go +++ b/helper/proto/services/clientrpc/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v3.20.3 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.12 // source: services/clientrpc/service.proto package clientrpc @@ -18,8 +18,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( MaliceRPC_LoginClient_FullMethodName = "/clientrpc.MaliceRPC/LoginClient" @@ -139,6 +139,11 @@ const ( MaliceRPC_DockerStatus_FullMethodName = "/clientrpc.MaliceRPC/DockerStatus" MaliceRPC_TriggerWorkflowDispatch_FullMethodName = "/clientrpc.MaliceRPC/TriggerWorkflowDispatch" MaliceRPC_WorkflowStatus_FullMethodName = "/clientrpc.MaliceRPC/WorkflowStatus" + MaliceRPC_UpdateGithubConfig_FullMethodName = "/clientrpc.MaliceRPC/UpdateGithubConfig" + MaliceRPC_GetGithubConfig_FullMethodName = "/clientrpc.MaliceRPC/GetGithubConfig" + MaliceRPC_UpdateNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/UpdateNotifyConfig" + MaliceRPC_GetNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/GetNotifyConfig" + MaliceRPC_RefreshConfig_FullMethodName = "/clientrpc.MaliceRPC/RefreshConfig" ) // MaliceRPCClient is the client API for MaliceRPC service. @@ -165,7 +170,7 @@ type MaliceRPCClient interface { GetFiles(ctx context.Context, in *clientpb.Session, opts ...grpc.CallOption) (*clientpb.Files, error) GetAllDownloadFiles(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Files, error) // event - Events(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[clientpb.Event], error) + Events(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (MaliceRPC_EventsClient, error) Broadcast(ctx context.Context, in *clientpb.Event, opts ...grpc.CallOption) (*clientpb.Empty, error) Notify(ctx context.Context, in *clientpb.Event, opts ...grpc.CallOption) (*clientpb.Empty, error) GetEvent(ctx context.Context, in *clientpb.Int, opts ...grpc.CallOption) (*clientpb.Events, error) @@ -280,6 +285,12 @@ type MaliceRPCClient interface { // action TriggerWorkflowDispatch(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Builder, error) WorkflowStatus(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) + // config + UpdateGithubConfig(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) + GetGithubConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.GithubWorkflowRequest, error) + UpdateNotifyConfig(ctx context.Context, in *clientpb.Notify, opts ...grpc.CallOption) (*clientpb.Empty, error) + GetNotifyConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Notify, error) + RefreshConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) } type maliceRPCClient struct { @@ -291,9 +302,8 @@ func NewMaliceRPCClient(cc grpc.ClientConnInterface) MaliceRPCClient { } func (c *maliceRPCClient) LoginClient(ctx context.Context, in *clientpb.LoginReq, opts ...grpc.CallOption) (*clientpb.Client, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Client) - err := c.cc.Invoke(ctx, MaliceRPC_LoginClient_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_LoginClient_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -301,9 +311,8 @@ func (c *maliceRPCClient) LoginClient(ctx context.Context, in *clientpb.LoginReq } func (c *maliceRPCClient) GetBasic(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Basic, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Basic) - err := c.cc.Invoke(ctx, MaliceRPC_GetBasic_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetBasic_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -311,9 +320,8 @@ func (c *maliceRPCClient) GetBasic(ctx context.Context, in *clientpb.Empty, opts } func (c *maliceRPCClient) GetClients(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Clients, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Clients) - err := c.cc.Invoke(ctx, MaliceRPC_GetClients_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetClients_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -321,9 +329,8 @@ func (c *maliceRPCClient) GetClients(ctx context.Context, in *clientpb.Empty, op } func (c *maliceRPCClient) GetSessions(ctx context.Context, in *clientpb.SessionRequest, opts ...grpc.CallOption) (*clientpb.Sessions, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Sessions) - err := c.cc.Invoke(ctx, MaliceRPC_GetSessions_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetSessions_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -331,9 +338,8 @@ func (c *maliceRPCClient) GetSessions(ctx context.Context, in *clientpb.SessionR } func (c *maliceRPCClient) GetSession(ctx context.Context, in *clientpb.SessionRequest, opts ...grpc.CallOption) (*clientpb.Session, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Session) - err := c.cc.Invoke(ctx, MaliceRPC_GetSession_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetSession_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -341,9 +347,8 @@ func (c *maliceRPCClient) GetSession(ctx context.Context, in *clientpb.SessionRe } func (c *maliceRPCClient) GetSessionHistory(ctx context.Context, in *clientpb.Int, opts ...grpc.CallOption) (*clientpb.TasksContext, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.TasksContext) - err := c.cc.Invoke(ctx, MaliceRPC_GetSessionHistory_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetSessionHistory_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -351,9 +356,8 @@ func (c *maliceRPCClient) GetSessionHistory(ctx context.Context, in *clientpb.In } func (c *maliceRPCClient) SessionManage(ctx context.Context, in *clientpb.BasicUpdateSession, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_SessionManage_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_SessionManage_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -361,9 +365,8 @@ func (c *maliceRPCClient) SessionManage(ctx context.Context, in *clientpb.BasicU } func (c *maliceRPCClient) GetListeners(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Listeners, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Listeners) - err := c.cc.Invoke(ctx, MaliceRPC_GetListeners_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetListeners_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -371,9 +374,8 @@ func (c *maliceRPCClient) GetListeners(ctx context.Context, in *clientpb.Empty, } func (c *maliceRPCClient) GetPipelines(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Pipelines, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Pipelines) - err := c.cc.Invoke(ctx, MaliceRPC_GetPipelines_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetPipelines_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -381,9 +383,8 @@ func (c *maliceRPCClient) GetPipelines(ctx context.Context, in *clientpb.Empty, } func (c *maliceRPCClient) GetJobs(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Jobs, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Jobs) - err := c.cc.Invoke(ctx, MaliceRPC_GetJobs_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetJobs_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -391,9 +392,8 @@ func (c *maliceRPCClient) GetJobs(ctx context.Context, in *clientpb.Empty, opts } func (c *maliceRPCClient) GetTasks(ctx context.Context, in *clientpb.TaskRequest, opts ...grpc.CallOption) (*clientpb.Tasks, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Tasks) - err := c.cc.Invoke(ctx, MaliceRPC_GetTasks_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetTasks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -401,9 +401,8 @@ func (c *maliceRPCClient) GetTasks(ctx context.Context, in *clientpb.TaskRequest } func (c *maliceRPCClient) GetTaskContent(ctx context.Context, in *clientpb.Task, opts ...grpc.CallOption) (*clientpb.TaskContext, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.TaskContext) - err := c.cc.Invoke(ctx, MaliceRPC_GetTaskContent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetTaskContent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -411,9 +410,8 @@ func (c *maliceRPCClient) GetTaskContent(ctx context.Context, in *clientpb.Task, } func (c *maliceRPCClient) GetTaskFiles(ctx context.Context, in *clientpb.Session, opts ...grpc.CallOption) (*clientpb.Files, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Files) - err := c.cc.Invoke(ctx, MaliceRPC_GetTaskFiles_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetTaskFiles_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -421,9 +419,8 @@ func (c *maliceRPCClient) GetTaskFiles(ctx context.Context, in *clientpb.Session } func (c *maliceRPCClient) WaitTaskContent(ctx context.Context, in *clientpb.Task, opts ...grpc.CallOption) (*clientpb.TaskContext, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.TaskContext) - err := c.cc.Invoke(ctx, MaliceRPC_WaitTaskContent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_WaitTaskContent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -431,9 +428,8 @@ func (c *maliceRPCClient) WaitTaskContent(ctx context.Context, in *clientpb.Task } func (c *maliceRPCClient) WaitTaskFinish(ctx context.Context, in *clientpb.Task, opts ...grpc.CallOption) (*clientpb.TaskContext, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.TaskContext) - err := c.cc.Invoke(ctx, MaliceRPC_WaitTaskFinish_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_WaitTaskFinish_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -441,9 +437,8 @@ func (c *maliceRPCClient) WaitTaskFinish(ctx context.Context, in *clientpb.Task, } func (c *maliceRPCClient) GetAllTaskContent(ctx context.Context, in *clientpb.Task, opts ...grpc.CallOption) (*clientpb.TaskContexts, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.TaskContexts) - err := c.cc.Invoke(ctx, MaliceRPC_GetAllTaskContent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetAllTaskContent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -451,9 +446,8 @@ func (c *maliceRPCClient) GetAllTaskContent(ctx context.Context, in *clientpb.Ta } func (c *maliceRPCClient) GetFiles(ctx context.Context, in *clientpb.Session, opts ...grpc.CallOption) (*clientpb.Files, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Files) - err := c.cc.Invoke(ctx, MaliceRPC_GetFiles_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetFiles_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -461,22 +455,20 @@ func (c *maliceRPCClient) GetFiles(ctx context.Context, in *clientpb.Session, op } func (c *maliceRPCClient) GetAllDownloadFiles(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Files, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Files) - err := c.cc.Invoke(ctx, MaliceRPC_GetAllDownloadFiles_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetAllDownloadFiles_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *maliceRPCClient) Events(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[clientpb.Event], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &MaliceRPC_ServiceDesc.Streams[0], MaliceRPC_Events_FullMethodName, cOpts...) +func (c *maliceRPCClient) Events(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (MaliceRPC_EventsClient, error) { + stream, err := c.cc.NewStream(ctx, &MaliceRPC_ServiceDesc.Streams[0], MaliceRPC_Events_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[clientpb.Empty, clientpb.Event]{ClientStream: stream} + x := &maliceRPCEventsClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -486,13 +478,26 @@ func (c *maliceRPCClient) Events(ctx context.Context, in *clientpb.Empty, opts . return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type MaliceRPC_EventsClient = grpc.ServerStreamingClient[clientpb.Event] +type MaliceRPC_EventsClient interface { + Recv() (*clientpb.Event, error) + grpc.ClientStream +} + +type maliceRPCEventsClient struct { + grpc.ClientStream +} + +func (x *maliceRPCEventsClient) Recv() (*clientpb.Event, error) { + m := new(clientpb.Event) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *maliceRPCClient) Broadcast(ctx context.Context, in *clientpb.Event, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_Broadcast_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Broadcast_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -500,9 +505,8 @@ func (c *maliceRPCClient) Broadcast(ctx context.Context, in *clientpb.Event, opt } func (c *maliceRPCClient) Notify(ctx context.Context, in *clientpb.Event, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_Notify_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Notify_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -510,9 +514,8 @@ func (c *maliceRPCClient) Notify(ctx context.Context, in *clientpb.Event, opts . } func (c *maliceRPCClient) GetEvent(ctx context.Context, in *clientpb.Int, opts ...grpc.CallOption) (*clientpb.Events, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Events) - err := c.cc.Invoke(ctx, MaliceRPC_GetEvent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -520,9 +523,8 @@ func (c *maliceRPCClient) GetEvent(ctx context.Context, in *clientpb.Int, opts . } func (c *maliceRPCClient) SessionEvent(ctx context.Context, in *clientpb.Event, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_SessionEvent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_SessionEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -530,9 +532,8 @@ func (c *maliceRPCClient) SessionEvent(ctx context.Context, in *clientpb.Event, } func (c *maliceRPCClient) OnHook(ctx context.Context, in *clientpb.On, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_OnHook_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_OnHook_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -540,9 +541,8 @@ func (c *maliceRPCClient) OnHook(ctx context.Context, in *clientpb.On, opts ...g } func (c *maliceRPCClient) Ping(ctx context.Context, in *implantpb.Ping, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Ping_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Ping_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -550,9 +550,8 @@ func (c *maliceRPCClient) Ping(ctx context.Context, in *implantpb.Ping, opts ... } func (c *maliceRPCClient) Sleep(ctx context.Context, in *implantpb.Timer, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Sleep_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Sleep_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -560,9 +559,8 @@ func (c *maliceRPCClient) Sleep(ctx context.Context, in *implantpb.Timer, opts . } func (c *maliceRPCClient) Suicide(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Suicide_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Suicide_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -570,9 +568,8 @@ func (c *maliceRPCClient) Suicide(ctx context.Context, in *implantpb.Request, op } func (c *maliceRPCClient) ListModule(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ListModule_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ListModule_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -580,9 +577,8 @@ func (c *maliceRPCClient) ListModule(ctx context.Context, in *implantpb.Request, } func (c *maliceRPCClient) LoadModule(ctx context.Context, in *implantpb.LoadModule, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_LoadModule_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_LoadModule_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -590,9 +586,8 @@ func (c *maliceRPCClient) LoadModule(ctx context.Context, in *implantpb.LoadModu } func (c *maliceRPCClient) RefreshModule(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_RefreshModule_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_RefreshModule_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -600,9 +595,8 @@ func (c *maliceRPCClient) RefreshModule(ctx context.Context, in *implantpb.Reque } func (c *maliceRPCClient) ListAddon(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ListAddon_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ListAddon_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -610,9 +604,8 @@ func (c *maliceRPCClient) ListAddon(ctx context.Context, in *implantpb.Request, } func (c *maliceRPCClient) LoadAddon(ctx context.Context, in *implantpb.LoadAddon, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_LoadAddon_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_LoadAddon_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -620,9 +613,8 @@ func (c *maliceRPCClient) LoadAddon(ctx context.Context, in *implantpb.LoadAddon } func (c *maliceRPCClient) ExecuteAddon(ctx context.Context, in *implantpb.ExecuteAddon, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteAddon_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteAddon_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -630,9 +622,8 @@ func (c *maliceRPCClient) ExecuteAddon(ctx context.Context, in *implantpb.Execut } func (c *maliceRPCClient) Clear(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Clear_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Clear_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -640,9 +631,8 @@ func (c *maliceRPCClient) Clear(ctx context.Context, in *implantpb.Request, opts } func (c *maliceRPCClient) CancelTask(ctx context.Context, in *implantpb.ImplantTask, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_CancelTask_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_CancelTask_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -650,9 +640,8 @@ func (c *maliceRPCClient) CancelTask(ctx context.Context, in *implantpb.ImplantT } func (c *maliceRPCClient) Polling(ctx context.Context, in *clientpb.Polling, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_Polling_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Polling_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -660,9 +649,8 @@ func (c *maliceRPCClient) Polling(ctx context.Context, in *clientpb.Polling, opt } func (c *maliceRPCClient) Upload(ctx context.Context, in *implantpb.UploadRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Upload_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Upload_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -670,9 +658,8 @@ func (c *maliceRPCClient) Upload(ctx context.Context, in *implantpb.UploadReques } func (c *maliceRPCClient) Download(ctx context.Context, in *implantpb.DownloadRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Download_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Download_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -680,9 +667,8 @@ func (c *maliceRPCClient) Download(ctx context.Context, in *implantpb.DownloadRe } func (c *maliceRPCClient) Sync(ctx context.Context, in *clientpb.Sync, opts ...grpc.CallOption) (*clientpb.SyncResp, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.SyncResp) - err := c.cc.Invoke(ctx, MaliceRPC_Sync_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Sync_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -690,9 +676,8 @@ func (c *maliceRPCClient) Sync(ctx context.Context, in *clientpb.Sync, opts ...g } func (c *maliceRPCClient) Pwd(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Pwd_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Pwd_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -700,9 +685,8 @@ func (c *maliceRPCClient) Pwd(ctx context.Context, in *implantpb.Request, opts . } func (c *maliceRPCClient) Ls(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Ls_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Ls_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -710,9 +694,8 @@ func (c *maliceRPCClient) Ls(ctx context.Context, in *implantpb.Request, opts .. } func (c *maliceRPCClient) Cd(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Cd_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Cd_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -720,9 +703,8 @@ func (c *maliceRPCClient) Cd(ctx context.Context, in *implantpb.Request, opts .. } func (c *maliceRPCClient) Rm(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Rm_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Rm_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -730,9 +712,8 @@ func (c *maliceRPCClient) Rm(ctx context.Context, in *implantpb.Request, opts .. } func (c *maliceRPCClient) Mv(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Mv_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Mv_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -740,9 +721,8 @@ func (c *maliceRPCClient) Mv(ctx context.Context, in *implantpb.Request, opts .. } func (c *maliceRPCClient) Cp(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Cp_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Cp_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -750,9 +730,8 @@ func (c *maliceRPCClient) Cp(ctx context.Context, in *implantpb.Request, opts .. } func (c *maliceRPCClient) Cat(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Cat_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Cat_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -760,9 +739,8 @@ func (c *maliceRPCClient) Cat(ctx context.Context, in *implantpb.Request, opts . } func (c *maliceRPCClient) Mkdir(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Mkdir_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Mkdir_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -770,9 +748,8 @@ func (c *maliceRPCClient) Mkdir(ctx context.Context, in *implantpb.Request, opts } func (c *maliceRPCClient) Chmod(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Chmod_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Chmod_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -780,9 +757,8 @@ func (c *maliceRPCClient) Chmod(ctx context.Context, in *implantpb.Request, opts } func (c *maliceRPCClient) Chown(ctx context.Context, in *implantpb.ChownRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Chown_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Chown_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -790,9 +766,8 @@ func (c *maliceRPCClient) Chown(ctx context.Context, in *implantpb.ChownRequest, } func (c *maliceRPCClient) Kill(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Kill_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Kill_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -800,9 +775,8 @@ func (c *maliceRPCClient) Kill(ctx context.Context, in *implantpb.Request, opts } func (c *maliceRPCClient) Ps(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Ps_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Ps_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -810,9 +784,8 @@ func (c *maliceRPCClient) Ps(ctx context.Context, in *implantpb.Request, opts .. } func (c *maliceRPCClient) Netstat(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Netstat_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Netstat_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -820,9 +793,8 @@ func (c *maliceRPCClient) Netstat(ctx context.Context, in *implantpb.Request, op } func (c *maliceRPCClient) Curl(ctx context.Context, in *implantpb.CurlRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Curl_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Curl_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -830,9 +802,8 @@ func (c *maliceRPCClient) Curl(ctx context.Context, in *implantpb.CurlRequest, o } func (c *maliceRPCClient) Env(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Env_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Env_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -840,9 +811,8 @@ func (c *maliceRPCClient) Env(ctx context.Context, in *implantpb.Request, opts . } func (c *maliceRPCClient) SetEnv(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_SetEnv_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_SetEnv_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -850,9 +820,8 @@ func (c *maliceRPCClient) SetEnv(ctx context.Context, in *implantpb.Request, opt } func (c *maliceRPCClient) UnsetEnv(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_UnsetEnv_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_UnsetEnv_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -860,9 +829,8 @@ func (c *maliceRPCClient) UnsetEnv(ctx context.Context, in *implantpb.Request, o } func (c *maliceRPCClient) Whoami(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Whoami_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Whoami_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -870,9 +838,8 @@ func (c *maliceRPCClient) Whoami(ctx context.Context, in *implantpb.Request, opt } func (c *maliceRPCClient) Info(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Info_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Info_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -880,9 +847,8 @@ func (c *maliceRPCClient) Info(ctx context.Context, in *implantpb.Request, opts } func (c *maliceRPCClient) Bypass(ctx context.Context, in *implantpb.BypassRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Bypass_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Bypass_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -890,9 +856,8 @@ func (c *maliceRPCClient) Bypass(ctx context.Context, in *implantpb.BypassReques } func (c *maliceRPCClient) RegQuery(ctx context.Context, in *implantpb.RegistryRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_RegQuery_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_RegQuery_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -900,9 +865,8 @@ func (c *maliceRPCClient) RegQuery(ctx context.Context, in *implantpb.RegistryRe } func (c *maliceRPCClient) RegAdd(ctx context.Context, in *implantpb.RegistryWriteRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_RegAdd_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_RegAdd_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -910,9 +874,8 @@ func (c *maliceRPCClient) RegAdd(ctx context.Context, in *implantpb.RegistryWrit } func (c *maliceRPCClient) RegDelete(ctx context.Context, in *implantpb.RegistryRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_RegDelete_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_RegDelete_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -920,9 +883,8 @@ func (c *maliceRPCClient) RegDelete(ctx context.Context, in *implantpb.RegistryR } func (c *maliceRPCClient) RegListKey(ctx context.Context, in *implantpb.RegistryRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_RegListKey_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_RegListKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -930,9 +892,8 @@ func (c *maliceRPCClient) RegListKey(ctx context.Context, in *implantpb.Registry } func (c *maliceRPCClient) RegListValue(ctx context.Context, in *implantpb.RegistryRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_RegListValue_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_RegListValue_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -940,9 +901,8 @@ func (c *maliceRPCClient) RegListValue(ctx context.Context, in *implantpb.Regist } func (c *maliceRPCClient) ServiceList(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ServiceList_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ServiceList_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -950,9 +910,8 @@ func (c *maliceRPCClient) ServiceList(ctx context.Context, in *implantpb.Request } func (c *maliceRPCClient) ServiceCreate(ctx context.Context, in *implantpb.ServiceRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ServiceCreate_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ServiceCreate_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -960,9 +919,8 @@ func (c *maliceRPCClient) ServiceCreate(ctx context.Context, in *implantpb.Servi } func (c *maliceRPCClient) ServiceStart(ctx context.Context, in *implantpb.ServiceRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ServiceStart_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ServiceStart_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -970,9 +928,8 @@ func (c *maliceRPCClient) ServiceStart(ctx context.Context, in *implantpb.Servic } func (c *maliceRPCClient) ServiceStop(ctx context.Context, in *implantpb.ServiceRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ServiceStop_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ServiceStop_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -980,9 +937,8 @@ func (c *maliceRPCClient) ServiceStop(ctx context.Context, in *implantpb.Service } func (c *maliceRPCClient) ServiceQuery(ctx context.Context, in *implantpb.ServiceRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ServiceQuery_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ServiceQuery_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -990,9 +946,8 @@ func (c *maliceRPCClient) ServiceQuery(ctx context.Context, in *implantpb.Servic } func (c *maliceRPCClient) ServiceDelete(ctx context.Context, in *implantpb.ServiceRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ServiceDelete_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ServiceDelete_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1000,9 +955,8 @@ func (c *maliceRPCClient) ServiceDelete(ctx context.Context, in *implantpb.Servi } func (c *maliceRPCClient) TaskSchdList(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdList_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdList_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1010,9 +964,8 @@ func (c *maliceRPCClient) TaskSchdList(ctx context.Context, in *implantpb.Reques } func (c *maliceRPCClient) TaskSchdCreate(ctx context.Context, in *implantpb.TaskScheduleRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdCreate_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdCreate_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1020,9 +973,8 @@ func (c *maliceRPCClient) TaskSchdCreate(ctx context.Context, in *implantpb.Task } func (c *maliceRPCClient) TaskSchdStart(ctx context.Context, in *implantpb.TaskScheduleRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdStart_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdStart_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1030,9 +982,8 @@ func (c *maliceRPCClient) TaskSchdStart(ctx context.Context, in *implantpb.TaskS } func (c *maliceRPCClient) TaskSchdStop(ctx context.Context, in *implantpb.TaskScheduleRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdStop_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdStop_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1040,9 +991,8 @@ func (c *maliceRPCClient) TaskSchdStop(ctx context.Context, in *implantpb.TaskSc } func (c *maliceRPCClient) TaskSchdDelete(ctx context.Context, in *implantpb.TaskScheduleRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdDelete_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdDelete_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1050,9 +1000,8 @@ func (c *maliceRPCClient) TaskSchdDelete(ctx context.Context, in *implantpb.Task } func (c *maliceRPCClient) TaskSchdQuery(ctx context.Context, in *implantpb.TaskScheduleRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdQuery_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdQuery_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1060,9 +1009,8 @@ func (c *maliceRPCClient) TaskSchdQuery(ctx context.Context, in *implantpb.TaskS } func (c *maliceRPCClient) TaskSchdRun(ctx context.Context, in *implantpb.TaskScheduleRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdRun_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TaskSchdRun_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1070,9 +1018,8 @@ func (c *maliceRPCClient) TaskSchdRun(ctx context.Context, in *implantpb.TaskSch } func (c *maliceRPCClient) WmiQuery(ctx context.Context, in *implantpb.WmiQueryRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_WmiQuery_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_WmiQuery_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1080,9 +1027,8 @@ func (c *maliceRPCClient) WmiQuery(ctx context.Context, in *implantpb.WmiQueryRe } func (c *maliceRPCClient) WmiExecute(ctx context.Context, in *implantpb.WmiMethodRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_WmiExecute_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_WmiExecute_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1090,9 +1036,8 @@ func (c *maliceRPCClient) WmiExecute(ctx context.Context, in *implantpb.WmiMetho } func (c *maliceRPCClient) Runas(ctx context.Context, in *implantpb.RunAsRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Runas_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Runas_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1100,9 +1045,8 @@ func (c *maliceRPCClient) Runas(ctx context.Context, in *implantpb.RunAsRequest, } func (c *maliceRPCClient) Privs(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Privs_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Privs_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1110,9 +1054,8 @@ func (c *maliceRPCClient) Privs(ctx context.Context, in *implantpb.Request, opts } func (c *maliceRPCClient) GetSystem(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_GetSystem_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetSystem_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1120,9 +1063,8 @@ func (c *maliceRPCClient) GetSystem(ctx context.Context, in *implantpb.Request, } func (c *maliceRPCClient) PipeUpload(ctx context.Context, in *implantpb.PipeRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_PipeUpload_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_PipeUpload_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1130,9 +1072,8 @@ func (c *maliceRPCClient) PipeUpload(ctx context.Context, in *implantpb.PipeRequ } func (c *maliceRPCClient) PipeRead(ctx context.Context, in *implantpb.PipeRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_PipeRead_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_PipeRead_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1140,9 +1081,8 @@ func (c *maliceRPCClient) PipeRead(ctx context.Context, in *implantpb.PipeReques } func (c *maliceRPCClient) PipeClose(ctx context.Context, in *implantpb.PipeRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_PipeClose_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_PipeClose_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1150,9 +1090,8 @@ func (c *maliceRPCClient) PipeClose(ctx context.Context, in *implantpb.PipeReque } func (c *maliceRPCClient) Execute(ctx context.Context, in *implantpb.ExecRequest, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_Execute_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Execute_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1160,9 +1099,8 @@ func (c *maliceRPCClient) Execute(ctx context.Context, in *implantpb.ExecRequest } func (c *maliceRPCClient) ExecuteSpawn(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteSpawn_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteSpawn_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1170,9 +1108,8 @@ func (c *maliceRPCClient) ExecuteSpawn(ctx context.Context, in *implantpb.Execut } func (c *maliceRPCClient) ExecuteAssembly(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteAssembly_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteAssembly_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1180,9 +1117,8 @@ func (c *maliceRPCClient) ExecuteAssembly(ctx context.Context, in *implantpb.Exe } func (c *maliceRPCClient) ExecutePowerpick(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecutePowerpick_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecutePowerpick_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1190,9 +1126,8 @@ func (c *maliceRPCClient) ExecutePowerpick(ctx context.Context, in *implantpb.Ex } func (c *maliceRPCClient) ExecuteEXE(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteEXE_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteEXE_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1200,9 +1135,8 @@ func (c *maliceRPCClient) ExecuteEXE(ctx context.Context, in *implantpb.ExecuteB } func (c *maliceRPCClient) ExecuteDLL(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteDLL_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteDLL_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1210,9 +1144,8 @@ func (c *maliceRPCClient) ExecuteDLL(ctx context.Context, in *implantpb.ExecuteB } func (c *maliceRPCClient) ExecuteArmory(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteArmory_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteArmory_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1220,9 +1153,8 @@ func (c *maliceRPCClient) ExecuteArmory(ctx context.Context, in *implantpb.Execu } func (c *maliceRPCClient) ExecuteShellcode(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteShellcode_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteShellcode_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1230,9 +1162,8 @@ func (c *maliceRPCClient) ExecuteShellcode(ctx context.Context, in *implantpb.Ex } func (c *maliceRPCClient) ExecuteBof(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteBof_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteBof_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1240,9 +1171,8 @@ func (c *maliceRPCClient) ExecuteBof(ctx context.Context, in *implantpb.ExecuteB } func (c *maliceRPCClient) ExecuteLocal(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_ExecuteLocal_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ExecuteLocal_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1250,9 +1180,8 @@ func (c *maliceRPCClient) ExecuteLocal(ctx context.Context, in *implantpb.Execut } func (c *maliceRPCClient) InlineLocal(ctx context.Context, in *implantpb.ExecuteBinary, opts ...grpc.CallOption) (*clientpb.Task, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Task) - err := c.cc.Invoke(ctx, MaliceRPC_InlineLocal_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_InlineLocal_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1260,9 +1189,8 @@ func (c *maliceRPCClient) InlineLocal(ctx context.Context, in *implantpb.Execute } func (c *maliceRPCClient) EXE2Shellcode(ctx context.Context, in *clientpb.EXE2Shellcode, opts ...grpc.CallOption) (*clientpb.Bin, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Bin) - err := c.cc.Invoke(ctx, MaliceRPC_EXE2Shellcode_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_EXE2Shellcode_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1270,9 +1198,8 @@ func (c *maliceRPCClient) EXE2Shellcode(ctx context.Context, in *clientpb.EXE2Sh } func (c *maliceRPCClient) DLL2Shellcode(ctx context.Context, in *clientpb.DLL2Shellcode, opts ...grpc.CallOption) (*clientpb.Bin, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Bin) - err := c.cc.Invoke(ctx, MaliceRPC_DLL2Shellcode_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_DLL2Shellcode_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1280,9 +1207,8 @@ func (c *maliceRPCClient) DLL2Shellcode(ctx context.Context, in *clientpb.DLL2Sh } func (c *maliceRPCClient) ShellcodeEncode(ctx context.Context, in *clientpb.ShellcodeEncode, opts ...grpc.CallOption) (*clientpb.Bin, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Bin) - err := c.cc.Invoke(ctx, MaliceRPC_ShellcodeEncode_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ShellcodeEncode_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1290,9 +1216,8 @@ func (c *maliceRPCClient) ShellcodeEncode(ctx context.Context, in *clientpb.Shel } func (c *maliceRPCClient) ListJobs(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Pipelines, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Pipelines) - err := c.cc.Invoke(ctx, MaliceRPC_ListJobs_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ListJobs_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1300,9 +1225,8 @@ func (c *maliceRPCClient) ListJobs(ctx context.Context, in *clientpb.Empty, opts } func (c *maliceRPCClient) NewProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_NewProfile_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_NewProfile_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1310,9 +1234,8 @@ func (c *maliceRPCClient) NewProfile(ctx context.Context, in *clientpb.Profile, } func (c *maliceRPCClient) GetProfiles(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Profiles, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Profiles) - err := c.cc.Invoke(ctx, MaliceRPC_GetProfiles_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetProfiles_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1320,9 +1243,8 @@ func (c *maliceRPCClient) GetProfiles(ctx context.Context, in *clientpb.Empty, o } func (c *maliceRPCClient) DeleteProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_DeleteProfile_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_DeleteProfile_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1330,9 +1252,8 @@ func (c *maliceRPCClient) DeleteProfile(ctx context.Context, in *clientpb.Profil } func (c *maliceRPCClient) UpdateProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_UpdateProfile_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_UpdateProfile_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1340,9 +1261,8 @@ func (c *maliceRPCClient) UpdateProfile(ctx context.Context, in *clientpb.Profil } func (c *maliceRPCClient) Build(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Builder, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Builder) - err := c.cc.Invoke(ctx, MaliceRPC_Build_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_Build_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1350,9 +1270,8 @@ func (c *maliceRPCClient) Build(ctx context.Context, in *clientpb.Generate, opts } func (c *maliceRPCClient) BuildModules(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Artifact, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Artifact) - err := c.cc.Invoke(ctx, MaliceRPC_BuildModules_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_BuildModules_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1360,9 +1279,8 @@ func (c *maliceRPCClient) BuildModules(ctx context.Context, in *clientpb.Generat } func (c *maliceRPCClient) BuildLog(ctx context.Context, in *clientpb.Builder, opts ...grpc.CallOption) (*clientpb.Builder, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Builder) - err := c.cc.Invoke(ctx, MaliceRPC_BuildLog_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_BuildLog_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1370,9 +1288,8 @@ func (c *maliceRPCClient) BuildLog(ctx context.Context, in *clientpb.Builder, op } func (c *maliceRPCClient) ListBuilder(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Builders, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Builders) - err := c.cc.Invoke(ctx, MaliceRPC_ListBuilder_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_ListBuilder_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1380,9 +1297,8 @@ func (c *maliceRPCClient) ListBuilder(ctx context.Context, in *clientpb.Empty, o } func (c *maliceRPCClient) GetArtifactsByProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Builders, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Builders) - err := c.cc.Invoke(ctx, MaliceRPC_GetArtifactsByProfile_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_GetArtifactsByProfile_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1390,9 +1306,8 @@ func (c *maliceRPCClient) GetArtifactsByProfile(ctx context.Context, in *clientp } func (c *maliceRPCClient) DownloadArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Artifact) - err := c.cc.Invoke(ctx, MaliceRPC_DownloadArtifact_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_DownloadArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1400,9 +1315,8 @@ func (c *maliceRPCClient) DownloadArtifact(ctx context.Context, in *clientpb.Art } func (c *maliceRPCClient) UploadArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Builder, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Builder) - err := c.cc.Invoke(ctx, MaliceRPC_UploadArtifact_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_UploadArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1410,9 +1324,8 @@ func (c *maliceRPCClient) UploadArtifact(ctx context.Context, in *clientpb.Artif } func (c *maliceRPCClient) FindArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Artifact) - err := c.cc.Invoke(ctx, MaliceRPC_FindArtifact_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_FindArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1420,9 +1333,8 @@ func (c *maliceRPCClient) FindArtifact(ctx context.Context, in *clientpb.Artifac } func (c *maliceRPCClient) DeleteArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_DeleteArtifact_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_DeleteArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1430,9 +1342,8 @@ func (c *maliceRPCClient) DeleteArtifact(ctx context.Context, in *clientpb.Artif } func (c *maliceRPCClient) MaleficSRDI(ctx context.Context, in *clientpb.Builder, opts ...grpc.CallOption) (*clientpb.Artifact, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Artifact) - err := c.cc.Invoke(ctx, MaliceRPC_MaleficSRDI_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_MaleficSRDI_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1440,9 +1351,8 @@ func (c *maliceRPCClient) MaleficSRDI(ctx context.Context, in *clientpb.Builder, } func (c *maliceRPCClient) DockerStatus(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_DockerStatus_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_DockerStatus_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1450,9 +1360,8 @@ func (c *maliceRPCClient) DockerStatus(ctx context.Context, in *clientpb.Empty, } func (c *maliceRPCClient) TriggerWorkflowDispatch(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Builder, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Builder) - err := c.cc.Invoke(ctx, MaliceRPC_TriggerWorkflowDispatch_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_TriggerWorkflowDispatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1460,9 +1369,53 @@ func (c *maliceRPCClient) TriggerWorkflowDispatch(ctx context.Context, in *clien } func (c *maliceRPCClient) WorkflowStatus(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_WorkflowStatus_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, MaliceRPC_WorkflowStatus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) UpdateGithubConfig(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, MaliceRPC_UpdateGithubConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) GetGithubConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.GithubWorkflowRequest, error) { + out := new(clientpb.GithubWorkflowRequest) + err := c.cc.Invoke(ctx, MaliceRPC_GetGithubConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) UpdateNotifyConfig(ctx context.Context, in *clientpb.Notify, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, MaliceRPC_UpdateNotifyConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) GetNotifyConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Notify, error) { + out := new(clientpb.Notify) + err := c.cc.Invoke(ctx, MaliceRPC_GetNotifyConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) RefreshConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, MaliceRPC_RefreshConfig_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -1471,7 +1424,7 @@ func (c *maliceRPCClient) WorkflowStatus(ctx context.Context, in *clientpb.Githu // MaliceRPCServer is the server API for MaliceRPC service. // All implementations must embed UnimplementedMaliceRPCServer -// for forward compatibility. +// for forward compatibility type MaliceRPCServer interface { // basic LoginClient(context.Context, *clientpb.LoginReq) (*clientpb.Client, error) @@ -1493,7 +1446,7 @@ type MaliceRPCServer interface { GetFiles(context.Context, *clientpb.Session) (*clientpb.Files, error) GetAllDownloadFiles(context.Context, *clientpb.Empty) (*clientpb.Files, error) // event - Events(*clientpb.Empty, grpc.ServerStreamingServer[clientpb.Event]) error + Events(*clientpb.Empty, MaliceRPC_EventsServer) error Broadcast(context.Context, *clientpb.Event) (*clientpb.Empty, error) Notify(context.Context, *clientpb.Event) (*clientpb.Empty, error) GetEvent(context.Context, *clientpb.Int) (*clientpb.Events, error) @@ -1608,15 +1561,18 @@ type MaliceRPCServer interface { // action TriggerWorkflowDispatch(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Builder, error) WorkflowStatus(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) + // config + UpdateGithubConfig(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) + GetGithubConfig(context.Context, *clientpb.Empty) (*clientpb.GithubWorkflowRequest, error) + UpdateNotifyConfig(context.Context, *clientpb.Notify) (*clientpb.Empty, error) + GetNotifyConfig(context.Context, *clientpb.Empty) (*clientpb.Notify, error) + RefreshConfig(context.Context, *clientpb.Empty) (*clientpb.Empty, error) mustEmbedUnimplementedMaliceRPCServer() } -// UnimplementedMaliceRPCServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMaliceRPCServer struct{} +// UnimplementedMaliceRPCServer must be embedded to have forward compatible implementations. +type UnimplementedMaliceRPCServer struct { +} func (UnimplementedMaliceRPCServer) LoginClient(context.Context, *clientpb.LoginReq) (*clientpb.Client, error) { return nil, status.Errorf(codes.Unimplemented, "method LoginClient not implemented") @@ -1672,7 +1628,7 @@ func (UnimplementedMaliceRPCServer) GetFiles(context.Context, *clientpb.Session) func (UnimplementedMaliceRPCServer) GetAllDownloadFiles(context.Context, *clientpb.Empty) (*clientpb.Files, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAllDownloadFiles not implemented") } -func (UnimplementedMaliceRPCServer) Events(*clientpb.Empty, grpc.ServerStreamingServer[clientpb.Event]) error { +func (UnimplementedMaliceRPCServer) Events(*clientpb.Empty, MaliceRPC_EventsServer) error { return status.Errorf(codes.Unimplemented, "method Events not implemented") } func (UnimplementedMaliceRPCServer) Broadcast(context.Context, *clientpb.Event) (*clientpb.Empty, error) { @@ -1969,8 +1925,22 @@ func (UnimplementedMaliceRPCServer) TriggerWorkflowDispatch(context.Context, *cl func (UnimplementedMaliceRPCServer) WorkflowStatus(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method WorkflowStatus not implemented") } +func (UnimplementedMaliceRPCServer) UpdateGithubConfig(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGithubConfig not implemented") +} +func (UnimplementedMaliceRPCServer) GetGithubConfig(context.Context, *clientpb.Empty) (*clientpb.GithubWorkflowRequest, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGithubConfig not implemented") +} +func (UnimplementedMaliceRPCServer) UpdateNotifyConfig(context.Context, *clientpb.Notify) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNotifyConfig not implemented") +} +func (UnimplementedMaliceRPCServer) GetNotifyConfig(context.Context, *clientpb.Empty) (*clientpb.Notify, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNotifyConfig not implemented") +} +func (UnimplementedMaliceRPCServer) RefreshConfig(context.Context, *clientpb.Empty) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefreshConfig not implemented") +} func (UnimplementedMaliceRPCServer) mustEmbedUnimplementedMaliceRPCServer() {} -func (UnimplementedMaliceRPCServer) testEmbeddedByValue() {} // UnsafeMaliceRPCServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MaliceRPCServer will @@ -1980,13 +1950,6 @@ type UnsafeMaliceRPCServer interface { } func RegisterMaliceRPCServer(s grpc.ServiceRegistrar, srv MaliceRPCServer) { - // If the following call pancis, it indicates UnimplementedMaliceRPCServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&MaliceRPC_ServiceDesc, srv) } @@ -2319,11 +2282,21 @@ func _MaliceRPC_Events_Handler(srv interface{}, stream grpc.ServerStream) error if err := stream.RecvMsg(m); err != nil { return err } - return srv.(MaliceRPCServer).Events(m, &grpc.GenericServerStream[clientpb.Empty, clientpb.Event]{ServerStream: stream}) + return srv.(MaliceRPCServer).Events(m, &maliceRPCEventsServer{stream}) +} + +type MaliceRPC_EventsServer interface { + Send(*clientpb.Event) error + grpc.ServerStream +} + +type maliceRPCEventsServer struct { + grpc.ServerStream } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type MaliceRPC_EventsServer = grpc.ServerStreamingServer[clientpb.Event] +func (x *maliceRPCEventsServer) Send(m *clientpb.Event) error { + return x.ServerStream.SendMsg(m) +} func _MaliceRPC_Broadcast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.Event) @@ -4089,6 +4062,96 @@ func _MaliceRPC_WorkflowStatus_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _MaliceRPC_UpdateGithubConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.GithubWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).UpdateGithubConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_UpdateGithubConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).UpdateGithubConfig(ctx, req.(*clientpb.GithubWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_GetGithubConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).GetGithubConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_GetGithubConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).GetGithubConfig(ctx, req.(*clientpb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_UpdateNotifyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Notify) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).UpdateNotifyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_UpdateNotifyConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).UpdateNotifyConfig(ctx, req.(*clientpb.Notify)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_GetNotifyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).GetNotifyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_GetNotifyConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).GetNotifyConfig(ctx, req.(*clientpb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_RefreshConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).RefreshConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_RefreshConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).RefreshConfig(ctx, req.(*clientpb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + // MaliceRPC_ServiceDesc is the grpc.ServiceDesc for MaliceRPC service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -4560,6 +4623,26 @@ var MaliceRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "WorkflowStatus", Handler: _MaliceRPC_WorkflowStatus_Handler, }, + { + MethodName: "UpdateGithubConfig", + Handler: _MaliceRPC_UpdateGithubConfig_Handler, + }, + { + MethodName: "GetGithubConfig", + Handler: _MaliceRPC_GetGithubConfig_Handler, + }, + { + MethodName: "UpdateNotifyConfig", + Handler: _MaliceRPC_UpdateNotifyConfig_Handler, + }, + { + MethodName: "GetNotifyConfig", + Handler: _MaliceRPC_GetNotifyConfig_Handler, + }, + { + MethodName: "RefreshConfig", + Handler: _MaliceRPC_RefreshConfig_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -4602,9 +4685,8 @@ func NewRootRPCClient(cc grpc.ClientConnInterface) RootRPCClient { } func (c *rootRPCClient) AddClient(ctx context.Context, in *rootpb.Operator, opts ...grpc.CallOption) (*rootpb.Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(rootpb.Response) - err := c.cc.Invoke(ctx, RootRPC_AddClient_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, RootRPC_AddClient_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -4612,9 +4694,8 @@ func (c *rootRPCClient) AddClient(ctx context.Context, in *rootpb.Operator, opts } func (c *rootRPCClient) RemoveClient(ctx context.Context, in *rootpb.Operator, opts ...grpc.CallOption) (*rootpb.Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(rootpb.Response) - err := c.cc.Invoke(ctx, RootRPC_RemoveClient_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, RootRPC_RemoveClient_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -4622,9 +4703,8 @@ func (c *rootRPCClient) RemoveClient(ctx context.Context, in *rootpb.Operator, o } func (c *rootRPCClient) ListClients(ctx context.Context, in *rootpb.Operator, opts ...grpc.CallOption) (*clientpb.Clients, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Clients) - err := c.cc.Invoke(ctx, RootRPC_ListClients_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, RootRPC_ListClients_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -4632,9 +4712,8 @@ func (c *rootRPCClient) ListClients(ctx context.Context, in *rootpb.Operator, op } func (c *rootRPCClient) AddListener(ctx context.Context, in *rootpb.Operator, opts ...grpc.CallOption) (*rootpb.Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(rootpb.Response) - err := c.cc.Invoke(ctx, RootRPC_AddListener_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, RootRPC_AddListener_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -4642,9 +4721,8 @@ func (c *rootRPCClient) AddListener(ctx context.Context, in *rootpb.Operator, op } func (c *rootRPCClient) RemoveListener(ctx context.Context, in *rootpb.Operator, opts ...grpc.CallOption) (*rootpb.Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(rootpb.Response) - err := c.cc.Invoke(ctx, RootRPC_RemoveListener_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, RootRPC_RemoveListener_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -4652,9 +4730,8 @@ func (c *rootRPCClient) RemoveListener(ctx context.Context, in *rootpb.Operator, } func (c *rootRPCClient) ListListeners(ctx context.Context, in *rootpb.Operator, opts ...grpc.CallOption) (*clientpb.Listeners, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Listeners) - err := c.cc.Invoke(ctx, RootRPC_ListListeners_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, RootRPC_ListListeners_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -4663,7 +4740,7 @@ func (c *rootRPCClient) ListListeners(ctx context.Context, in *rootpb.Operator, // RootRPCServer is the server API for RootRPC service. // All implementations must embed UnimplementedRootRPCServer -// for forward compatibility. +// for forward compatibility type RootRPCServer interface { // manager AddClient(context.Context, *rootpb.Operator) (*rootpb.Response, error) @@ -4675,12 +4752,9 @@ type RootRPCServer interface { mustEmbedUnimplementedRootRPCServer() } -// UnimplementedRootRPCServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedRootRPCServer struct{} +// UnimplementedRootRPCServer must be embedded to have forward compatible implementations. +type UnimplementedRootRPCServer struct { +} func (UnimplementedRootRPCServer) AddClient(context.Context, *rootpb.Operator) (*rootpb.Response, error) { return nil, status.Errorf(codes.Unimplemented, "method AddClient not implemented") @@ -4701,7 +4775,6 @@ func (UnimplementedRootRPCServer) ListListeners(context.Context, *rootpb.Operato return nil, status.Errorf(codes.Unimplemented, "method ListListeners not implemented") } func (UnimplementedRootRPCServer) mustEmbedUnimplementedRootRPCServer() {} -func (UnimplementedRootRPCServer) testEmbeddedByValue() {} // UnsafeRootRPCServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RootRPCServer will @@ -4711,13 +4784,6 @@ type UnsafeRootRPCServer interface { } func RegisterRootRPCServer(s grpc.ServiceRegistrar, srv RootRPCServer) { - // If the following call pancis, it indicates UnimplementedRootRPCServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&RootRPC_ServiceDesc, srv) } diff --git a/helper/proto/services/listenerrpc/service.pb.go b/helper/proto/services/listenerrpc/service.pb.go index 0b359d7e..1b50a7e9 100644 --- a/helper/proto/services/listenerrpc/service.pb.go +++ b/helper/proto/services/listenerrpc/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v3.20.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: services/listenerrpc/service.proto package listenerrpc @@ -135,7 +135,7 @@ var file_services_listenerrpc_service_proto_rawDesc = []byte{ 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_services_listenerrpc_service_proto_goTypes = []any{ +var file_services_listenerrpc_service_proto_goTypes = []interface{}{ (*clientpb.SpiteResponse)(nil), // 0: clientpb.SpiteResponse (*clientpb.JobStatus)(nil), // 1: clientpb.JobStatus (*clientpb.RegisterSession)(nil), // 2: clientpb.RegisterSession diff --git a/helper/proto/services/listenerrpc/service_grpc.pb.go b/helper/proto/services/listenerrpc/service_grpc.pb.go index c1056edd..43a059b0 100644 --- a/helper/proto/services/listenerrpc/service_grpc.pb.go +++ b/helper/proto/services/listenerrpc/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v3.20.3 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.12 // source: services/listenerrpc/service.proto package listenerrpc @@ -17,8 +17,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( ListenerRPC_SpiteStream_FullMethodName = "/listenerrpc.ListenerRPC/SpiteStream" @@ -54,8 +54,8 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ListenerRPCClient interface { - SpiteStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[clientpb.SpiteResponse, clientpb.SpiteRequest], error) - JobStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[clientpb.JobStatus, clientpb.JobCtrl], error) + SpiteStream(ctx context.Context, opts ...grpc.CallOption) (ListenerRPC_SpiteStreamClient, error) + JobStream(ctx context.Context, opts ...grpc.CallOption) (ListenerRPC_JobStreamClient, error) // implant Register(ctx context.Context, in *clientpb.RegisterSession, opts ...grpc.CallOption) (*clientpb.Empty, error) SysInfo(ctx context.Context, in *implantpb.SysInfo, opts ...grpc.CallOption) (*clientpb.Empty, error) @@ -95,36 +95,71 @@ func NewListenerRPCClient(cc grpc.ClientConnInterface) ListenerRPCClient { return &listenerRPCClient{cc} } -func (c *listenerRPCClient) SpiteStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[clientpb.SpiteResponse, clientpb.SpiteRequest], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &ListenerRPC_ServiceDesc.Streams[0], ListenerRPC_SpiteStream_FullMethodName, cOpts...) +func (c *listenerRPCClient) SpiteStream(ctx context.Context, opts ...grpc.CallOption) (ListenerRPC_SpiteStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &ListenerRPC_ServiceDesc.Streams[0], ListenerRPC_SpiteStream_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[clientpb.SpiteResponse, clientpb.SpiteRequest]{ClientStream: stream} + x := &listenerRPCSpiteStreamClient{stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type ListenerRPC_SpiteStreamClient = grpc.BidiStreamingClient[clientpb.SpiteResponse, clientpb.SpiteRequest] +type ListenerRPC_SpiteStreamClient interface { + Send(*clientpb.SpiteResponse) error + Recv() (*clientpb.SpiteRequest, error) + grpc.ClientStream +} + +type listenerRPCSpiteStreamClient struct { + grpc.ClientStream +} + +func (x *listenerRPCSpiteStreamClient) Send(m *clientpb.SpiteResponse) error { + return x.ClientStream.SendMsg(m) +} -func (c *listenerRPCClient) JobStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[clientpb.JobStatus, clientpb.JobCtrl], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &ListenerRPC_ServiceDesc.Streams[1], ListenerRPC_JobStream_FullMethodName, cOpts...) +func (x *listenerRPCSpiteStreamClient) Recv() (*clientpb.SpiteRequest, error) { + m := new(clientpb.SpiteRequest) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *listenerRPCClient) JobStream(ctx context.Context, opts ...grpc.CallOption) (ListenerRPC_JobStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &ListenerRPC_ServiceDesc.Streams[1], ListenerRPC_JobStream_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[clientpb.JobStatus, clientpb.JobCtrl]{ClientStream: stream} + x := &listenerRPCJobStreamClient{stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type ListenerRPC_JobStreamClient = grpc.BidiStreamingClient[clientpb.JobStatus, clientpb.JobCtrl] +type ListenerRPC_JobStreamClient interface { + Send(*clientpb.JobStatus) error + Recv() (*clientpb.JobCtrl, error) + grpc.ClientStream +} + +type listenerRPCJobStreamClient struct { + grpc.ClientStream +} + +func (x *listenerRPCJobStreamClient) Send(m *clientpb.JobStatus) error { + return x.ClientStream.SendMsg(m) +} + +func (x *listenerRPCJobStreamClient) Recv() (*clientpb.JobCtrl, error) { + m := new(clientpb.JobCtrl) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *listenerRPCClient) Register(ctx context.Context, in *clientpb.RegisterSession, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_Register_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_Register_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -132,9 +167,8 @@ func (c *listenerRPCClient) Register(ctx context.Context, in *clientpb.RegisterS } func (c *listenerRPCClient) SysInfo(ctx context.Context, in *implantpb.SysInfo, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_SysInfo_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_SysInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -142,9 +176,8 @@ func (c *listenerRPCClient) SysInfo(ctx context.Context, in *implantpb.SysInfo, } func (c *listenerRPCClient) Checkin(ctx context.Context, in *implantpb.Ping, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_Checkin_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_Checkin_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -152,9 +185,8 @@ func (c *listenerRPCClient) Checkin(ctx context.Context, in *implantpb.Ping, opt } func (c *listenerRPCClient) InitBindSession(ctx context.Context, in *implantpb.Request, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_InitBindSession_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_InitBindSession_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -162,9 +194,8 @@ func (c *listenerRPCClient) InitBindSession(ctx context.Context, in *implantpb.R } func (c *listenerRPCClient) RegisterListener(ctx context.Context, in *clientpb.RegisterListener, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_RegisterListener_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_RegisterListener_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -172,9 +203,8 @@ func (c *listenerRPCClient) RegisterListener(ctx context.Context, in *clientpb.R } func (c *listenerRPCClient) RegisterPipeline(ctx context.Context, in *clientpb.Pipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_RegisterPipeline_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_RegisterPipeline_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -182,9 +212,8 @@ func (c *listenerRPCClient) RegisterPipeline(ctx context.Context, in *clientpb.P } func (c *listenerRPCClient) StartPipeline(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_StartPipeline_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_StartPipeline_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -192,9 +221,8 @@ func (c *listenerRPCClient) StartPipeline(ctx context.Context, in *clientpb.Ctrl } func (c *listenerRPCClient) StopPipeline(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_StopPipeline_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_StopPipeline_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -202,9 +230,8 @@ func (c *listenerRPCClient) StopPipeline(ctx context.Context, in *clientpb.CtrlP } func (c *listenerRPCClient) DeletePipeline(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_DeletePipeline_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_DeletePipeline_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -212,9 +239,8 @@ func (c *listenerRPCClient) DeletePipeline(ctx context.Context, in *clientpb.Ctr } func (c *listenerRPCClient) ListPipelines(ctx context.Context, in *clientpb.Listener, opts ...grpc.CallOption) (*clientpb.Pipelines, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Pipelines) - err := c.cc.Invoke(ctx, ListenerRPC_ListPipelines_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_ListPipelines_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -222,9 +248,8 @@ func (c *listenerRPCClient) ListPipelines(ctx context.Context, in *clientpb.List } func (c *listenerRPCClient) RegisterWebsite(ctx context.Context, in *clientpb.Pipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_RegisterWebsite_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_RegisterWebsite_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -232,9 +257,8 @@ func (c *listenerRPCClient) RegisterWebsite(ctx context.Context, in *clientpb.Pi } func (c *listenerRPCClient) StartWebsite(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_StartWebsite_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_StartWebsite_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -242,9 +266,8 @@ func (c *listenerRPCClient) StartWebsite(ctx context.Context, in *clientpb.CtrlP } func (c *listenerRPCClient) StopWebsite(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_StopWebsite_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_StopWebsite_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -252,9 +275,8 @@ func (c *listenerRPCClient) StopWebsite(ctx context.Context, in *clientpb.CtrlPi } func (c *listenerRPCClient) DeleteWebsite(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_DeleteWebsite_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_DeleteWebsite_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -262,9 +284,8 @@ func (c *listenerRPCClient) DeleteWebsite(ctx context.Context, in *clientpb.Ctrl } func (c *listenerRPCClient) ListWebsites(ctx context.Context, in *clientpb.Listener, opts ...grpc.CallOption) (*clientpb.Pipelines, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Pipelines) - err := c.cc.Invoke(ctx, ListenerRPC_ListWebsites_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_ListWebsites_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -272,9 +293,8 @@ func (c *listenerRPCClient) ListWebsites(ctx context.Context, in *clientpb.Liste } func (c *listenerRPCClient) ListWebContent(ctx context.Context, in *clientpb.Website, opts ...grpc.CallOption) (*clientpb.WebContents, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.WebContents) - err := c.cc.Invoke(ctx, ListenerRPC_ListWebContent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_ListWebContent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -282,9 +302,8 @@ func (c *listenerRPCClient) ListWebContent(ctx context.Context, in *clientpb.Web } func (c *listenerRPCClient) WebsiteAddContent(ctx context.Context, in *clientpb.Website, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_WebsiteAddContent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_WebsiteAddContent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -292,9 +311,8 @@ func (c *listenerRPCClient) WebsiteAddContent(ctx context.Context, in *clientpb. } func (c *listenerRPCClient) WebsiteUpdateContent(ctx context.Context, in *clientpb.WebContent, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_WebsiteUpdateContent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_WebsiteUpdateContent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -302,9 +320,8 @@ func (c *listenerRPCClient) WebsiteUpdateContent(ctx context.Context, in *client } func (c *listenerRPCClient) WebsiteRemoveContent(ctx context.Context, in *clientpb.WebContent, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_WebsiteRemoveContent_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_WebsiteRemoveContent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -312,9 +329,8 @@ func (c *listenerRPCClient) WebsiteRemoveContent(ctx context.Context, in *client } func (c *listenerRPCClient) RegisterRem(ctx context.Context, in *clientpb.Pipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_RegisterRem_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_RegisterRem_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -322,9 +338,8 @@ func (c *listenerRPCClient) RegisterRem(ctx context.Context, in *clientpb.Pipeli } func (c *listenerRPCClient) StartRem(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_StartRem_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_StartRem_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -332,9 +347,8 @@ func (c *listenerRPCClient) StartRem(ctx context.Context, in *clientpb.CtrlPipel } func (c *listenerRPCClient) StopRem(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_StopRem_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_StopRem_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -342,9 +356,8 @@ func (c *listenerRPCClient) StopRem(ctx context.Context, in *clientpb.CtrlPipeli } func (c *listenerRPCClient) DeleteRem(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, ListenerRPC_DeleteRem_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_DeleteRem_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -352,9 +365,8 @@ func (c *listenerRPCClient) DeleteRem(ctx context.Context, in *clientpb.CtrlPipe } func (c *listenerRPCClient) ListRems(ctx context.Context, in *clientpb.Listener, opts ...grpc.CallOption) (*clientpb.Pipelines, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Pipelines) - err := c.cc.Invoke(ctx, ListenerRPC_ListRems_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_ListRems_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -362,9 +374,8 @@ func (c *listenerRPCClient) ListRems(ctx context.Context, in *clientpb.Listener, } func (c *listenerRPCClient) GetArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(clientpb.Artifact) - err := c.cc.Invoke(ctx, ListenerRPC_GetArtifact_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, ListenerRPC_GetArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -373,10 +384,10 @@ func (c *listenerRPCClient) GetArtifact(ctx context.Context, in *clientpb.Artifa // ListenerRPCServer is the server API for ListenerRPC service. // All implementations must embed UnimplementedListenerRPCServer -// for forward compatibility. +// for forward compatibility type ListenerRPCServer interface { - SpiteStream(grpc.BidiStreamingServer[clientpb.SpiteResponse, clientpb.SpiteRequest]) error - JobStream(grpc.BidiStreamingServer[clientpb.JobStatus, clientpb.JobCtrl]) error + SpiteStream(ListenerRPC_SpiteStreamServer) error + JobStream(ListenerRPC_JobStreamServer) error // implant Register(context.Context, *clientpb.RegisterSession) (*clientpb.Empty, error) SysInfo(context.Context, *implantpb.SysInfo) (*clientpb.Empty, error) @@ -409,17 +420,14 @@ type ListenerRPCServer interface { mustEmbedUnimplementedListenerRPCServer() } -// UnimplementedListenerRPCServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedListenerRPCServer struct{} +// UnimplementedListenerRPCServer must be embedded to have forward compatible implementations. +type UnimplementedListenerRPCServer struct { +} -func (UnimplementedListenerRPCServer) SpiteStream(grpc.BidiStreamingServer[clientpb.SpiteResponse, clientpb.SpiteRequest]) error { +func (UnimplementedListenerRPCServer) SpiteStream(ListenerRPC_SpiteStreamServer) error { return status.Errorf(codes.Unimplemented, "method SpiteStream not implemented") } -func (UnimplementedListenerRPCServer) JobStream(grpc.BidiStreamingServer[clientpb.JobStatus, clientpb.JobCtrl]) error { +func (UnimplementedListenerRPCServer) JobStream(ListenerRPC_JobStreamServer) error { return status.Errorf(codes.Unimplemented, "method JobStream not implemented") } func (UnimplementedListenerRPCServer) Register(context.Context, *clientpb.RegisterSession) (*clientpb.Empty, error) { @@ -498,7 +506,6 @@ func (UnimplementedListenerRPCServer) GetArtifact(context.Context, *clientpb.Art return nil, status.Errorf(codes.Unimplemented, "method GetArtifact not implemented") } func (UnimplementedListenerRPCServer) mustEmbedUnimplementedListenerRPCServer() {} -func (UnimplementedListenerRPCServer) testEmbeddedByValue() {} // UnsafeListenerRPCServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ListenerRPCServer will @@ -508,29 +515,60 @@ type UnsafeListenerRPCServer interface { } func RegisterListenerRPCServer(s grpc.ServiceRegistrar, srv ListenerRPCServer) { - // If the following call pancis, it indicates UnimplementedListenerRPCServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&ListenerRPC_ServiceDesc, srv) } func _ListenerRPC_SpiteStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ListenerRPCServer).SpiteStream(&grpc.GenericServerStream[clientpb.SpiteResponse, clientpb.SpiteRequest]{ServerStream: stream}) + return srv.(ListenerRPCServer).SpiteStream(&listenerRPCSpiteStreamServer{stream}) +} + +type ListenerRPC_SpiteStreamServer interface { + Send(*clientpb.SpiteRequest) error + Recv() (*clientpb.SpiteResponse, error) + grpc.ServerStream +} + +type listenerRPCSpiteStreamServer struct { + grpc.ServerStream } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type ListenerRPC_SpiteStreamServer = grpc.BidiStreamingServer[clientpb.SpiteResponse, clientpb.SpiteRequest] +func (x *listenerRPCSpiteStreamServer) Send(m *clientpb.SpiteRequest) error { + return x.ServerStream.SendMsg(m) +} + +func (x *listenerRPCSpiteStreamServer) Recv() (*clientpb.SpiteResponse, error) { + m := new(clientpb.SpiteResponse) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _ListenerRPC_JobStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ListenerRPCServer).JobStream(&grpc.GenericServerStream[clientpb.JobStatus, clientpb.JobCtrl]{ServerStream: stream}) + return srv.(ListenerRPCServer).JobStream(&listenerRPCJobStreamServer{stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type ListenerRPC_JobStreamServer = grpc.BidiStreamingServer[clientpb.JobStatus, clientpb.JobCtrl] +type ListenerRPC_JobStreamServer interface { + Send(*clientpb.JobCtrl) error + Recv() (*clientpb.JobStatus, error) + grpc.ServerStream +} + +type listenerRPCJobStreamServer struct { + grpc.ServerStream +} + +func (x *listenerRPCJobStreamServer) Send(m *clientpb.JobCtrl) error { + return x.ServerStream.SendMsg(m) +} + +func (x *listenerRPCJobStreamServer) Recv() (*clientpb.JobStatus, error) { + m := new(clientpb.JobStatus) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _ListenerRPC_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.RegisterSession) diff --git a/server/internal/configs/config.go b/server/internal/configs/config.go index 63d4da7f..79636933 100644 --- a/server/internal/configs/config.go +++ b/server/internal/configs/config.go @@ -57,6 +57,16 @@ func GetGithubConfig() *GithubConfig { return g } +func GetNotifyConfig() *NotifyConfig { + n := &NotifyConfig{} + err := config.MapStruct("server.notify", n) + if err != nil { + logs.Log.Errorf("Failed to map notify config %s", err) + return nil + } + return n +} + func GetListenerConfig() *ListenerConfig { l := &ListenerConfig{} err := config.MapStruct("listeners", l) @@ -75,3 +85,21 @@ func GetWorkDir() string { } return dir } + +func UpdateGithubConfig(g *GithubConfig) error { + err := config.Set("server.github", g) + if err != nil { + logs.Log.Errorf("Failed to update github config %s", err) + return err + } + return nil +} + +func UpdateNotifyConfig(n *NotifyConfig) error { + err := config.Set("server.notify", n) + if err != nil { + logs.Log.Errorf("Failed to update notify config %s", err) + return err + } + return nil +} diff --git a/server/internal/configs/server.go b/server/internal/configs/server.go index 58f83715..006fe47c 100644 --- a/server/internal/configs/server.go +++ b/server/internal/configs/server.go @@ -118,25 +118,33 @@ func LoadMiscConfig() ([]byte, []byte, error) { } type NotifyConfig struct { - Enable bool `config:"enable" default:"true"` - Telegram struct { - Enable bool `config:"enable" default:"false"` - APIKey string `config:"api_key"` - ChatID int64 `config:"chat_id"` - } `config:"telegram"` - DingTalk struct { - Enable bool `config:"enable" default:"false"` - Secret string `config:"secret"` - Token string `config:"token"` - } `config:"dingtalk"` - Lark struct { - Enable bool `config:"enable" default:"false"` - WebHookUrl string `config:"webhook_url"` - } `config:"lark"` - ServerChan struct { - Enable bool `config:"enable" default:"false"` - URL string `config:"url"` - } `config:"serverchan"` + Enable bool `config:"enable" default:"true"` + Telegram *TelegramConfig `config:"telegram"` + DingTalk *DingTalkConfig `config:"dingtalk"` + Lark *LarkConfig `config:"lark"` + ServerChan *ServerChanConfig `config:"serverchan"` +} + +type TelegramConfig struct { + Enable bool `config:"enable" default:"false"` + APIKey string `config:"api_key"` + ChatID int64 `config:"chat_id"` +} + +type DingTalkConfig struct { + Enable bool `config:"enable" default:"false"` + Secret string `config:"secret"` + Token string `config:"token"` +} + +type LarkConfig struct { + Enable bool `config:"enable" default:"false"` + WebHookUrl string `config:"webhook_url"` +} + +type ServerChanConfig struct { + Enable bool `config:"enable" default:"false"` + URL string `config:"url"` } type GithubConfig struct { diff --git a/server/rpc/rpc-config.go b/server/rpc/rpc-config.go new file mode 100644 index 00000000..928d8664 --- /dev/null +++ b/server/rpc/rpc-config.go @@ -0,0 +1,109 @@ +package rpc + +import ( + "context" + "github.com/chainreactors/malice-network/helper/errs" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + crConfig "github.com/chainreactors/malice-network/helper/utils/config" + "github.com/chainreactors/malice-network/server/internal/configs" + "github.com/chainreactors/malice-network/server/internal/core" +) + +func (rpc *Server) GetGithubConfig(ctx context.Context, req *clientpb.Empty) (*clientpb.GithubWorkflowRequest, error) { + githubConfig := configs.GetGithubConfig() + if githubConfig == nil { + return nil, errs.ErrNotFoundGithubConfig + } + return &clientpb.GithubWorkflowRequest{ + Owner: githubConfig.Owner, + Repo: githubConfig.Repo, + Token: githubConfig.Token, + WorkflowId: githubConfig.Workflow, + }, nil +} + +func (rpc *Server) UpdateGithubConfig(ctx context.Context, req *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) { + err := configs.UpdateGithubConfig(&configs.GithubConfig{ + Owner: req.Owner, + Repo: req.Repo, + Token: req.Token, + Workflow: req.WorkflowId, + }) + if err != nil { + return nil, err + } + return &clientpb.Empty{}, nil +} + +func (rpc *Server) GetNotifyConfig(ctx context.Context, req *clientpb.Empty) (*clientpb.Notify, error) { + notifyConfig := configs.GetNotifyConfig() + if notifyConfig == nil { + return nil, errs.ErrNotFoundNotifyConfig + } + if notifyConfig.Telegram == nil { + notifyConfig.Telegram = &configs.TelegramConfig{} + } + if notifyConfig.DingTalk == nil { + notifyConfig.DingTalk = &configs.DingTalkConfig{} + } + if notifyConfig.Lark == nil { + notifyConfig.Lark = &configs.LarkConfig{} + } + if notifyConfig.ServerChan == nil { + notifyConfig.ServerChan = &configs.ServerChanConfig{} + } + return &clientpb.Notify{ + TelegramEnable: notifyConfig.Telegram.Enable, + TelegramApiKey: notifyConfig.Telegram.APIKey, + TelegramChatId: notifyConfig.Telegram.ChatID, + DingtalkEnable: notifyConfig.DingTalk.Enable, + DingtalkSecret: notifyConfig.DingTalk.Secret, + DingtalkToken: notifyConfig.DingTalk.Token, + LarkEnable: notifyConfig.Lark.Enable, + LarkWebhookUrl: notifyConfig.Lark.WebHookUrl, + ServerchanEnable: notifyConfig.ServerChan.Enable, + ServerchanUrl: notifyConfig.ServerChan.URL, + }, nil +} + +func (rpc *Server) UpdateNotifyConfig(ctx context.Context, req *clientpb.Notify) (*clientpb.Empty, error) { + notifyConfig := &configs.NotifyConfig{ + Enable: req.TelegramEnable || req.DingtalkEnable || req.LarkEnable || req.ServerchanEnable, + Telegram: &configs.TelegramConfig{ + Enable: req.TelegramEnable, + APIKey: req.TelegramApiKey, + ChatID: req.TelegramChatId, + }, + DingTalk: &configs.DingTalkConfig{ + Enable: req.DingtalkEnable, + Secret: req.DingtalkSecret, + Token: req.DingtalkToken, + }, + Lark: &configs.LarkConfig{ + Enable: req.LarkEnable, + WebHookUrl: req.LarkWebhookUrl, + }, + ServerChan: &configs.ServerChanConfig{ + Enable: req.ServerchanEnable, + URL: req.ServerchanUrl, + }, + } + err := configs.UpdateNotifyConfig(notifyConfig) + if err != nil { + return nil, err + } + err = core.EventBroker.InitService(notifyConfig) + if err != nil { + return nil, err + } + return &clientpb.Empty{}, nil +} + +func (rpc *Server) RefreshConfig(ctx context.Context, req *clientpb.Empty) (*clientpb.Empty, error) { + var server configs.ServerConfig + err := crConfig.LoadConfig(configs.CurrentServerConfigFilename, &server) + if err != nil { + return nil, err + } + return &clientpb.Empty{}, nil +} From fbd3e53378129c05641d2dae524378a1c570fd7e Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Wed, 8 Jan 2025 18:39:56 +0800 Subject: [PATCH 07/40] =?UTF-8?q?fix=EF=BC=9Asession=20update=20failed=20a?= =?UTF-8?q?nd=20help=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../command/build/{command.go => commands.go} | 0 client/command/common/completer.go | 1 + client/command/common/flagset.go | 55 +++++++++++++++++++ client/command/help/template.go | 7 ++- server/internal/db/helper.go | 16 ++++++ server/rpc/rpc-implant.go | 11 ++++ 6 files changed, 88 insertions(+), 2 deletions(-) rename client/command/build/{command.go => commands.go} (100%) diff --git a/client/command/build/command.go b/client/command/build/commands.go similarity index 100% rename from client/command/build/command.go rename to client/command/build/commands.go diff --git a/client/command/common/completer.go b/client/command/common/completer.go index db00b86d..5ec288de 100644 --- a/client/command/common/completer.go +++ b/client/command/common/completer.go @@ -57,6 +57,7 @@ import ( func SessionIDCompleter(con *repl.Console) carapace.Action { callback := func(c carapace.Context) carapace.Action { + con.UpdateSessions(false) results := make([]string, 0) for _, s := range con.AlivedSessions() { if s.Note != "" { diff --git a/client/command/common/flagset.go b/client/command/common/flagset.go index 4154d191..52c722a4 100644 --- a/client/command/common/flagset.go +++ b/client/command/common/flagset.go @@ -254,3 +254,58 @@ func ParseGithubFlags(cmd *cobra.Command) (string, string, string, string) { file, _ := cmd.Flags().GetString("workflowFile") return owner, repo, token, file } + +func TelegramSet(f *pflag.FlagSet) { + f.Bool("telegram-enable", false, "enable telegram") + f.String("telegram-token", "", "telegram token") + f.Int64("telegram-chat-id", 0, "telegram chat id") +} + +func DingTalkSet(f *pflag.FlagSet) { + f.Bool("dingtalk-enable", false, "enable dingtalk") + f.String("dingtalk-secret", "", "dingtalk secret") + f.String("dingtalk-token", "", "dingtalk token") +} + +func LarkSet(f *pflag.FlagSet) { + f.Bool("lark-enable", false, "enable lark") + f.String("lark-webhook-url", "", "lark webhook url") +} + +func ServerChanSet(f *pflag.FlagSet) { + f.Bool("serverchan-enable", false, "enable serverchan") + f.String("serverchan-url", "", "serverchan url") +} + +func ParseNotifyFlags(cmd *cobra.Command) *clientpb.Notify { + telegramEnable, _ := cmd.Flags().GetBool("telegram-enable") + dingTalkEnable, _ := cmd.Flags().GetBool("dingtalk-enable") + larkEnable, _ := cmd.Flags().GetBool("lark-enable") + serverChanEnable, _ := cmd.Flags().GetBool("serverchan-enable") + + telegramToken, _ := cmd.Flags().GetString("telegram-token") + telegramChatID, _ := cmd.Flags().GetInt64("telegram-chat-id") + dingTalkSecret, _ := cmd.Flags().GetString("dingtalk-secret") + dingTalkToken, _ := cmd.Flags().GetString("dingtalk-token") + larkWebhookURL, _ := cmd.Flags().GetString("lark-webhook-url") + serverChanURL, _ := cmd.Flags().GetString("serverchan-url") + + notifyConfig := &clientpb.Notify{ + TelegramEnable: telegramEnable, + TelegramApiKey: telegramToken, + TelegramChatId: telegramChatID, + + DingtalkEnable: dingTalkEnable, + DingtalkSecret: dingTalkSecret, + DingtalkToken: dingTalkToken, + + LarkEnable: larkEnable, + LarkWebhookUrl: larkWebhookURL, + + ServerchanEnable: serverChanEnable, + ServerchanUrl: serverChanURL, + } + + return notifyConfig + +} diff --git a/client/command/help/template.go b/client/command/help/template.go index bea1068e..a41007e7 100644 --- a/client/command/help/template.go +++ b/client/command/help/template.go @@ -363,6 +363,9 @@ var renderMarkdownFunc = func(title string) string { } var trimParentCommand = func(useLine string, cmd *cobra.Command) string { - parentName := cmd.Parent().Name() - return strings.TrimPrefix(useLine, parentName+" ") + if cmd.Parent() != nil { + parentName := cmd.Parent().Name() + return strings.TrimPrefix(useLine, parentName+" ") + } + return useLine } diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index fe19e6e1..0ed0b8d9 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -138,6 +138,22 @@ func UpdateSession(sessionID, note, group string) error { return result.Error } +func UpdateSessionTimer(sessionID string, interval uint64, jitter float64) error { + var session models.Session + result := Session().Where("session_id = ?", sessionID).First(&session) + if result.Error != nil { + return result.Error + } + if interval != 0 { + session.Interval = interval + } + if jitter != 0 { + session.Jitter = jitter + } + result = Session().Save(&session) + return result.Error +} + func CreateOperator(name string, typ string, remoteAddr string) error { var operator models.Operator operator.Name = name diff --git a/server/rpc/rpc-implant.go b/server/rpc/rpc-implant.go index 19702370..8a8abc68 100644 --- a/server/rpc/rpc-implant.go +++ b/server/rpc/rpc-implant.go @@ -99,6 +99,17 @@ func (rpc *Server) Sleep(ctx context.Context, req *implantpb.Timer) (*clientpb.T } go greq.HandlerResponse(ch, types.MsgEmpty) + if session, err := getSession(ctx); err == nil { + session.Jitter = req.Jitter + session.Interval = req.Interval + core.Sessions.Add(session) + err := db.UpdateSessionTimer(session.ID, req.Interval, req.Jitter) + if err != nil { + return nil, err + } + } else { + return nil, err + } return greq.Task.ToProtobuf(), nil } From b1271e7dbededdd3099337eff8018f7a7d02da4a Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Wed, 8 Jan 2025 19:04:54 +0800 Subject: [PATCH 08/40] =?UTF-8?q?fix=EF=BC=9Aupdate=20go=20mod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 3 +-- go.sum | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index a5bc2af0..c27d58e3 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.22 require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 - github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342 github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 @@ -57,7 +56,7 @@ require ( github.com/aymerick/douceur v0.2.0 // indirect github.com/blinkbean/dingtalk v1.1.3 // indirect github.com/cbroglie/mustache v1.4.0 // indirect - github.com/chainreactors/files v0.2.0 // indirect + github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 // indirect github.com/charmbracelet/bubbles v0.18.0 // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect github.com/charmbracelet/x/ansi v0.1.4 // indirect diff --git a/go.sum b/go.sum index 7fdc819b..46dcf472 100644 --- a/go.sum +++ b/go.sum @@ -51,6 +51,8 @@ github.com/cbroglie/mustache v1.4.0/go.mod h1:SS1FTIghy0sjse4DUVGV1k/40B1qE1XkD9 github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/chainreactors/files v0.0.0-20231102192550-a652458cee26/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= +github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 h1:cU3sGEODXZsUZGBXfnz0nyxF6+37vA+ZGDx6L/FKN4o= +github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0/go.mod h1:NSxGNMRWryAyrDzZpVwmujI22wbGw6c52bQOd5zEvyU= github.com/chainreactors/files v0.2.0 h1:LeN97o4VxIvK9ZACjXfdRTR+N7puXuWyQO5GarCkMLM= github.com/chainreactors/files v0.2.0/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= @@ -59,6 +61,7 @@ github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342 h1:LHqpNvL2Ry7k github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342/go.mod h1:cpmqFZvxfRalmLq0cGQs21HKiHymkEo7D5Sp1VWYHas= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= +github.com/chainreactors/utils v0.0.0-20240716182459-e85f2b01ee16/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 h1:YRQRjgb3MUOOqT0CdUDC51dsXbWpI3l6w3H4xexqKr8= github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= From d701a01334745fcb1df842cd6e23213f01a8fcf6 Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Wed, 8 Jan 2025 19:09:18 +0800 Subject: [PATCH 09/40] fix: update go.sum --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index 46dcf472..f5c174a1 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,6 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/chainreactors/files v0.0.0-20231102192550-a652458cee26/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 h1:cU3sGEODXZsUZGBXfnz0nyxF6+37vA+ZGDx6L/FKN4o= github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0/go.mod h1:NSxGNMRWryAyrDzZpVwmujI22wbGw6c52bQOd5zEvyU= -github.com/chainreactors/files v0.2.0 h1:LeN97o4VxIvK9ZACjXfdRTR+N7puXuWyQO5GarCkMLM= -github.com/chainreactors/files v0.2.0/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342 h1:LHqpNvL2Ry7kwCxz6nTF1pgVQEaS080gPWkQxN7T9nA= From 61726f3afdd116201518c5f08f18b889478aebcf Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Wed, 8 Jan 2025 19:19:57 +0800 Subject: [PATCH 10/40] =?UTF-8?q?fix=EF=BC=9Aupdate=20go=20mod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index c27d58e3..6f374c61 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.22 require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 + github.com/chainreactors/mals v0.0.0-20250108111740-7701bd16eae5 github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 diff --git a/go.sum b/go.sum index f5c174a1..46371b38 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 h1:cU3sGEODXZs github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0/go.mod h1:NSxGNMRWryAyrDzZpVwmujI22wbGw6c52bQOd5zEvyU= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= -github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342 h1:LHqpNvL2Ry7kwCxz6nTF1pgVQEaS080gPWkQxN7T9nA= -github.com/chainreactors/mals v0.0.0-20250106113216-39e0e8e7c342/go.mod h1:cpmqFZvxfRalmLq0cGQs21HKiHymkEo7D5Sp1VWYHas= +github.com/chainreactors/mals v0.0.0-20250108111740-7701bd16eae5 h1:V6ZapihNk36R+c48SYKJWhqBfVKwquqUqJcKY0chTUM= +github.com/chainreactors/mals v0.0.0-20250108111740-7701bd16eae5/go.mod h1:/dYh9T/vQ2zarhZmlGdch/ZTgXD/s/t3jOqoHYoiRLE= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/utils v0.0.0-20240716182459-e85f2b01ee16/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= From f8f510962e60e619c18ec87350c5dd6488316d3c Mon Sep 17 00:00:00 2001 From: M09Ic Date: Fri, 10 Jan 2025 13:54:55 +0800 Subject: [PATCH 11/40] improve: ps render --- client/command/sys/ps.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/command/sys/ps.go b/client/command/sys/ps.go index 20640402..6a8cda7c 100644 --- a/client/command/sys/ps.go +++ b/client/command/sys/ps.go @@ -52,7 +52,6 @@ func RegisterPsFunc(con *repl.Console) { p.Pid, p.Ppid, p.Arch, - p.Uid, p.Owner, p.Path, p.Args)) @@ -64,14 +63,13 @@ func RegisterPsFunc(con *repl.Console) { var rowEntries []table.Row var row table.Row tableModel := tui.NewTable([]table.Column{ - table.NewColumn("Name", "Name", 20), + table.NewColumn("Name", "Name", 15), table.NewColumn("PID", "PID", 5), table.NewColumn("PPID", "PPID", 5), table.NewColumn("Arch", "Arch", 7), - table.NewColumn("UID", "UID", 36), - table.NewColumn("Owner", "Owner", 7), + table.NewColumn("Owner", "Owner", 15), table.NewColumn("Path", "Path", 30), - table.NewColumn("Args", "Args", 30), + table.NewColumn("Args", "Args", 50), }, true) for _, process := range resp.GetProcesses() { row = table.NewRow( From 679e50d0023265fe50d4ee661d3089dba4a0c382 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Fri, 10 Jan 2025 13:55:36 +0800 Subject: [PATCH 12/40] fix: listener not set and db update --- server/internal/core/session.go | 8 ++++++++ server/rpc/rpc-implant.go | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/server/internal/core/session.go b/server/internal/core/session.go index 8719ef18..b8be96dc 100644 --- a/server/internal/core/session.go +++ b/server/internal/core/session.go @@ -110,6 +110,7 @@ func RecoverSession(sess *clientpb.Session) (*Session, error) { ID: sess.SessionId, RawID: sess.RawId, PipelineID: sess.PipelineId, + ListenerID: sess.ListenerId, Target: sess.Target, Initialized: sess.IsInitialized, LastCheckin: sess.LastCheckin, @@ -330,6 +331,8 @@ func (s *Session) ToModel() *models.Session { func (s *Session) Update(req *clientpb.RegisterSession) { s.Name = req.RegisterData.Name + s.PipelineID = req.PipelineId + s.ListenerID = req.ListenerId s.ProxyURL = req.RegisterData.Proxy s.Interval = req.RegisterData.Timer.Interval s.Jitter = req.RegisterData.Timer.Jitter @@ -341,6 +344,11 @@ func (s *Session) Update(req *clientpb.RegisterSession) { } s.UpdateSysInfo(req.RegisterData.Sysinfo) } + + err := db.Session().Save(s.ToModel()).Error + if err != nil { + logs.Log.Errorf("update session %s info failed in db, %s", s.ID, err.Error()) + } } func (s *Session) UpdateSysInfo(info *implantpb.SysInfo) { diff --git a/server/rpc/rpc-implant.go b/server/rpc/rpc-implant.go index 8a8abc68..9d43d8ec 100644 --- a/server/rpc/rpc-implant.go +++ b/server/rpc/rpc-implant.go @@ -35,10 +35,6 @@ func (rpc *Server) Register(ctx context.Context, req *clientpb.RegisterSession) logs.Log.Infof("session %s re-register", sess.ID) sess.Update(req) sess.Publish(consts.CtrlSessionRegister, fmt.Sprintf("session %s from %s re-register at %s", sess.Abstract(), sess.Target, sess.PipelineID), true, true) - err := db.Session().Save(sess.ToModel()).Error - if err != nil { - logs.Log.Errorf("update session %s info failed in db, %s", sess.ID, err.Error()) - } core.Sessions.Add(sess) } From 9fd303579b8b41ba6f40721e44aaf791bc4e80ef Mon Sep 17 00:00:00 2001 From: M09Ic Date: Fri, 10 Jan 2025 16:59:09 +0800 Subject: [PATCH 13/40] fix: reg add command --- client/command/reg/add.go | 72 ++++++++++++++++++++++------------ client/command/reg/commands.go | 21 +++++----- 2 files changed, 59 insertions(+), 34 deletions(-) diff --git a/client/command/reg/add.go b/client/command/reg/add.go index f6c518c3..c56cc74d 100644 --- a/client/command/reg/add.go +++ b/client/command/reg/add.go @@ -1,7 +1,11 @@ package reg import ( + "encoding/hex" "fmt" + "strconv" + "strings" + "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/core" "github.com/chainreactors/malice-network/client/repl" @@ -18,34 +22,57 @@ func RegAddCmd(cmd *cobra.Command, con *repl.Console) error { // 解析注册表的各项参数 path := cmd.Flags().Arg(0) hive, path := FormatRegPath(path) - key := cmd.Flags().Arg(1) - stringValue, _ := cmd.Flags().GetString("string_value") - byteValue, _ := cmd.Flags().GetBytesBase64("byte_value") - dwordValue, _ := cmd.Flags().GetUint32("dword_value") - qwordValue, _ := cmd.Flags().GetUint64("qword_value") - regtype, _ := cmd.Flags().GetUint32("regtype") + + // 获取参数 + valueName, _ := cmd.Flags().GetString("v") + valueType, _ := cmd.Flags().GetString("t") + data, _ := cmd.Flags().GetString("d") session := con.GetInteractive() - task, err := RegAdd(con.Rpc, session, hive, path, key, stringValue, byteValue, dwordValue, qwordValue, regtype) + task, err := RegAdd(con.Rpc, session, hive, path, valueName, valueType, data) if err != nil { return err } - session.Console(task, fmt.Sprintf("add or modify registry key: %s\\%s\\%s", hive, path, key)) + session.Console(task, fmt.Sprintf("add or modify registry key: %s\\%s\\%s", hive, path, valueName)) return nil } -func RegAdd(rpc clientrpc.MaliceRPCClient, session *core.Session, hive, path, key, stringValue string, byteValue []byte, dwordValue uint32, qwordValue uint64, regtype uint32) (*clientpb.Task, error) { +func RegAdd(rpc clientrpc.MaliceRPCClient, session *core.Session, hive, path string, valueName, valueType, data string) (*clientpb.Task, error) { request := &implantpb.RegistryWriteRequest{ - Hive: hive, - Path: fileutils.FormatWindowPath(path), - Key: key, - StringValue: stringValue, - ByteValue: byteValue, - DwordValue: dwordValue, - QwordValue: qwordValue, - Regtype: regtype, + Hive: hive, + Path: fileutils.FormatWindowPath(path), + Key: valueName, } + + // 根据类型转换数据 + switch valueType { + case "REG_SZ": + request.StringValue = data + request.Regtype = 1 + case "REG_BINARY": + // 将十六进制字符串转换为字节数组 + byteValue, _ := hex.DecodeString(strings.ReplaceAll(data, " ", "")) + request.ByteValue = byteValue + request.Regtype = 3 + case "REG_DWORD": + // 将字符串转换为 uint32 + if v, err := strconv.ParseUint(data, 0, 32); err == nil { + request.DwordValue = uint32(v) + } + request.Regtype = 4 + case "REG_QWORD": + // 将字符串转换为 uint64 + if v, err := strconv.ParseUint(data, 0, 64); err == nil { + request.QwordValue = v + } + request.Regtype = 11 + default: + // 默认使用 REG_SZ + request.StringValue = data + request.Regtype = 1 + } + return rpc.RegAdd(session.Context(), request) } @@ -61,17 +88,14 @@ func RegisterRegAddFunc(con *repl.Console) { con.AddCommandFuncHelper( consts.ModuleRegAdd, consts.ModuleRegAdd, - consts.ModuleRegAdd+"(active(),\"HKEY_LOCAL_MACHINE\",\"SOFTWARE\\Example\",\"TestKey\",\"example\",\"\",1,0,0)", + consts.ModuleRegAdd+"(active(),\"HKEY_LOCAL_MACHINE\",\"SOFTWARE\\Example\",\"TestValue\",\"REG_DWORD\",\"1\")", []string{ "session: special session", "hive: registry hive", "path: registry path", - "key: registry", - "stringValue: string value", - "byteValue: byte value", - "dwordValue: dword value", - "qwordValue: qword value", - "regtype: registry type", + "valueName: value name", + "valueType: value type (REG_SZ, REG_BINARY, REG_DWORD, REG_QWORD)", + "data: value data", }, []string{"task"}) } diff --git a/client/command/reg/commands.go b/client/command/reg/commands.go index 42ace6fc..0e049449 100644 --- a/client/command/reg/commands.go +++ b/client/command/reg/commands.go @@ -1,13 +1,14 @@ package reg import ( + "strings" + "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/utils/fileutils" "github.com/spf13/cobra" "github.com/spf13/pflag" - "strings" ) func FormatRegPath(path string) (string, string) { @@ -50,10 +51,10 @@ func Commands(con *repl.Console) []*cobra.Command { } regAddCmd := &cobra.Command{ - Use: consts.SubCommandName(consts.ModuleRegAdd) + " --hive [hive] --path [path] --key [key]", + Use: consts.SubCommandName(consts.ModuleRegAdd) + " [path] /v [value_name] /t [type] /d [data]", Short: "Add or modify a registry key", - Long: "Add or modify a registry key with specified values such as string, byte, DWORD, or QWORD.", - Args: cobra.ExactArgs(2), + Long: "Add or modify a registry key with specified values. Supported types: REG_SZ, REG_BINARY, REG_DWORD, REG_QWORD", + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { return RegAddCmd(cmd, con) }, @@ -63,15 +64,15 @@ func Commands(con *repl.Console) []*cobra.Command { }, Example: `Add or modify a registry key: ~~~ - reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example TestKey --string_value "example" --dword_value 1 + reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example /v TestValue /t REG_DWORD /d 1 + reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example /v TestString /t REG_SZ /d "Hello World" + reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example /v TestBinary /t REG_BINARY /d 01020304 ~~~`, } common.BindFlag(regAddCmd, func(f *pflag.FlagSet) { - f.String("string_value", "", "String value to write") - f.BytesBase64("byte_value", []byte{}, "Byte array value to write") - f.Uint32("dword_value", 0, "DWORD value to write") - f.Uint64("qword_value", 0, "QWORD value to write") - f.Uint32("regtype", 1, "Registry data type (e.g., 1 for REG_SZ)") + f.String("v", "", "Value name") + f.String("t", "REG_SZ", "Value type (REG_SZ, REG_BINARY, REG_DWORD, REG_QWORD)") + f.String("d", "", "Data to set") }) regDeleteCmd := &cobra.Command{ From 52d6cbf49fdc9f605c787aa52d7b4e3e02f77653 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Fri, 10 Jan 2025 17:01:26 +0800 Subject: [PATCH 14/40] chore: update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7fd15e5a..54e02d23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea/ bin/ dist/ +.malice/ go.sum *.exe *.bin From 2c788d0594649f437553df31fdd6840383a6cf07 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Fri, 10 Jan 2025 17:36:44 +0800 Subject: [PATCH 15/40] fix: reg add not work --- client/command/reg/add.go | 6 +++--- client/command/reg/commands.go | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/command/reg/add.go b/client/command/reg/add.go index c56cc74d..b5c20fd3 100644 --- a/client/command/reg/add.go +++ b/client/command/reg/add.go @@ -24,9 +24,9 @@ func RegAddCmd(cmd *cobra.Command, con *repl.Console) error { hive, path := FormatRegPath(path) // 获取参数 - valueName, _ := cmd.Flags().GetString("v") - valueType, _ := cmd.Flags().GetString("t") - data, _ := cmd.Flags().GetString("d") + valueName, _ := cmd.Flags().GetString("value") + valueType, _ := cmd.Flags().GetString("type") + data, _ := cmd.Flags().GetString("data") session := con.GetInteractive() task, err := RegAdd(con.Rpc, session, hive, path, valueName, valueType, data) diff --git a/client/command/reg/commands.go b/client/command/reg/commands.go index 0e049449..80e99ed7 100644 --- a/client/command/reg/commands.go +++ b/client/command/reg/commands.go @@ -51,7 +51,7 @@ func Commands(con *repl.Console) []*cobra.Command { } regAddCmd := &cobra.Command{ - Use: consts.SubCommandName(consts.ModuleRegAdd) + " [path] /v [value_name] /t [type] /d [data]", + Use: consts.SubCommandName(consts.ModuleRegAdd) + " [path]", Short: "Add or modify a registry key", Long: "Add or modify a registry key with specified values. Supported types: REG_SZ, REG_BINARY, REG_DWORD, REG_QWORD", Args: cobra.ExactArgs(1), @@ -64,15 +64,15 @@ func Commands(con *repl.Console) []*cobra.Command { }, Example: `Add or modify a registry key: ~~~ - reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example /v TestValue /t REG_DWORD /d 1 - reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example /v TestString /t REG_SZ /d "Hello World" - reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example /v TestBinary /t REG_BINARY /d 01020304 + reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example -v TestValue -t REG_DWORD -d 1 + reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example -v TestString -t REG_SZ -d "Hello World" + reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Example -v TestBinary -t REG_BINARY -d 01020304 ~~~`, } common.BindFlag(regAddCmd, func(f *pflag.FlagSet) { - f.String("v", "", "Value name") - f.String("t", "REG_SZ", "Value type (REG_SZ, REG_BINARY, REG_DWORD, REG_QWORD)") - f.String("d", "", "Data to set") + f.StringP("value", "v", "", "Value name") + f.StringP("type", "t", "REG_SZ", "Value type (REG_SZ, REG_BINARY, REG_DWORD, REG_QWORD)") + f.StringP("data", "d", "", "Data to set") }) regDeleteCmd := &cobra.Command{ From 33010b543683269e215d474a3fa29d22d41b594d Mon Sep 17 00:00:00 2001 From: M09Ic Date: Fri, 10 Jan 2025 19:18:06 +0800 Subject: [PATCH 16/40] fix: bof parser --- client/command/exec/execute-bof.go | 7 +- client/core/plugin/lua.go | 284 +++++++++++++++++++++++------ helper/utils/pe/bof.go | 10 +- 3 files changed, 233 insertions(+), 68 deletions(-) diff --git a/client/command/exec/execute-bof.go b/client/command/exec/execute-bof.go index e140bd6f..dbb4ed7a 100644 --- a/client/command/exec/execute-bof.go +++ b/client/command/exec/execute-bof.go @@ -46,15 +46,16 @@ func RegisterBofFunc(con *repl.Console) { } return ExecBof(rpc, sess, path, cmdline, true) }, - common.ParseBOFResponse, - func(content *clientpb.TaskContext) (string, error) { + func(content *clientpb.TaskContext) (interface{}, error) { bofResps, err := common.ParseBOFResponse(content) if err != nil { return "", err } results := bofResps.(pe.BOFResponses).Handler(content.Session) return results, nil - }) + }, + nil, + ) con.AddCommandFuncHelper( consts.ModuleExecuteBof, diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index 26db5a08..ffb1c6d3 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -2,17 +2,11 @@ package plugin import ( "fmt" - "github.com/chainreactors/logs" - "github.com/chainreactors/malice-network/client/assets" - "github.com/chainreactors/malice-network/client/core" - "github.com/chainreactors/malice-network/helper/consts" - "github.com/chainreactors/malice-network/helper/intermediate" - "github.com/chainreactors/malice-network/helper/proto/client/clientpb" - "github.com/chainreactors/malice-network/helper/types" - "github.com/chainreactors/mals" + "github.com/kballard/go-shellquote" "github.com/spf13/cobra" lua "github.com/yuin/gopher-lua" + "github.com/yuin/gopher-lua/parse" "os" "path/filepath" "reflect" @@ -20,6 +14,17 @@ import ( "strconv" "strings" "sync" + "time" + + "github.com/chainreactors/logs" + "github.com/chainreactors/malice-network/client/assets" + "github.com/chainreactors/malice-network/client/core" + "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/intermediate" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/malice-network/helper/types" + "github.com/chainreactors/malice-network/helper/utils/pe" + "github.com/chainreactors/mals" ) var ( @@ -33,10 +38,105 @@ var ( GlobalPlugins []*DefaultPlugin ) +type LuaVMWrapper struct { + *lua.LState + initialized bool + lastUsedTime time.Time + lock sync.Mutex +} + +func NewLuaVMWrapper() *LuaVMWrapper { + return &LuaVMWrapper{ + LState: NewLuaVM(), + initialized: false, + } +} + +func (w *LuaVMWrapper) Lock() { + w.lock.Lock() + w.lastUsedTime = time.Now() +} + +func (w *LuaVMWrapper) Unlock() { + w.lastUsedTime = time.Now() + w.lock.Unlock() +} + +type LuaVMPool struct { + vms []*LuaVMWrapper + maxSize int + lock sync.Mutex + proto *lua.FunctionProto + initScript string + plugName string +} + +func NewLuaVMPool(maxSize int, initScript string, plugName string) (*LuaVMPool, error) { + pool := &LuaVMPool{ + maxSize: maxSize, + vms: make([]*LuaVMWrapper, 0, maxSize), + initScript: initScript, + plugName: plugName, + } + + // 预编译脚本 + reader := strings.NewReader(initScript) + chunk, err := parse.Parse(reader, "script") + if err != nil { + return nil, fmt.Errorf("parse script error: %v", err) + } + proto, err := lua.Compile(chunk, "script") + if err != nil { + return nil, fmt.Errorf("compile script error: %v", err) + } + pool.proto = proto + + return pool, nil +} + +func (p *LuaVMPool) AcquireVM() (*LuaVMWrapper, error) { + p.lock.Lock() + defer p.lock.Unlock() + + // 首先尝试找到一个未锁定的 VM + for _, wrapper := range p.vms { + if wrapper.lock.TryLock() { + return wrapper, nil + } + } + + // 如果还有空间,创建新的 VM + if len(p.vms) < p.maxSize { + wrapper := NewLuaVMWrapper() + wrapper.Lock() + p.vms = append(p.vms, wrapper) + return wrapper, nil + } + + // 如果已满,等待一个可用的 VM + logs.Log.Warnf("VM pool is full, waiting for available VM...") + p.lock.Unlock() + + for { + p.lock.Lock() + for _, wrapper := range p.vms { + if wrapper.lock.TryLock() { + return wrapper, nil + } + } + p.lock.Unlock() + time.Sleep(100 * time.Millisecond) + } +} + +func (p *LuaVMPool) ReleaseVM(wrapper *LuaVMWrapper) { + wrapper.Unlock() +} + type LuaPlugin struct { *DefaultPlugin - vm *lua.LState - lock *sync.Mutex + vmPool *LuaVMPool + onHookVM *LuaVMWrapper } func NewLuaMalPlugin(manifest *MalManiFest) (*LuaPlugin, error) { @@ -44,23 +144,71 @@ func NewLuaMalPlugin(manifest *MalManiFest) (*LuaPlugin, error) { if err != nil { return nil, err } + mal := &LuaPlugin{ DefaultPlugin: plug, - vm: NewLuaVM(), - lock: &sync.Mutex{}, } - err = mal.RegisterLuaBuiltin() + + return mal, nil +} + +func (plug *LuaPlugin) Run() error { + var err error + plug.vmPool, err = NewLuaVMPool(10, string(plug.Content), plug.Name) + if err != nil { + return err + } + err = plug.registerLuaOnHooks() + if err != nil { + return err + } + return nil +} + +func (plug *LuaPlugin) Acquire() (*LuaVMWrapper, error) { + wrapper, err := plug.vmPool.AcquireVM() if err != nil { return nil, err } - return mal, nil + if !wrapper.initialized { + // 初始化 VM + if err := plug.initVM(wrapper.LState); err != nil { + plug.vmPool.ReleaseVM(wrapper) + return nil, err + } + wrapper.initialized = true + } + + return wrapper, nil } -func (plug *LuaPlugin) Run() error { - if err := plug.vm.DoString(string(plug.Content)); err != nil { - return fmt.Errorf("failed to load Lua script: %w", err) +func (plug *LuaPlugin) Release(wrapper *LuaVMWrapper) { + plug.vmPool.ReleaseVM(wrapper) +} + +func (plug *LuaPlugin) initVM(vm *lua.LState) error { + err := plug.RegisterLuaBuiltin(vm) + if err != nil { + return err + } + // 执行预编译的脚本 + lfunc := vm.NewFunctionFromProto(plug.vmPool.proto) + vm.Push(lfunc) + if err = vm.PCall(0, lua.MultRet, nil); err != nil { + return fmt.Errorf("execute compiled script error: %v", err) } + + return nil +} + +func (plug *LuaPlugin) registerLuaOnHooks() error { + var err error + plug.onHookVM, err = plug.Acquire() + if err != nil { + return err + } + // 注册所有的钩子 plug.registerLuaOnHook("beacon_checkin", intermediate.EventCondition{Type: consts.EventSession, Op: consts.CtrlSessionCheckin}) plug.registerLuaOnHook("beacon_initial", intermediate.EventCondition{Type: consts.EventSession, Op: consts.CtrlSessionRegister}) plug.registerLuaOnHook("beacon_error", intermediate.EventCondition{Type: consts.EventSession, Op: consts.CtrlSessionError}) @@ -99,12 +247,10 @@ func (plug *LuaPlugin) Run() error { plug.registerLuaOnHook("heartbeat_20m", intermediate.EventCondition{Type: consts.EventSession, Op: consts.CtrlHeartbeat20m}) plug.registerLuaOnHook("heartbeat_30m", intermediate.EventCondition{Type: consts.EventSession, Op: consts.CtrlHeartbeat30m}) plug.registerLuaOnHook("heartbeat_60m", intermediate.EventCondition{Type: consts.EventSession, Op: consts.CtrlHeartbeat60m}) - return nil } -func (plug *LuaPlugin) RegisterLuaBuiltin() error { - vm := plug.vm +func (plug *LuaPlugin) RegisterLuaBuiltin(vm *lua.LState) error { plugDir := filepath.Join(assets.GetMalsDir(), plug.Name) vm.SetGlobal("plugin_dir", lua.LString(plugDir)) vm.SetGlobal("plugin_resource_dir", lua.LString(filepath.Join(plugDir, "resources"))) @@ -114,25 +260,26 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { packageMod := vm.GetGlobal("package").(*lua.LTable) luaPath := lua.LuaPathDefault + ";" + plugDir + "\\?.lua" vm.SetField(packageMod, "path", lua.LString(luaPath)) + // 读取resource文件 - plug.registerLuaFunction("script_resource", func(filename string) (string, error) { + plug.registerLuaFunction(vm, "script_resource", func(filename string) (string, error) { return intermediate.GetResourceFile(plug.Name, filename) }) - plug.registerLuaFunction("global_resource", func(filename string) (string, error) { + plug.registerLuaFunction(vm, "global_resource", func(filename string) (string, error) { return intermediate.GetGlobalResourceFile(filename) }) - plug.registerLuaFunction("find_resource", func(sess *core.Session, base string, ext string) (string, error) { + plug.registerLuaFunction(vm, "find_resource", func(sess *core.Session, base string, ext string) (string, error) { return intermediate.GetResourceFile(plug.Name, fmt.Sprintf("%s.%s.%s", base, consts.FormatArch(sess.Os.Arch), ext)) }) - plug.registerLuaFunction("find_global_resource", func(sess *core.Session, base string, ext string) (string, error) { + plug.registerLuaFunction(vm, "find_global_resource", func(sess *core.Session, base string, ext string) (string, error) { return intermediate.GetGlobalResourceFile(fmt.Sprintf("%s.%s.%s", base, consts.FormatArch(sess.Os.Arch), ext)) }) // 读取资源文件内容 - plug.registerLuaFunction("read_resource", func(filename string) (string, error) { + plug.registerLuaFunction(vm, "read_resource", func(filename string) (string, error) { resourcePath, _ := intermediate.GetResourceFile(plug.Name, filename) content, err := os.ReadFile(resourcePath) if err != nil { @@ -141,7 +288,7 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { return string(content), nil }) - plug.registerLuaFunction("read_global_resource", func(filename string) (string, error) { + plug.registerLuaFunction(vm, "read_global_resource", func(filename string) (string, error) { resourcePath, _ := intermediate.GetGlobalResourceFile(filename) content, err := os.ReadFile(resourcePath) if err != nil { @@ -150,19 +297,19 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { return string(content), nil }) - plug.registerLuaFunction("help", func(name string, long string) (bool, error) { + plug.registerLuaFunction(vm, "help", func(name string, long string) (bool, error) { cmd := plug.CMDs.Find(name) cmd.Long = long return true, nil }) - plug.registerLuaFunction("example", func(name string, example string) (bool, error) { + plug.registerLuaFunction(vm, "example", func(name string, example string) (bool, error) { cmd := plug.CMDs.Find(name) cmd.Example = example return true, nil }) - plug.registerLuaFunction("opsec", func(name string, opsec int) (bool, error) { + plug.registerLuaFunction(vm, "opsec", func(name string, opsec int) (bool, error) { cmd := plug.CMDs.Find(name) if cmd.CMD == nil { return false, fmt.Errorf("command %s not found", name) @@ -177,7 +324,7 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { return true, nil }) - plug.registerLuaFunction("command", func(name string, fn *lua.LFunction, short string, ttp string) (bool, error) { + plug.registerLuaFunction(vm, "command", func(name string, fn *lua.LFunction, short string, ttp string) (bool, error) { cmd := plug.CMDs.Find(name) var paramNames []string @@ -197,29 +344,34 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { }, Run: func(cmd *cobra.Command, args []string) { go func() { - plug.lock.Lock() - vm.Push(fn) // 将函数推入栈 + wrapper, err := plug.Acquire() + if err != nil { + logs.Log.Errorf("Failed to acquire VM: %v", err) + return + } + defer plug.Release(wrapper) + wrapper.Push(fn) for _, paramName := range paramNames { switch paramName { case "cmdline": - vm.Push(lua.LString(shellquote.Join(args...))) + wrapper.Push(lua.LString(shellquote.Join(args...))) case "args": - vm.Push(mals.ConvertGoValueToLua(vm, args)) + wrapper.Push(mals.ConvertGoValueToLua(wrapper.LState, args)) default: val, err := cmd.Flags().GetString(paramName) if err != nil { logs.Log.Errorf("error getting flag %s: %s", paramName, err.Error()) return } - vm.Push(lua.LString(val)) + wrapper.Push(lua.LString(val)) } } var outFunc intermediate.BuiltinCallback if outFile, _ := cmd.Flags().GetString("file"); outFile == "" { outFunc = func(content interface{}) (bool, error) { - logs.Log.Consolef("%v", content) + logs.Log.Consolef("%v\n", content) return true, nil } } else { @@ -235,25 +387,23 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { return true, nil } } - go func() { - defer plug.lock.Unlock() - if err := vm.PCall(len(paramNames), lua.MultRet, nil); err != nil { - logs.Log.Errorf("error calling Lua %s:\n%s", fn.String(), err.Error()) - return - } - resultCount := vm.GetTop() - for i := 1; i <= resultCount; i++ { - // 从栈顶依次弹出返回值 - result := vm.Get(-resultCount + i - 1) - _, err := outFunc(mals.ConvertLuaValueToGo(result)) - if err != nil { - logs.Log.Errorf("error calling outFunc:\n%s", err.Error()) - return - } + if err := wrapper.PCall(len(paramNames), lua.MultRet, nil); err != nil { + logs.Log.Errorf("error calling Lua %s:\n%s", fn.String(), err.Error()) + return + } + + resultCount := wrapper.GetTop() + for i := 1; i <= resultCount; i++ { + // 从栈顶依次弹出返回值 + result := wrapper.Get(-resultCount + i - 1) + _, err := outFunc(mals.ConvertLuaValueToGo(result)) + if err != nil { + logs.Log.Errorf("error calling outFunc:\n%s", err.Error()) + return } - vm.Pop(resultCount) - }() + } + wrapper.Pop(resultCount) }() }, } @@ -275,13 +425,14 @@ func (plug *LuaPlugin) RegisterLuaBuiltin() error { } func (plug *LuaPlugin) registerLuaOnHook(name string, condition intermediate.EventCondition) { - vm := plug.vm + vm := plug.onHookVM + if fn := vm.GetGlobal("on_" + name); fn != lua.LNil { plug.Events[condition] = func(event *clientpb.Event) (bool, error) { - plug.lock.Lock() - defer plug.lock.Unlock() + + fn := vm.GetGlobal("on_" + name) vm.Push(fn) - vm.Push(mals.ConvertGoValueToLua(vm, event)) + vm.Push(mals.ConvertGoValueToLua(vm.LState, event)) if err := vm.PCall(1, lua.MultRet, nil); err != nil { return false, fmt.Errorf("error calling Lua function %s: %w", name, err) @@ -293,8 +444,7 @@ func (plug *LuaPlugin) registerLuaOnHook(name string, condition intermediate.Eve } } -func (plug *LuaPlugin) registerLuaFunction(name string, fn interface{}) { - vm := plug.vm +func (plug *LuaPlugin) registerLuaFunction(vm *lua.LState, name string, fn interface{}) { wrappedFunc := mals.WrapInternalFunc(fn) wrappedFunc.Package = intermediate.BuiltinPackage wrappedFunc.Name = name @@ -313,8 +463,24 @@ func NewLuaVM() *lua.LState { vm.PreloadModule(global.Name, mals.GlobalLoader(global.Name, global.Content)) } + // 注册所有内置函数 for name, fun := range intermediate.InternalFunctions.Package(intermediate.BuiltinPackage) { vm.SetGlobal(name, vm.NewFunction(mals.WrapFuncForLua(fun))) } return vm } + +func FormatLua(value lua.LValue) interface{} { + switch v := value.(type) { + case *lua.LUserData: + switch v.Value.(type) { + case *pe.BOFResponses: + //resp.Handler() + return nil + default: + return mals.ConvertLuaValueToGo(value) + } + default: + return mals.ConvertLuaValueToGo(value) + } +} diff --git a/helper/utils/pe/bof.go b/helper/utils/pe/bof.go index a535b340..cf0386b8 100644 --- a/helper/utils/pe/bof.go +++ b/helper/utils/pe/bof.go @@ -222,12 +222,10 @@ type BOFResponse struct { type BOFResponses []*BOFResponse func (bofResps BOFResponses) Handler(sess *clientpb.Session) string { - var file *os.File - var fileMap map[string]*os.File var err error var results strings.Builder - fileMap = make(map[string]*os.File) + fileMap := make(map[string]*os.File) for _, bofResp := range bofResps { var result string @@ -262,7 +260,7 @@ func (bofResps BOFResponses) Handler(sess *clientpb.Session) string { result = func() string { fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) fileName := string(bofResp.Data[8:]) - file, err = os.OpenFile(fileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + file, err := os.OpenFile(fileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) if err != nil { return fmt.Sprintf("Could not open file '%s' (ID: %s): %s", filepath.Base(file.Name()), fileId, err) } @@ -272,7 +270,7 @@ func (bofResps BOFResponses) Handler(sess *clientpb.Session) string { case CALLBACK_FILE_WRITE: result = func() string { fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) - file = fileMap[fileId] + file := fileMap[fileId] if file == nil { return fmt.Sprintf("No open file to write to (ID: %s)", fileId) } @@ -285,7 +283,7 @@ func (bofResps BOFResponses) Handler(sess *clientpb.Session) string { case CALLBACK_FILE_CLOSE: result = func() string { fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) - file = fileMap[fileId] + file := fileMap[fileId] if file == nil { return fmt.Sprintf("No open file to close (ID: %s)", fileId) } From 7b59033129f5c90e83246bad9b925f440d49f828 Mon Sep 17 00:00:00 2001 From: h3zh1 Date: Fri, 10 Jan 2025 19:58:51 +0800 Subject: [PATCH 17/40] fix: Profile.Pipeline --- client/command/pipe/upload.go | 24 ++++++++++++++++++++++++ server/internal/db/helper.go | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/client/command/pipe/upload.go b/client/command/pipe/upload.go index d72550f1..cb684d80 100644 --- a/client/command/pipe/upload.go +++ b/client/command/pipe/upload.go @@ -48,6 +48,20 @@ func PipeUpload(rpc clientrpc.MaliceRPCClient, session *core.Session, pipe strin return task, err } +func PipeUploadRaw(rpc clientrpc.MaliceRPCClient, session *core.Session, pipe, data string) (*clientpb.Task, error) { + task, err := rpc.PipeUpload(session.Context(), &implantpb.PipeRequest{ + Type: consts.ModulePipeUpload, + Pipe: &implantpb.Pipe{ + Name: fileutils.FormatWindowPath(pipe), + Data: []byte(data), + }, + }) + if err != nil { + return nil, err + } + return task, err +} + // 注册 PipeUpload 命令 func RegisterPipeUploadFunc(con *repl.Console) { con.RegisterImplantFunc( @@ -67,4 +81,14 @@ func RegisterPipeUploadFunc(con *repl.Console) { "path: file path to upload", }, []string{"task"}) + + con.RegisterImplantFunc( + "pipe_upload_raw", + PipeUploadRaw, + "", + nil, + common.ParseStatus, + nil, + ) + } diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index 0ed0b8d9..ed8ba02e 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -839,7 +839,7 @@ func FindArtifact(target *clientpb.Artifact) (*clientpb.Artifact, error) { } else { var builders []*models.Builder result = Session().Where("os = ? AND arch = ? AND type = ?", target.Platform, target.Arch, target.Type). - Preload("Profile.BasicPipeline"). + Preload("Profile.Pipeline"). Preload("Profile.PulsePipeline"). Find(&builders) for _, v := range builders { From 419072b6e17ac3be52f2554e00270e90c7a6abad Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Fri, 10 Jan 2025 20:15:19 +0800 Subject: [PATCH 18/40] refactor: add auto build pipeline artifact --- client/command/build/artifact.go | 3 + client/command/common/flagset.go | 29 +- client/command/listener/bind.go | 3 +- client/command/listener/commands.go | 3 +- client/command/listener/job.go | 17 +- client/command/listener/tcp.go | 22 +- client/command/listener/website.go | 2 +- client/command/service/list.go | 24 - helper/errs/grpc.go | 1 + helper/proto/client/clientpb/client.pb.go | 398 +++++++------- helper/proto/services/clientrpc/service.pb.go | 488 ++++++++---------- .../services/clientrpc/service_grpc.pb.go | 456 +++++----------- .../proto/services/listenerrpc/service.pb.go | 154 +++--- .../services/listenerrpc/service_grpc.pb.go | 280 +++++++++- server/config.yaml | 3 + server/internal/configs/config.go | 1 + server/internal/configs/listener.go | 12 +- server/internal/db/helper.go | 2 +- server/listener/listener.go | 96 +++- server/listener/tcp.go | 27 +- server/rpc/rpc-action.go | 2 + server/rpc/rpc-listener.go | 2 +- server/rpc/rpc-pipeline.go | 2 + 23 files changed, 1103 insertions(+), 924 deletions(-) diff --git a/client/command/build/artifact.go b/client/command/build/artifact.go index 56c572bd..b73c2eb4 100644 --- a/client/command/build/artifact.go +++ b/client/command/build/artifact.go @@ -152,6 +152,9 @@ func DownloadArtifact(con *repl.Console, name string, srdi bool) (*clientpb.Arti Name: name, IsSrdi: srdi, }) + if err != nil { + return artifact, err + } if len(artifact.Bin) == 0 { return artifact, errors.New("artifact maybe not download in server") } diff --git a/client/command/common/flagset.go b/client/command/common/flagset.go index 52c722a4..908aac77 100644 --- a/client/command/common/flagset.go +++ b/client/command/common/flagset.go @@ -1,6 +1,7 @@ package common import ( + "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/cryptography" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" @@ -111,14 +112,26 @@ func PipelineFlagSet(f *pflag.FlagSet) { f.StringP("listener", "l", "", "listener id") f.String("host", "0.0.0.0", "pipeline host, the default value is **0.0.0.0**") f.UintP("port", "p", 0, "pipeline port, random port is selected from the range **10000-15000**") + f.String("parser", "malefic", "pipeline parser") } -func ParsePipelineFlags(cmd *cobra.Command) (string, string, uint32) { +func ArtifactFlagSet(f *pflag.FlagSet) { + f.String("target", "", "build target") + f.String("beacon-pipeline", "", "beacon pipeline id") +} + +func ParseArtifactFlags(cmd *cobra.Command) (string, string) { + target, _ := cmd.Flags().GetString("target") + beaconPipeline, _ := cmd.Flags().GetString("beacon-pipeline") + return target, beaconPipeline +} + +func ParsePipelineFlags(cmd *cobra.Command) (string, string, uint32, string) { listenerID, _ := cmd.Flags().GetString("listener") host, _ := cmd.Flags().GetString("host") portUint, _ := cmd.Flags().GetUint32("port") - - return listenerID, host, portUint + parser, _ := cmd.Flags().GetString("parser") + return listenerID, host, portUint, parser } func ParseTLSFlags(cmd *cobra.Command) (*clientpb.TLS, error) { @@ -147,6 +160,16 @@ func ParseEncryptionFlags(cmd *cobra.Command) *clientpb.Encryption { encryptionType, _ := cmd.Flags().GetString("encryption-type") encryptionKey, _ := cmd.Flags().GetString("encryption-key") enable, _ := cmd.Flags().GetBool("encryption-enable") + parser, _ := cmd.Flags().GetString("parser") + if !enable { + if parser == "malefic" { + encryptionKey = "maliceofinternal" + encryptionType = consts.CryptorAES + } else { + encryptionKey = "maliceofinternal" + encryptionType = consts.CryptorXOR + } + } return &clientpb.Encryption{ Enable: enable, Type: encryptionType, diff --git a/client/command/listener/bind.go b/client/command/listener/bind.go index 0dfeebc6..5d00ba4d 100644 --- a/client/command/listener/bind.go +++ b/client/command/listener/bind.go @@ -10,7 +10,7 @@ import ( ) func NewBindPipelineCmd(cmd *cobra.Command, con *repl.Console) error { - listenerID, _, _ := common.ParsePipelineFlags(cmd) + listenerID, _, _, parser := common.ParsePipelineFlags(cmd) if listenerID == "" { return fmt.Errorf("listener id is required") } @@ -29,6 +29,7 @@ func NewBindPipelineCmd(cmd *cobra.Command, con *repl.Console) error { Name: name, ListenerId: listenerID, Enable: false, + Parser: parser, Body: &clientpb.Pipeline_Bind{ Bind: &clientpb.BindPipeline{}, }, diff --git a/client/command/listener/commands.go b/client/command/listener/commands.go index ba7e1cb1..e980d8e1 100644 --- a/client/command/listener/commands.go +++ b/client/command/listener/commands.go @@ -54,7 +54,7 @@ tcp --name tcp_test --listener tcp_default --host 192.168.0.43 --port 5003 tcp --listener tcp_default --tls --cert_path /path/to/cert --key_path /path/to/key ~~~`, } - common.BindFlag(tcpCmd, common.TlsCertFlagSet, common.PipelineFlagSet, common.EncryptionFlagSet) + common.BindFlag(tcpCmd, common.TlsCertFlagSet, common.PipelineFlagSet, common.EncryptionFlagSet, common.ArtifactFlagSet) common.BindFlagCompletions(tcpCmd, func(comp carapace.ActionMap) { comp["listener"] = common.ListenerIDCompleter(con) @@ -63,6 +63,7 @@ tcp --listener tcp_default --tls --cert_path /path/to/cert --key_path /path/to/k comp["cert_path"] = carapace.ActionFiles().Usage("path to the cert file") comp["key_path"] = carapace.ActionFiles().Usage("path to the key file") comp["tls"] = carapace.ActionValues().Usage("enable tls") + comp["target"] = common.BuildTargetCompleter(con) }) tcpCmd.MarkFlagRequired("listener") diff --git a/client/command/listener/job.go b/client/command/listener/job.go index fe419e18..81616446 100644 --- a/client/command/listener/job.go +++ b/client/command/listener/job.go @@ -24,7 +24,7 @@ func ListJobsCmd(cmd *cobra.Command, con *repl.Console) error { tableModel := tui.NewTable([]table.Column{ table.NewColumn("Name", "Name", 20), table.NewColumn("Listener_id", "Listener_id", 15), - table.NewColumn("Host", "Host", 10), + table.NewColumn("IP", "IP", 10), table.NewColumn("Port", "Port", 7), table.NewColumn("Type", "Type", 7), }, true) @@ -36,17 +36,28 @@ func ListJobsCmd(cmd *cobra.Command, con *repl.Console) error { table.RowData{ "Name": pipeline.Name, "Listener_id": pipeline.ListenerId, - "Host": tcp.Host, + "IP": pipeline.Ip, "Port": strconv.Itoa(int(tcp.Port)), "Type": "TCP", }) + case *clientpb.Pipeline_Bind: + //bind := pipeline.GetBind() + row = table.NewRow( + table.RowData{ + "Name": pipeline.Name, + "Listener_id": pipeline.ListenerId, + "IP": "", + "Port": "", + "Type": "Bind", + }) + case *clientpb.Pipeline_Web: website := pipeline.GetWeb() row = table.NewRow( table.RowData{ "Name": pipeline.Name, "Listener_id": pipeline.ListenerId, - "Host": "", + "IP": pipeline.Ip, "Port": strconv.Itoa(int(website.Port)), "Type": "Web", }) diff --git a/client/command/listener/tcp.go b/client/command/listener/tcp.go index dc4a4cc9..54551fbf 100644 --- a/client/command/listener/tcp.go +++ b/client/command/listener/tcp.go @@ -10,7 +10,8 @@ import ( ) func NewTcpPipelineCmd(cmd *cobra.Command, con *repl.Console) error { - listenerID, host, port := common.ParsePipelineFlags(cmd) + listenerID, host, port, parser := common.ParsePipelineFlags(cmd) + target, beaconPipeline := common.ParseArtifactFlags(cmd) name := cmd.Flags().Arg(0) if port == 0 { port = cryptography.RandomInRange(10240, 65535) @@ -24,11 +25,14 @@ func NewTcpPipelineCmd(cmd *cobra.Command, con *repl.Console) error { } encryption := common.ParseEncryptionFlags(cmd) _, err = con.Rpc.RegisterPipeline(con.Context(), &clientpb.Pipeline{ - Encryption: encryption, - Tls: tls, - Name: name, - ListenerId: listenerID, - Enable: false, + Encryption: encryption, + Tls: tls, + Name: name, + ListenerId: listenerID, + Target: target, + Parser: parser, + BeaconPipeline: beaconPipeline, + Enable: false, Body: &clientpb.Pipeline_Tcp{ Tcp: &clientpb.TCPPipeline{ Host: host, @@ -42,8 +46,10 @@ func NewTcpPipelineCmd(cmd *cobra.Command, con *repl.Console) error { con.Log.Importantf("TCP Pipeline %s regsiter\n", name) _, err = con.Rpc.StartPipeline(con.Context(), &clientpb.CtrlPipeline{ - Name: name, - ListenerId: listenerID, + Name: name, + ListenerId: listenerID, + Target: target, + BeaconPipeline: beaconPipeline, }) if err != nil { return err diff --git a/client/command/listener/website.go b/client/command/listener/website.go index a9db572a..7e29ee6c 100644 --- a/client/command/listener/website.go +++ b/client/command/listener/website.go @@ -17,7 +17,7 @@ import ( // NewWebsiteCmd - 创建新的网站 func NewWebsiteCmd(cmd *cobra.Command, con *repl.Console) error { - listenerID, _, port := common.ParsePipelineFlags(cmd) + listenerID, _, port, _ := common.ParsePipelineFlags(cmd) name := cmd.Flags().Arg(0) root, _ := cmd.Flags().GetString("root") diff --git a/client/command/service/list.go b/client/command/service/list.go index d0c4b5ff..df633448 100644 --- a/client/command/service/list.go +++ b/client/command/service/list.go @@ -59,17 +59,6 @@ func RegisterServiceListFunc(con *repl.Console) { table.NewColumn("Exit Code", "Exit Code", 10), table.NewColumn("Checkpoint", "Checkpoint", 12), table.NewColumn("Wait Hint", "Wait Hint", 12), - //{Title: "Name", Width: 20}, - //{Title: "Display Name", Width: 25}, - //{Title: "Executable Path", Width: 60}, - //{Title: "Start Type", Width: 10}, - //{Title: "Error Control", Width: 10}, - //{Title: "Account Name", Width: 20}, - //{Title: "Current State", Width: 10}, - //{Title: "Process ID", Width: 10}, - //{Title: "Exit Code", Width: 10}, - //{Title: "Checkpoint", Width: 12}, - //{Title: "Wait Hint", Width: 12}, }, true) var rowEntries []table.Row @@ -88,19 +77,6 @@ func RegisterServiceListFunc(con *repl.Console) { "Checkpoint": strconv.Itoa(int(service.Status.Checkpoint)), "Wait Hint": strconv.Itoa(int(service.Status.WaitHint)), }) - // table.Row{ - // service.Config.Name, - // service.Config.DisplayName, - // service.Config.ExecutablePath, - // strconv.Itoa(int(service.Config.StartType)), - // strconv.Itoa(int(service.Config.ErrorControl)), - // service.Config.AccountName, - // strconv.Itoa(int(service.Status.CurrentState)), - // strconv.Itoa(int(service.Status.ProcessId)), - // strconv.Itoa(int(service.Status.ExitCode)), - // strconv.Itoa(int(service.Status.Checkpoint)), - // strconv.Itoa(int(service.Status.WaitHint)), - //} rowEntries = append(rowEntries, row) } tableModel.SetMultiline() diff --git a/helper/errs/grpc.go b/helper/errs/grpc.go index 13a87507..091fd264 100644 --- a/helper/errs/grpc.go +++ b/helper/errs/grpc.go @@ -36,6 +36,7 @@ var ( ErrWorkflowFailed = status.Error(codes.Unknown, "workflow failed") ErrorWorkflowNotActive = status.Error(codes.Unknown, "workflow not active") ErrorDockerNotActive = status.Error(codes.Unknown, "docker not active") + ErrNotFoundArtifact = status.Error(codes.NotFound, "Artifact not found") //ErrInvalidBeaconTaskCancelState = status.Error(codes.InvalidArgument, fmt.Sprintf("Invalid task state, must be '%s' to cancel", models.PENDING)) ErrNotFoundGithubConfig = status.Error(codes.NotFound, "Github config not found") diff --git a/helper/proto/client/clientpb/client.pb.go b/helper/proto/client/clientpb/client.pb.go index 3ec3caaf..b7fb7cdf 100644 --- a/helper/proto/client/clientpb/client.pb.go +++ b/helper/proto/client/clientpb/client.pb.go @@ -3861,11 +3861,13 @@ type Pipeline struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - ListenerId string `protobuf:"bytes,3,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` - Parser string `protobuf:"bytes,4,opt,name=parser,proto3" json:"parser,omitempty"` - Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` + Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + ListenerId string `protobuf:"bytes,3,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` + Parser string `protobuf:"bytes,4,opt,name=parser,proto3" json:"parser,omitempty"` + Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` + Target string `protobuf:"bytes,6,opt,name=target,proto3" json:"target,omitempty"` + BeaconPipeline string `protobuf:"bytes,7,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` // Types that are assignable to Body: // *Pipeline_Tcp // *Pipeline_Bind @@ -3943,6 +3945,20 @@ func (x *Pipeline) GetIp() string { return "" } +func (x *Pipeline) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *Pipeline) GetBeaconPipeline() string { + if x != nil { + return x.BeaconPipeline + } + return "" +} + func (m *Pipeline) GetBody() isPipeline_Body { if m != nil { return m.Body @@ -4025,8 +4041,10 @@ type CtrlPipeline struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ListenerId string `protobuf:"bytes,1,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + ListenerId string `protobuf:"bytes,1,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + BeaconPipeline string `protobuf:"bytes,4,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` } func (x *CtrlPipeline) Reset() { @@ -4075,6 +4093,20 @@ func (x *CtrlPipeline) GetName() string { return "" } +func (x *CtrlPipeline) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *CtrlPipeline) GetBeaconPipeline() string { + if x != nil { + return x.BeaconPipeline + } + return "" +} + type TLS struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5651,7 +5683,7 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x30, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x22, 0x81, 0x03, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, + 0x73, 0x22, 0xc2, 0x03, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, @@ -5659,182 +5691,190 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x70, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x43, 0x50, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, 0x2c, - 0x0a, 0x04, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x04, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x25, 0x0a, 0x03, - 0x77, 0x65, 0x62, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, 0x03, - 0x77, 0x65, 0x62, 0x12, 0x21, 0x0a, 0x03, 0x72, 0x65, 0x6d, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x45, 0x4d, 0x48, - 0x00, 0x52, 0x03, 0x72, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x46, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, - 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x50, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x43, 0x0a, 0x0c, 0x43, 0x74, 0x72, 0x6c, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x03, 0x54, 0x4c, - 0x53, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, - 0x4a, 0x0a, 0x0a, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x43, 0x0a, 0x0c, 0x42, - 0x69, 0x6e, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x68, 0x0a, 0x03, 0x52, 0x45, 0x4d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x43, 0x50, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, + 0x2c, 0x0a, 0x04, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x04, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x25, 0x0a, + 0x03, 0x77, 0x65, 0x62, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, + 0x03, 0x77, 0x65, 0x62, 0x12, 0x21, 0x0a, 0x03, 0x72, 0x65, 0x6d, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x45, 0x4d, + 0x48, 0x00, 0x52, 0x03, 0x72, 0x65, 0x6d, 0x12, 0x1f, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x46, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, + 0x54, 0x4c, 0x53, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x50, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x43, 0x74, 0x72, 0x6c, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x43, 0x0a, + 0x03, 0x54, 0x4c, 0x53, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x4a, 0x0a, 0x0a, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x43, + 0x0a, 0x0c, 0x42, 0x69, 0x6e, 0x64, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x03, 0x52, 0x45, 0x4d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x22, 0x6a, 0x0a, + 0x0b, 0x54, 0x43, 0x50, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x9f, 0x02, 0x0a, 0x0a, 0x57, 0x65, + 0x62, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x65, 0x62, 0x73, + 0x69, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x65, + 0x62, 0x73, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0xf6, 0x01, 0x0a, 0x07, + 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x22, 0x6a, 0x0a, 0x0b, 0x54, 0x43, - 0x50, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x9f, 0x02, 0x0a, 0x0a, 0x57, 0x65, 0x62, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x65, 0x62, 0x73, 0x69, - 0x74, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0xf6, 0x01, 0x0a, 0x07, 0x57, 0x65, 0x62, - 0x73, 0x69, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, - 0x74, 0x12, 0x3b, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, - 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x51, - 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x3b, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x1a, 0x51, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, + 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x39, 0x0a, 0x08, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, + 0x12, 0x2d, 0x0a, 0x08, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, 0x65, + 0x62, 0x73, 0x69, 0x74, 0x65, 0x52, 0x08, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, 0x22, + 0x3f, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x30, + 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, 0x65, 0x62, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x39, 0x0a, 0x08, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, - 0x08, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, - 0x74, 0x65, 0x52, 0x08, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x0b, - 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x80, 0x01, - 0x0a, 0x07, 0x50, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x22, 0xa6, 0x03, 0x0a, 0x15, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x72, 0x65, 0x70, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x72, - 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x43, 0x0a, - 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x63, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x63, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x1a, 0x39, - 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0f, 0x47, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x36, 0x0a, 0x09, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, - 0x12, 0x19, 0x0a, 0x08, 0x68, 0x74, 0x6d, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x68, 0x74, 0x6d, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x62, - 0x61, 0x64, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x61, 0x64, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x06, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x65, - 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, - 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, - 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, - 0x61, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x74, 0x49, 0x64, - 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, - 0x61, 0x6c, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, - 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x6e, 0x67, - 0x74, 0x61, 0x6c, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x72, - 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x6c, 0x61, 0x72, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, - 0x72, 0x6b, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x72, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, - 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x5f, - 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x63, 0x68, 0x61, 0x6e, 0x55, 0x72, 0x6c, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x80, 0x01, 0x0a, 0x07, 0x50, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x22, 0xa6, 0x03, 0x0a, 0x15, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, + 0x12, 0x43, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x63, 0x61, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x63, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, + 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0f, + 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, + 0x36, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0e, 0x47, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x74, 0x6d, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x74, 0x6d, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x1b, + 0x0a, 0x09, 0x62, 0x61, 0x64, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x62, 0x61, 0x64, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x06, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, + 0x61, 0x6d, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x61, 0x70, 0x69, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, + 0x72, 0x61, 0x6d, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, + 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, + 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, + 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, + 0x6b, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, + 0x6c, 0x61, 0x72, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x6c, 0x61, 0x72, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, + 0x10, 0x6c, 0x61, 0x72, 0x6b, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x72, 0x6b, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, + 0x61, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x55, 0x72, 0x6c, 0x42, 0x46, 0x5a, 0x44, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, + 0x65, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/helper/proto/services/clientrpc/service.pb.go b/helper/proto/services/clientrpc/service.pb.go index adebd059..572b1d4f 100644 --- a/helper/proto/services/clientrpc/service.pb.go +++ b/helper/proto/services/clientrpc/service.pb.go @@ -33,7 +33,7 @@ var file_services_clientrpc_service_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb8, 0x32, 0x0a, 0x09, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd9, 0x2f, 0x0a, 0x09, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x52, 0x50, 0x43, 0x12, 0x33, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, @@ -358,111 +358,89 @@ var file_services_clientrpc_service_proto_rawDesc = []byte{ 0x69, 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0d, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x11, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x0f, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x33, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x12, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x08, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x1a, 0x11, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x32, - 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x0f, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x11, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x12, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x10, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x37, - 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x41, + 0x69, 0x6e, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x0f, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x33, 0x0a, + 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x11, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x36, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x08, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x0b, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x3e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x42, 0x79, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x12, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x3a, 0x0a, 0x10, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x37, 0x0a, 0x0e, + 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, - 0x35, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0b, 0x4d, 0x61, 0x6c, 0x65, 0x66, 0x69, - 0x63, 0x53, 0x52, 0x44, 0x49, 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x0c, - 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x2e, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4d, - 0x0a, 0x17, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, - 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x46, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, - 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x31, 0x0a, - 0x0d, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0b, + 0x4d, 0x61, 0x6c, 0x65, 0x66, 0x69, 0x63, 0x53, 0x52, 0x44, 0x49, 0x12, 0x11, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x1a, 0x12, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x0f, 0x47, 0x65, + 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x37, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x31, + 0x0a, 0x0d, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x32, 0xc3, 0x02, 0x0a, 0x07, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x50, 0x43, 0x12, 0x2f, 0x0a, 0x09, - 0x41, 0x64, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, - 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, - 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, - 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, - 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, - 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, + 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x32, 0xc3, 0x02, 0x0a, 0x07, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x50, 0x43, 0x12, 0x2f, 0x0a, + 0x09, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, - 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, - 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, - 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x1a, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, - 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, + 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, + 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, + 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, + 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, + 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x1a, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, + 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_services_clientrpc_service_proto_goTypes = []interface{}{ @@ -630,164 +608,152 @@ var file_services_clientrpc_service_proto_depIdxs = []int32{ 35, // 97: clientrpc.MaliceRPC.DLL2Shellcode:input_type -> clientpb.DLL2Shellcode 36, // 98: clientrpc.MaliceRPC.ShellcodeEncode:input_type -> clientpb.ShellcodeEncode 1, // 99: clientrpc.MaliceRPC.ListJobs:input_type -> clientpb.Empty - 37, // 100: clientrpc.MaliceRPC.NewProfile:input_type -> clientpb.Profile - 1, // 101: clientrpc.MaliceRPC.GetProfiles:input_type -> clientpb.Empty - 37, // 102: clientrpc.MaliceRPC.DeleteProfile:input_type -> clientpb.Profile - 37, // 103: clientrpc.MaliceRPC.UpdateProfile:input_type -> clientpb.Profile - 38, // 104: clientrpc.MaliceRPC.Build:input_type -> clientpb.Generate - 38, // 105: clientrpc.MaliceRPC.BuildModules:input_type -> clientpb.Generate - 39, // 106: clientrpc.MaliceRPC.BuildLog:input_type -> clientpb.Builder - 1, // 107: clientrpc.MaliceRPC.ListBuilder:input_type -> clientpb.Empty - 37, // 108: clientrpc.MaliceRPC.GetArtifactsByProfile:input_type -> clientpb.Profile - 40, // 109: clientrpc.MaliceRPC.DownloadArtifact:input_type -> clientpb.Artifact - 40, // 110: clientrpc.MaliceRPC.UploadArtifact:input_type -> clientpb.Artifact - 40, // 111: clientrpc.MaliceRPC.FindArtifact:input_type -> clientpb.Artifact - 40, // 112: clientrpc.MaliceRPC.DeleteArtifact:input_type -> clientpb.Artifact - 39, // 113: clientrpc.MaliceRPC.MaleficSRDI:input_type -> clientpb.Builder - 1, // 114: clientrpc.MaliceRPC.DockerStatus:input_type -> clientpb.Empty - 41, // 115: clientrpc.MaliceRPC.TriggerWorkflowDispatch:input_type -> clientpb.GithubWorkflowRequest - 41, // 116: clientrpc.MaliceRPC.WorkflowStatus:input_type -> clientpb.GithubWorkflowRequest - 41, // 117: clientrpc.MaliceRPC.UpdateGithubConfig:input_type -> clientpb.GithubWorkflowRequest - 1, // 118: clientrpc.MaliceRPC.GetGithubConfig:input_type -> clientpb.Empty - 42, // 119: clientrpc.MaliceRPC.UpdateNotifyConfig:input_type -> clientpb.Notify - 1, // 120: clientrpc.MaliceRPC.GetNotifyConfig:input_type -> clientpb.Empty - 1, // 121: clientrpc.MaliceRPC.RefreshConfig:input_type -> clientpb.Empty - 43, // 122: clientrpc.RootRPC.AddClient:input_type -> rootpb.Operator - 43, // 123: clientrpc.RootRPC.RemoveClient:input_type -> rootpb.Operator - 43, // 124: clientrpc.RootRPC.ListClients:input_type -> rootpb.Operator - 43, // 125: clientrpc.RootRPC.AddListener:input_type -> rootpb.Operator - 43, // 126: clientrpc.RootRPC.RemoveListener:input_type -> rootpb.Operator - 43, // 127: clientrpc.RootRPC.ListListeners:input_type -> rootpb.Operator - 44, // 128: clientrpc.MaliceRPC.LoginClient:output_type -> clientpb.Client - 45, // 129: clientrpc.MaliceRPC.GetBasic:output_type -> clientpb.Basic - 46, // 130: clientrpc.MaliceRPC.GetClients:output_type -> clientpb.Clients - 47, // 131: clientrpc.MaliceRPC.GetSessions:output_type -> clientpb.Sessions - 7, // 132: clientrpc.MaliceRPC.GetSession:output_type -> clientpb.Session - 48, // 133: clientrpc.MaliceRPC.GetSessionHistory:output_type -> clientpb.TasksContext - 1, // 134: clientrpc.MaliceRPC.SessionManage:output_type -> clientpb.Empty - 49, // 135: clientrpc.MaliceRPC.GetListeners:output_type -> clientpb.Listeners - 50, // 136: clientrpc.MaliceRPC.GetPipelines:output_type -> clientpb.Pipelines - 51, // 137: clientrpc.MaliceRPC.GetJobs:output_type -> clientpb.Jobs - 52, // 138: clientrpc.MaliceRPC.GetTasks:output_type -> clientpb.Tasks - 53, // 139: clientrpc.MaliceRPC.GetTaskContent:output_type -> clientpb.TaskContext - 54, // 140: clientrpc.MaliceRPC.GetTaskFiles:output_type -> clientpb.Files - 53, // 141: clientrpc.MaliceRPC.WaitTaskContent:output_type -> clientpb.TaskContext - 53, // 142: clientrpc.MaliceRPC.WaitTaskFinish:output_type -> clientpb.TaskContext - 55, // 143: clientrpc.MaliceRPC.GetAllTaskContent:output_type -> clientpb.TaskContexts - 54, // 144: clientrpc.MaliceRPC.GetFiles:output_type -> clientpb.Files - 54, // 145: clientrpc.MaliceRPC.GetAllDownloadFiles:output_type -> clientpb.Files - 8, // 146: clientrpc.MaliceRPC.Events:output_type -> clientpb.Event - 1, // 147: clientrpc.MaliceRPC.Broadcast:output_type -> clientpb.Empty - 1, // 148: clientrpc.MaliceRPC.Notify:output_type -> clientpb.Empty - 56, // 149: clientrpc.MaliceRPC.GetEvent:output_type -> clientpb.Events - 1, // 150: clientrpc.MaliceRPC.SessionEvent:output_type -> clientpb.Empty - 1, // 151: clientrpc.MaliceRPC.OnHook:output_type -> clientpb.Empty - 6, // 152: clientrpc.MaliceRPC.Ping:output_type -> clientpb.Task - 6, // 153: clientrpc.MaliceRPC.Sleep:output_type -> clientpb.Task - 6, // 154: clientrpc.MaliceRPC.Suicide:output_type -> clientpb.Task - 6, // 155: clientrpc.MaliceRPC.ListModule:output_type -> clientpb.Task - 6, // 156: clientrpc.MaliceRPC.LoadModule:output_type -> clientpb.Task - 6, // 157: clientrpc.MaliceRPC.RefreshModule:output_type -> clientpb.Task - 6, // 158: clientrpc.MaliceRPC.ListAddon:output_type -> clientpb.Task - 6, // 159: clientrpc.MaliceRPC.LoadAddon:output_type -> clientpb.Task - 6, // 160: clientrpc.MaliceRPC.ExecuteAddon:output_type -> clientpb.Task - 6, // 161: clientrpc.MaliceRPC.Clear:output_type -> clientpb.Task - 6, // 162: clientrpc.MaliceRPC.CancelTask:output_type -> clientpb.Task - 1, // 163: clientrpc.MaliceRPC.Polling:output_type -> clientpb.Empty - 6, // 164: clientrpc.MaliceRPC.Upload:output_type -> clientpb.Task - 6, // 165: clientrpc.MaliceRPC.Download:output_type -> clientpb.Task - 57, // 166: clientrpc.MaliceRPC.Sync:output_type -> clientpb.SyncResp - 6, // 167: clientrpc.MaliceRPC.Pwd:output_type -> clientpb.Task - 6, // 168: clientrpc.MaliceRPC.Ls:output_type -> clientpb.Task - 6, // 169: clientrpc.MaliceRPC.Cd:output_type -> clientpb.Task - 6, // 170: clientrpc.MaliceRPC.Rm:output_type -> clientpb.Task - 6, // 171: clientrpc.MaliceRPC.Mv:output_type -> clientpb.Task - 6, // 172: clientrpc.MaliceRPC.Cp:output_type -> clientpb.Task - 6, // 173: clientrpc.MaliceRPC.Cat:output_type -> clientpb.Task - 6, // 174: clientrpc.MaliceRPC.Mkdir:output_type -> clientpb.Task - 6, // 175: clientrpc.MaliceRPC.Chmod:output_type -> clientpb.Task - 6, // 176: clientrpc.MaliceRPC.Chown:output_type -> clientpb.Task - 6, // 177: clientrpc.MaliceRPC.Kill:output_type -> clientpb.Task - 6, // 178: clientrpc.MaliceRPC.Ps:output_type -> clientpb.Task - 6, // 179: clientrpc.MaliceRPC.Netstat:output_type -> clientpb.Task - 6, // 180: clientrpc.MaliceRPC.Curl:output_type -> clientpb.Task - 6, // 181: clientrpc.MaliceRPC.Env:output_type -> clientpb.Task - 6, // 182: clientrpc.MaliceRPC.SetEnv:output_type -> clientpb.Task - 6, // 183: clientrpc.MaliceRPC.UnsetEnv:output_type -> clientpb.Task - 6, // 184: clientrpc.MaliceRPC.Whoami:output_type -> clientpb.Task - 6, // 185: clientrpc.MaliceRPC.Info:output_type -> clientpb.Task - 6, // 186: clientrpc.MaliceRPC.Bypass:output_type -> clientpb.Task - 6, // 187: clientrpc.MaliceRPC.RegQuery:output_type -> clientpb.Task - 6, // 188: clientrpc.MaliceRPC.RegAdd:output_type -> clientpb.Task - 6, // 189: clientrpc.MaliceRPC.RegDelete:output_type -> clientpb.Task - 6, // 190: clientrpc.MaliceRPC.RegListKey:output_type -> clientpb.Task - 6, // 191: clientrpc.MaliceRPC.RegListValue:output_type -> clientpb.Task - 6, // 192: clientrpc.MaliceRPC.ServiceList:output_type -> clientpb.Task - 6, // 193: clientrpc.MaliceRPC.ServiceCreate:output_type -> clientpb.Task - 6, // 194: clientrpc.MaliceRPC.ServiceStart:output_type -> clientpb.Task - 6, // 195: clientrpc.MaliceRPC.ServiceStop:output_type -> clientpb.Task - 6, // 196: clientrpc.MaliceRPC.ServiceQuery:output_type -> clientpb.Task - 6, // 197: clientrpc.MaliceRPC.ServiceDelete:output_type -> clientpb.Task - 6, // 198: clientrpc.MaliceRPC.TaskSchdList:output_type -> clientpb.Task - 6, // 199: clientrpc.MaliceRPC.TaskSchdCreate:output_type -> clientpb.Task - 6, // 200: clientrpc.MaliceRPC.TaskSchdStart:output_type -> clientpb.Task - 6, // 201: clientrpc.MaliceRPC.TaskSchdStop:output_type -> clientpb.Task - 6, // 202: clientrpc.MaliceRPC.TaskSchdDelete:output_type -> clientpb.Task - 6, // 203: clientrpc.MaliceRPC.TaskSchdQuery:output_type -> clientpb.Task - 6, // 204: clientrpc.MaliceRPC.TaskSchdRun:output_type -> clientpb.Task - 6, // 205: clientrpc.MaliceRPC.WmiQuery:output_type -> clientpb.Task - 6, // 206: clientrpc.MaliceRPC.WmiExecute:output_type -> clientpb.Task - 6, // 207: clientrpc.MaliceRPC.Runas:output_type -> clientpb.Task - 6, // 208: clientrpc.MaliceRPC.Privs:output_type -> clientpb.Task - 6, // 209: clientrpc.MaliceRPC.GetSystem:output_type -> clientpb.Task - 6, // 210: clientrpc.MaliceRPC.PipeUpload:output_type -> clientpb.Task - 6, // 211: clientrpc.MaliceRPC.PipeRead:output_type -> clientpb.Task - 6, // 212: clientrpc.MaliceRPC.PipeClose:output_type -> clientpb.Task - 6, // 213: clientrpc.MaliceRPC.Execute:output_type -> clientpb.Task - 6, // 214: clientrpc.MaliceRPC.ExecuteSpawn:output_type -> clientpb.Task - 6, // 215: clientrpc.MaliceRPC.ExecuteAssembly:output_type -> clientpb.Task - 6, // 216: clientrpc.MaliceRPC.ExecutePowerpick:output_type -> clientpb.Task - 6, // 217: clientrpc.MaliceRPC.ExecuteEXE:output_type -> clientpb.Task - 6, // 218: clientrpc.MaliceRPC.ExecuteDLL:output_type -> clientpb.Task - 6, // 219: clientrpc.MaliceRPC.ExecuteArmory:output_type -> clientpb.Task - 6, // 220: clientrpc.MaliceRPC.ExecuteShellcode:output_type -> clientpb.Task - 6, // 221: clientrpc.MaliceRPC.ExecuteBof:output_type -> clientpb.Task - 6, // 222: clientrpc.MaliceRPC.ExecuteLocal:output_type -> clientpb.Task - 6, // 223: clientrpc.MaliceRPC.InlineLocal:output_type -> clientpb.Task - 58, // 224: clientrpc.MaliceRPC.EXE2Shellcode:output_type -> clientpb.Bin - 58, // 225: clientrpc.MaliceRPC.DLL2Shellcode:output_type -> clientpb.Bin - 58, // 226: clientrpc.MaliceRPC.ShellcodeEncode:output_type -> clientpb.Bin - 50, // 227: clientrpc.MaliceRPC.ListJobs:output_type -> clientpb.Pipelines - 1, // 228: clientrpc.MaliceRPC.NewProfile:output_type -> clientpb.Empty - 59, // 229: clientrpc.MaliceRPC.GetProfiles:output_type -> clientpb.Profiles - 1, // 230: clientrpc.MaliceRPC.DeleteProfile:output_type -> clientpb.Empty - 1, // 231: clientrpc.MaliceRPC.UpdateProfile:output_type -> clientpb.Empty - 39, // 232: clientrpc.MaliceRPC.Build:output_type -> clientpb.Builder - 40, // 233: clientrpc.MaliceRPC.BuildModules:output_type -> clientpb.Artifact - 39, // 234: clientrpc.MaliceRPC.BuildLog:output_type -> clientpb.Builder - 60, // 235: clientrpc.MaliceRPC.ListBuilder:output_type -> clientpb.Builders - 60, // 236: clientrpc.MaliceRPC.GetArtifactsByProfile:output_type -> clientpb.Builders - 40, // 237: clientrpc.MaliceRPC.DownloadArtifact:output_type -> clientpb.Artifact - 39, // 238: clientrpc.MaliceRPC.UploadArtifact:output_type -> clientpb.Builder - 40, // 239: clientrpc.MaliceRPC.FindArtifact:output_type -> clientpb.Artifact - 1, // 240: clientrpc.MaliceRPC.DeleteArtifact:output_type -> clientpb.Empty - 40, // 241: clientrpc.MaliceRPC.MaleficSRDI:output_type -> clientpb.Artifact - 1, // 242: clientrpc.MaliceRPC.DockerStatus:output_type -> clientpb.Empty - 39, // 243: clientrpc.MaliceRPC.TriggerWorkflowDispatch:output_type -> clientpb.Builder - 1, // 244: clientrpc.MaliceRPC.WorkflowStatus:output_type -> clientpb.Empty - 1, // 245: clientrpc.MaliceRPC.UpdateGithubConfig:output_type -> clientpb.Empty - 41, // 246: clientrpc.MaliceRPC.GetGithubConfig:output_type -> clientpb.GithubWorkflowRequest - 1, // 247: clientrpc.MaliceRPC.UpdateNotifyConfig:output_type -> clientpb.Empty - 42, // 248: clientrpc.MaliceRPC.GetNotifyConfig:output_type -> clientpb.Notify - 1, // 249: clientrpc.MaliceRPC.RefreshConfig:output_type -> clientpb.Empty - 61, // 250: clientrpc.RootRPC.AddClient:output_type -> rootpb.Response - 61, // 251: clientrpc.RootRPC.RemoveClient:output_type -> rootpb.Response - 46, // 252: clientrpc.RootRPC.ListClients:output_type -> clientpb.Clients - 61, // 253: clientrpc.RootRPC.AddListener:output_type -> rootpb.Response - 61, // 254: clientrpc.RootRPC.RemoveListener:output_type -> rootpb.Response - 49, // 255: clientrpc.RootRPC.ListListeners:output_type -> clientpb.Listeners - 128, // [128:256] is the sub-list for method output_type - 0, // [0:128] is the sub-list for method input_type + 1, // 100: clientrpc.MaliceRPC.GetProfiles:input_type -> clientpb.Empty + 37, // 101: clientrpc.MaliceRPC.DeleteProfile:input_type -> clientpb.Profile + 37, // 102: clientrpc.MaliceRPC.UpdateProfile:input_type -> clientpb.Profile + 38, // 103: clientrpc.MaliceRPC.BuildModules:input_type -> clientpb.Generate + 39, // 104: clientrpc.MaliceRPC.BuildLog:input_type -> clientpb.Builder + 1, // 105: clientrpc.MaliceRPC.ListBuilder:input_type -> clientpb.Empty + 37, // 106: clientrpc.MaliceRPC.GetArtifactsByProfile:input_type -> clientpb.Profile + 40, // 107: clientrpc.MaliceRPC.DownloadArtifact:input_type -> clientpb.Artifact + 40, // 108: clientrpc.MaliceRPC.UploadArtifact:input_type -> clientpb.Artifact + 40, // 109: clientrpc.MaliceRPC.DeleteArtifact:input_type -> clientpb.Artifact + 39, // 110: clientrpc.MaliceRPC.MaleficSRDI:input_type -> clientpb.Builder + 41, // 111: clientrpc.MaliceRPC.UpdateGithubConfig:input_type -> clientpb.GithubWorkflowRequest + 1, // 112: clientrpc.MaliceRPC.GetGithubConfig:input_type -> clientpb.Empty + 42, // 113: clientrpc.MaliceRPC.UpdateNotifyConfig:input_type -> clientpb.Notify + 1, // 114: clientrpc.MaliceRPC.GetNotifyConfig:input_type -> clientpb.Empty + 1, // 115: clientrpc.MaliceRPC.RefreshConfig:input_type -> clientpb.Empty + 43, // 116: clientrpc.RootRPC.AddClient:input_type -> rootpb.Operator + 43, // 117: clientrpc.RootRPC.RemoveClient:input_type -> rootpb.Operator + 43, // 118: clientrpc.RootRPC.ListClients:input_type -> rootpb.Operator + 43, // 119: clientrpc.RootRPC.AddListener:input_type -> rootpb.Operator + 43, // 120: clientrpc.RootRPC.RemoveListener:input_type -> rootpb.Operator + 43, // 121: clientrpc.RootRPC.ListListeners:input_type -> rootpb.Operator + 44, // 122: clientrpc.MaliceRPC.LoginClient:output_type -> clientpb.Client + 45, // 123: clientrpc.MaliceRPC.GetBasic:output_type -> clientpb.Basic + 46, // 124: clientrpc.MaliceRPC.GetClients:output_type -> clientpb.Clients + 47, // 125: clientrpc.MaliceRPC.GetSessions:output_type -> clientpb.Sessions + 7, // 126: clientrpc.MaliceRPC.GetSession:output_type -> clientpb.Session + 48, // 127: clientrpc.MaliceRPC.GetSessionHistory:output_type -> clientpb.TasksContext + 1, // 128: clientrpc.MaliceRPC.SessionManage:output_type -> clientpb.Empty + 49, // 129: clientrpc.MaliceRPC.GetListeners:output_type -> clientpb.Listeners + 50, // 130: clientrpc.MaliceRPC.GetPipelines:output_type -> clientpb.Pipelines + 51, // 131: clientrpc.MaliceRPC.GetJobs:output_type -> clientpb.Jobs + 52, // 132: clientrpc.MaliceRPC.GetTasks:output_type -> clientpb.Tasks + 53, // 133: clientrpc.MaliceRPC.GetTaskContent:output_type -> clientpb.TaskContext + 54, // 134: clientrpc.MaliceRPC.GetTaskFiles:output_type -> clientpb.Files + 53, // 135: clientrpc.MaliceRPC.WaitTaskContent:output_type -> clientpb.TaskContext + 53, // 136: clientrpc.MaliceRPC.WaitTaskFinish:output_type -> clientpb.TaskContext + 55, // 137: clientrpc.MaliceRPC.GetAllTaskContent:output_type -> clientpb.TaskContexts + 54, // 138: clientrpc.MaliceRPC.GetFiles:output_type -> clientpb.Files + 54, // 139: clientrpc.MaliceRPC.GetAllDownloadFiles:output_type -> clientpb.Files + 8, // 140: clientrpc.MaliceRPC.Events:output_type -> clientpb.Event + 1, // 141: clientrpc.MaliceRPC.Broadcast:output_type -> clientpb.Empty + 1, // 142: clientrpc.MaliceRPC.Notify:output_type -> clientpb.Empty + 56, // 143: clientrpc.MaliceRPC.GetEvent:output_type -> clientpb.Events + 1, // 144: clientrpc.MaliceRPC.SessionEvent:output_type -> clientpb.Empty + 1, // 145: clientrpc.MaliceRPC.OnHook:output_type -> clientpb.Empty + 6, // 146: clientrpc.MaliceRPC.Ping:output_type -> clientpb.Task + 6, // 147: clientrpc.MaliceRPC.Sleep:output_type -> clientpb.Task + 6, // 148: clientrpc.MaliceRPC.Suicide:output_type -> clientpb.Task + 6, // 149: clientrpc.MaliceRPC.ListModule:output_type -> clientpb.Task + 6, // 150: clientrpc.MaliceRPC.LoadModule:output_type -> clientpb.Task + 6, // 151: clientrpc.MaliceRPC.RefreshModule:output_type -> clientpb.Task + 6, // 152: clientrpc.MaliceRPC.ListAddon:output_type -> clientpb.Task + 6, // 153: clientrpc.MaliceRPC.LoadAddon:output_type -> clientpb.Task + 6, // 154: clientrpc.MaliceRPC.ExecuteAddon:output_type -> clientpb.Task + 6, // 155: clientrpc.MaliceRPC.Clear:output_type -> clientpb.Task + 6, // 156: clientrpc.MaliceRPC.CancelTask:output_type -> clientpb.Task + 1, // 157: clientrpc.MaliceRPC.Polling:output_type -> clientpb.Empty + 6, // 158: clientrpc.MaliceRPC.Upload:output_type -> clientpb.Task + 6, // 159: clientrpc.MaliceRPC.Download:output_type -> clientpb.Task + 57, // 160: clientrpc.MaliceRPC.Sync:output_type -> clientpb.SyncResp + 6, // 161: clientrpc.MaliceRPC.Pwd:output_type -> clientpb.Task + 6, // 162: clientrpc.MaliceRPC.Ls:output_type -> clientpb.Task + 6, // 163: clientrpc.MaliceRPC.Cd:output_type -> clientpb.Task + 6, // 164: clientrpc.MaliceRPC.Rm:output_type -> clientpb.Task + 6, // 165: clientrpc.MaliceRPC.Mv:output_type -> clientpb.Task + 6, // 166: clientrpc.MaliceRPC.Cp:output_type -> clientpb.Task + 6, // 167: clientrpc.MaliceRPC.Cat:output_type -> clientpb.Task + 6, // 168: clientrpc.MaliceRPC.Mkdir:output_type -> clientpb.Task + 6, // 169: clientrpc.MaliceRPC.Chmod:output_type -> clientpb.Task + 6, // 170: clientrpc.MaliceRPC.Chown:output_type -> clientpb.Task + 6, // 171: clientrpc.MaliceRPC.Kill:output_type -> clientpb.Task + 6, // 172: clientrpc.MaliceRPC.Ps:output_type -> clientpb.Task + 6, // 173: clientrpc.MaliceRPC.Netstat:output_type -> clientpb.Task + 6, // 174: clientrpc.MaliceRPC.Curl:output_type -> clientpb.Task + 6, // 175: clientrpc.MaliceRPC.Env:output_type -> clientpb.Task + 6, // 176: clientrpc.MaliceRPC.SetEnv:output_type -> clientpb.Task + 6, // 177: clientrpc.MaliceRPC.UnsetEnv:output_type -> clientpb.Task + 6, // 178: clientrpc.MaliceRPC.Whoami:output_type -> clientpb.Task + 6, // 179: clientrpc.MaliceRPC.Info:output_type -> clientpb.Task + 6, // 180: clientrpc.MaliceRPC.Bypass:output_type -> clientpb.Task + 6, // 181: clientrpc.MaliceRPC.RegQuery:output_type -> clientpb.Task + 6, // 182: clientrpc.MaliceRPC.RegAdd:output_type -> clientpb.Task + 6, // 183: clientrpc.MaliceRPC.RegDelete:output_type -> clientpb.Task + 6, // 184: clientrpc.MaliceRPC.RegListKey:output_type -> clientpb.Task + 6, // 185: clientrpc.MaliceRPC.RegListValue:output_type -> clientpb.Task + 6, // 186: clientrpc.MaliceRPC.ServiceList:output_type -> clientpb.Task + 6, // 187: clientrpc.MaliceRPC.ServiceCreate:output_type -> clientpb.Task + 6, // 188: clientrpc.MaliceRPC.ServiceStart:output_type -> clientpb.Task + 6, // 189: clientrpc.MaliceRPC.ServiceStop:output_type -> clientpb.Task + 6, // 190: clientrpc.MaliceRPC.ServiceQuery:output_type -> clientpb.Task + 6, // 191: clientrpc.MaliceRPC.ServiceDelete:output_type -> clientpb.Task + 6, // 192: clientrpc.MaliceRPC.TaskSchdList:output_type -> clientpb.Task + 6, // 193: clientrpc.MaliceRPC.TaskSchdCreate:output_type -> clientpb.Task + 6, // 194: clientrpc.MaliceRPC.TaskSchdStart:output_type -> clientpb.Task + 6, // 195: clientrpc.MaliceRPC.TaskSchdStop:output_type -> clientpb.Task + 6, // 196: clientrpc.MaliceRPC.TaskSchdDelete:output_type -> clientpb.Task + 6, // 197: clientrpc.MaliceRPC.TaskSchdQuery:output_type -> clientpb.Task + 6, // 198: clientrpc.MaliceRPC.TaskSchdRun:output_type -> clientpb.Task + 6, // 199: clientrpc.MaliceRPC.WmiQuery:output_type -> clientpb.Task + 6, // 200: clientrpc.MaliceRPC.WmiExecute:output_type -> clientpb.Task + 6, // 201: clientrpc.MaliceRPC.Runas:output_type -> clientpb.Task + 6, // 202: clientrpc.MaliceRPC.Privs:output_type -> clientpb.Task + 6, // 203: clientrpc.MaliceRPC.GetSystem:output_type -> clientpb.Task + 6, // 204: clientrpc.MaliceRPC.PipeUpload:output_type -> clientpb.Task + 6, // 205: clientrpc.MaliceRPC.PipeRead:output_type -> clientpb.Task + 6, // 206: clientrpc.MaliceRPC.PipeClose:output_type -> clientpb.Task + 6, // 207: clientrpc.MaliceRPC.Execute:output_type -> clientpb.Task + 6, // 208: clientrpc.MaliceRPC.ExecuteSpawn:output_type -> clientpb.Task + 6, // 209: clientrpc.MaliceRPC.ExecuteAssembly:output_type -> clientpb.Task + 6, // 210: clientrpc.MaliceRPC.ExecutePowerpick:output_type -> clientpb.Task + 6, // 211: clientrpc.MaliceRPC.ExecuteEXE:output_type -> clientpb.Task + 6, // 212: clientrpc.MaliceRPC.ExecuteDLL:output_type -> clientpb.Task + 6, // 213: clientrpc.MaliceRPC.ExecuteArmory:output_type -> clientpb.Task + 6, // 214: clientrpc.MaliceRPC.ExecuteShellcode:output_type -> clientpb.Task + 6, // 215: clientrpc.MaliceRPC.ExecuteBof:output_type -> clientpb.Task + 6, // 216: clientrpc.MaliceRPC.ExecuteLocal:output_type -> clientpb.Task + 6, // 217: clientrpc.MaliceRPC.InlineLocal:output_type -> clientpb.Task + 58, // 218: clientrpc.MaliceRPC.EXE2Shellcode:output_type -> clientpb.Bin + 58, // 219: clientrpc.MaliceRPC.DLL2Shellcode:output_type -> clientpb.Bin + 58, // 220: clientrpc.MaliceRPC.ShellcodeEncode:output_type -> clientpb.Bin + 50, // 221: clientrpc.MaliceRPC.ListJobs:output_type -> clientpb.Pipelines + 59, // 222: clientrpc.MaliceRPC.GetProfiles:output_type -> clientpb.Profiles + 1, // 223: clientrpc.MaliceRPC.DeleteProfile:output_type -> clientpb.Empty + 1, // 224: clientrpc.MaliceRPC.UpdateProfile:output_type -> clientpb.Empty + 40, // 225: clientrpc.MaliceRPC.BuildModules:output_type -> clientpb.Artifact + 39, // 226: clientrpc.MaliceRPC.BuildLog:output_type -> clientpb.Builder + 60, // 227: clientrpc.MaliceRPC.ListBuilder:output_type -> clientpb.Builders + 60, // 228: clientrpc.MaliceRPC.GetArtifactsByProfile:output_type -> clientpb.Builders + 40, // 229: clientrpc.MaliceRPC.DownloadArtifact:output_type -> clientpb.Artifact + 39, // 230: clientrpc.MaliceRPC.UploadArtifact:output_type -> clientpb.Builder + 1, // 231: clientrpc.MaliceRPC.DeleteArtifact:output_type -> clientpb.Empty + 40, // 232: clientrpc.MaliceRPC.MaleficSRDI:output_type -> clientpb.Artifact + 1, // 233: clientrpc.MaliceRPC.UpdateGithubConfig:output_type -> clientpb.Empty + 41, // 234: clientrpc.MaliceRPC.GetGithubConfig:output_type -> clientpb.GithubWorkflowRequest + 1, // 235: clientrpc.MaliceRPC.UpdateNotifyConfig:output_type -> clientpb.Empty + 42, // 236: clientrpc.MaliceRPC.GetNotifyConfig:output_type -> clientpb.Notify + 1, // 237: clientrpc.MaliceRPC.RefreshConfig:output_type -> clientpb.Empty + 61, // 238: clientrpc.RootRPC.AddClient:output_type -> rootpb.Response + 61, // 239: clientrpc.RootRPC.RemoveClient:output_type -> rootpb.Response + 46, // 240: clientrpc.RootRPC.ListClients:output_type -> clientpb.Clients + 61, // 241: clientrpc.RootRPC.AddListener:output_type -> rootpb.Response + 61, // 242: clientrpc.RootRPC.RemoveListener:output_type -> rootpb.Response + 49, // 243: clientrpc.RootRPC.ListListeners:output_type -> clientpb.Listeners + 122, // [122:244] is the sub-list for method output_type + 0, // [0:122] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/helper/proto/services/clientrpc/service_grpc.pb.go b/helper/proto/services/clientrpc/service_grpc.pb.go index e596d48a..6a3f231f 100644 --- a/helper/proto/services/clientrpc/service_grpc.pb.go +++ b/helper/proto/services/clientrpc/service_grpc.pb.go @@ -22,128 +22,122 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - MaliceRPC_LoginClient_FullMethodName = "/clientrpc.MaliceRPC/LoginClient" - MaliceRPC_GetBasic_FullMethodName = "/clientrpc.MaliceRPC/GetBasic" - MaliceRPC_GetClients_FullMethodName = "/clientrpc.MaliceRPC/GetClients" - MaliceRPC_GetSessions_FullMethodName = "/clientrpc.MaliceRPC/GetSessions" - MaliceRPC_GetSession_FullMethodName = "/clientrpc.MaliceRPC/GetSession" - MaliceRPC_GetSessionHistory_FullMethodName = "/clientrpc.MaliceRPC/GetSessionHistory" - MaliceRPC_SessionManage_FullMethodName = "/clientrpc.MaliceRPC/SessionManage" - MaliceRPC_GetListeners_FullMethodName = "/clientrpc.MaliceRPC/GetListeners" - MaliceRPC_GetPipelines_FullMethodName = "/clientrpc.MaliceRPC/GetPipelines" - MaliceRPC_GetJobs_FullMethodName = "/clientrpc.MaliceRPC/GetJobs" - MaliceRPC_GetTasks_FullMethodName = "/clientrpc.MaliceRPC/GetTasks" - MaliceRPC_GetTaskContent_FullMethodName = "/clientrpc.MaliceRPC/GetTaskContent" - MaliceRPC_GetTaskFiles_FullMethodName = "/clientrpc.MaliceRPC/GetTaskFiles" - MaliceRPC_WaitTaskContent_FullMethodName = "/clientrpc.MaliceRPC/WaitTaskContent" - MaliceRPC_WaitTaskFinish_FullMethodName = "/clientrpc.MaliceRPC/WaitTaskFinish" - MaliceRPC_GetAllTaskContent_FullMethodName = "/clientrpc.MaliceRPC/GetAllTaskContent" - MaliceRPC_GetFiles_FullMethodName = "/clientrpc.MaliceRPC/GetFiles" - MaliceRPC_GetAllDownloadFiles_FullMethodName = "/clientrpc.MaliceRPC/GetAllDownloadFiles" - MaliceRPC_Events_FullMethodName = "/clientrpc.MaliceRPC/Events" - MaliceRPC_Broadcast_FullMethodName = "/clientrpc.MaliceRPC/Broadcast" - MaliceRPC_Notify_FullMethodName = "/clientrpc.MaliceRPC/Notify" - MaliceRPC_GetEvent_FullMethodName = "/clientrpc.MaliceRPC/GetEvent" - MaliceRPC_SessionEvent_FullMethodName = "/clientrpc.MaliceRPC/SessionEvent" - MaliceRPC_OnHook_FullMethodName = "/clientrpc.MaliceRPC/OnHook" - MaliceRPC_Ping_FullMethodName = "/clientrpc.MaliceRPC/Ping" - MaliceRPC_Sleep_FullMethodName = "/clientrpc.MaliceRPC/Sleep" - MaliceRPC_Suicide_FullMethodName = "/clientrpc.MaliceRPC/Suicide" - MaliceRPC_ListModule_FullMethodName = "/clientrpc.MaliceRPC/ListModule" - MaliceRPC_LoadModule_FullMethodName = "/clientrpc.MaliceRPC/LoadModule" - MaliceRPC_RefreshModule_FullMethodName = "/clientrpc.MaliceRPC/RefreshModule" - MaliceRPC_ListAddon_FullMethodName = "/clientrpc.MaliceRPC/ListAddon" - MaliceRPC_LoadAddon_FullMethodName = "/clientrpc.MaliceRPC/LoadAddon" - MaliceRPC_ExecuteAddon_FullMethodName = "/clientrpc.MaliceRPC/ExecuteAddon" - MaliceRPC_Clear_FullMethodName = "/clientrpc.MaliceRPC/Clear" - MaliceRPC_CancelTask_FullMethodName = "/clientrpc.MaliceRPC/CancelTask" - MaliceRPC_Polling_FullMethodName = "/clientrpc.MaliceRPC/Polling" - MaliceRPC_Upload_FullMethodName = "/clientrpc.MaliceRPC/Upload" - MaliceRPC_Download_FullMethodName = "/clientrpc.MaliceRPC/Download" - MaliceRPC_Sync_FullMethodName = "/clientrpc.MaliceRPC/Sync" - MaliceRPC_Pwd_FullMethodName = "/clientrpc.MaliceRPC/Pwd" - MaliceRPC_Ls_FullMethodName = "/clientrpc.MaliceRPC/Ls" - MaliceRPC_Cd_FullMethodName = "/clientrpc.MaliceRPC/Cd" - MaliceRPC_Rm_FullMethodName = "/clientrpc.MaliceRPC/Rm" - MaliceRPC_Mv_FullMethodName = "/clientrpc.MaliceRPC/Mv" - MaliceRPC_Cp_FullMethodName = "/clientrpc.MaliceRPC/Cp" - MaliceRPC_Cat_FullMethodName = "/clientrpc.MaliceRPC/Cat" - MaliceRPC_Mkdir_FullMethodName = "/clientrpc.MaliceRPC/Mkdir" - MaliceRPC_Chmod_FullMethodName = "/clientrpc.MaliceRPC/Chmod" - MaliceRPC_Chown_FullMethodName = "/clientrpc.MaliceRPC/Chown" - MaliceRPC_Kill_FullMethodName = "/clientrpc.MaliceRPC/Kill" - MaliceRPC_Ps_FullMethodName = "/clientrpc.MaliceRPC/Ps" - MaliceRPC_Netstat_FullMethodName = "/clientrpc.MaliceRPC/Netstat" - MaliceRPC_Curl_FullMethodName = "/clientrpc.MaliceRPC/Curl" - MaliceRPC_Env_FullMethodName = "/clientrpc.MaliceRPC/Env" - MaliceRPC_SetEnv_FullMethodName = "/clientrpc.MaliceRPC/SetEnv" - MaliceRPC_UnsetEnv_FullMethodName = "/clientrpc.MaliceRPC/UnsetEnv" - MaliceRPC_Whoami_FullMethodName = "/clientrpc.MaliceRPC/Whoami" - MaliceRPC_Info_FullMethodName = "/clientrpc.MaliceRPC/Info" - MaliceRPC_Bypass_FullMethodName = "/clientrpc.MaliceRPC/Bypass" - MaliceRPC_RegQuery_FullMethodName = "/clientrpc.MaliceRPC/RegQuery" - MaliceRPC_RegAdd_FullMethodName = "/clientrpc.MaliceRPC/RegAdd" - MaliceRPC_RegDelete_FullMethodName = "/clientrpc.MaliceRPC/RegDelete" - MaliceRPC_RegListKey_FullMethodName = "/clientrpc.MaliceRPC/RegListKey" - MaliceRPC_RegListValue_FullMethodName = "/clientrpc.MaliceRPC/RegListValue" - MaliceRPC_ServiceList_FullMethodName = "/clientrpc.MaliceRPC/ServiceList" - MaliceRPC_ServiceCreate_FullMethodName = "/clientrpc.MaliceRPC/ServiceCreate" - MaliceRPC_ServiceStart_FullMethodName = "/clientrpc.MaliceRPC/ServiceStart" - MaliceRPC_ServiceStop_FullMethodName = "/clientrpc.MaliceRPC/ServiceStop" - MaliceRPC_ServiceQuery_FullMethodName = "/clientrpc.MaliceRPC/ServiceQuery" - MaliceRPC_ServiceDelete_FullMethodName = "/clientrpc.MaliceRPC/ServiceDelete" - MaliceRPC_TaskSchdList_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdList" - MaliceRPC_TaskSchdCreate_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdCreate" - MaliceRPC_TaskSchdStart_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdStart" - MaliceRPC_TaskSchdStop_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdStop" - MaliceRPC_TaskSchdDelete_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdDelete" - MaliceRPC_TaskSchdQuery_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdQuery" - MaliceRPC_TaskSchdRun_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdRun" - MaliceRPC_WmiQuery_FullMethodName = "/clientrpc.MaliceRPC/WmiQuery" - MaliceRPC_WmiExecute_FullMethodName = "/clientrpc.MaliceRPC/WmiExecute" - MaliceRPC_Runas_FullMethodName = "/clientrpc.MaliceRPC/Runas" - MaliceRPC_Privs_FullMethodName = "/clientrpc.MaliceRPC/Privs" - MaliceRPC_GetSystem_FullMethodName = "/clientrpc.MaliceRPC/GetSystem" - MaliceRPC_PipeUpload_FullMethodName = "/clientrpc.MaliceRPC/PipeUpload" - MaliceRPC_PipeRead_FullMethodName = "/clientrpc.MaliceRPC/PipeRead" - MaliceRPC_PipeClose_FullMethodName = "/clientrpc.MaliceRPC/PipeClose" - MaliceRPC_Execute_FullMethodName = "/clientrpc.MaliceRPC/Execute" - MaliceRPC_ExecuteSpawn_FullMethodName = "/clientrpc.MaliceRPC/ExecuteSpawn" - MaliceRPC_ExecuteAssembly_FullMethodName = "/clientrpc.MaliceRPC/ExecuteAssembly" - MaliceRPC_ExecutePowerpick_FullMethodName = "/clientrpc.MaliceRPC/ExecutePowerpick" - MaliceRPC_ExecuteEXE_FullMethodName = "/clientrpc.MaliceRPC/ExecuteEXE" - MaliceRPC_ExecuteDLL_FullMethodName = "/clientrpc.MaliceRPC/ExecuteDLL" - MaliceRPC_ExecuteArmory_FullMethodName = "/clientrpc.MaliceRPC/ExecuteArmory" - MaliceRPC_ExecuteShellcode_FullMethodName = "/clientrpc.MaliceRPC/ExecuteShellcode" - MaliceRPC_ExecuteBof_FullMethodName = "/clientrpc.MaliceRPC/ExecuteBof" - MaliceRPC_ExecuteLocal_FullMethodName = "/clientrpc.MaliceRPC/ExecuteLocal" - MaliceRPC_InlineLocal_FullMethodName = "/clientrpc.MaliceRPC/InlineLocal" - MaliceRPC_EXE2Shellcode_FullMethodName = "/clientrpc.MaliceRPC/EXE2Shellcode" - MaliceRPC_DLL2Shellcode_FullMethodName = "/clientrpc.MaliceRPC/DLL2Shellcode" - MaliceRPC_ShellcodeEncode_FullMethodName = "/clientrpc.MaliceRPC/ShellcodeEncode" - MaliceRPC_ListJobs_FullMethodName = "/clientrpc.MaliceRPC/ListJobs" - MaliceRPC_NewProfile_FullMethodName = "/clientrpc.MaliceRPC/NewProfile" - MaliceRPC_GetProfiles_FullMethodName = "/clientrpc.MaliceRPC/GetProfiles" - MaliceRPC_DeleteProfile_FullMethodName = "/clientrpc.MaliceRPC/DeleteProfile" - MaliceRPC_UpdateProfile_FullMethodName = "/clientrpc.MaliceRPC/UpdateProfile" - MaliceRPC_Build_FullMethodName = "/clientrpc.MaliceRPC/Build" - MaliceRPC_BuildModules_FullMethodName = "/clientrpc.MaliceRPC/BuildModules" - MaliceRPC_BuildLog_FullMethodName = "/clientrpc.MaliceRPC/BuildLog" - MaliceRPC_ListBuilder_FullMethodName = "/clientrpc.MaliceRPC/ListBuilder" - MaliceRPC_GetArtifactsByProfile_FullMethodName = "/clientrpc.MaliceRPC/GetArtifactsByProfile" - MaliceRPC_DownloadArtifact_FullMethodName = "/clientrpc.MaliceRPC/DownloadArtifact" - MaliceRPC_UploadArtifact_FullMethodName = "/clientrpc.MaliceRPC/UploadArtifact" - MaliceRPC_FindArtifact_FullMethodName = "/clientrpc.MaliceRPC/FindArtifact" - MaliceRPC_DeleteArtifact_FullMethodName = "/clientrpc.MaliceRPC/DeleteArtifact" - MaliceRPC_MaleficSRDI_FullMethodName = "/clientrpc.MaliceRPC/MaleficSRDI" - MaliceRPC_DockerStatus_FullMethodName = "/clientrpc.MaliceRPC/DockerStatus" - MaliceRPC_TriggerWorkflowDispatch_FullMethodName = "/clientrpc.MaliceRPC/TriggerWorkflowDispatch" - MaliceRPC_WorkflowStatus_FullMethodName = "/clientrpc.MaliceRPC/WorkflowStatus" - MaliceRPC_UpdateGithubConfig_FullMethodName = "/clientrpc.MaliceRPC/UpdateGithubConfig" - MaliceRPC_GetGithubConfig_FullMethodName = "/clientrpc.MaliceRPC/GetGithubConfig" - MaliceRPC_UpdateNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/UpdateNotifyConfig" - MaliceRPC_GetNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/GetNotifyConfig" - MaliceRPC_RefreshConfig_FullMethodName = "/clientrpc.MaliceRPC/RefreshConfig" + MaliceRPC_LoginClient_FullMethodName = "/clientrpc.MaliceRPC/LoginClient" + MaliceRPC_GetBasic_FullMethodName = "/clientrpc.MaliceRPC/GetBasic" + MaliceRPC_GetClients_FullMethodName = "/clientrpc.MaliceRPC/GetClients" + MaliceRPC_GetSessions_FullMethodName = "/clientrpc.MaliceRPC/GetSessions" + MaliceRPC_GetSession_FullMethodName = "/clientrpc.MaliceRPC/GetSession" + MaliceRPC_GetSessionHistory_FullMethodName = "/clientrpc.MaliceRPC/GetSessionHistory" + MaliceRPC_SessionManage_FullMethodName = "/clientrpc.MaliceRPC/SessionManage" + MaliceRPC_GetListeners_FullMethodName = "/clientrpc.MaliceRPC/GetListeners" + MaliceRPC_GetPipelines_FullMethodName = "/clientrpc.MaliceRPC/GetPipelines" + MaliceRPC_GetJobs_FullMethodName = "/clientrpc.MaliceRPC/GetJobs" + MaliceRPC_GetTasks_FullMethodName = "/clientrpc.MaliceRPC/GetTasks" + MaliceRPC_GetTaskContent_FullMethodName = "/clientrpc.MaliceRPC/GetTaskContent" + MaliceRPC_GetTaskFiles_FullMethodName = "/clientrpc.MaliceRPC/GetTaskFiles" + MaliceRPC_WaitTaskContent_FullMethodName = "/clientrpc.MaliceRPC/WaitTaskContent" + MaliceRPC_WaitTaskFinish_FullMethodName = "/clientrpc.MaliceRPC/WaitTaskFinish" + MaliceRPC_GetAllTaskContent_FullMethodName = "/clientrpc.MaliceRPC/GetAllTaskContent" + MaliceRPC_GetFiles_FullMethodName = "/clientrpc.MaliceRPC/GetFiles" + MaliceRPC_GetAllDownloadFiles_FullMethodName = "/clientrpc.MaliceRPC/GetAllDownloadFiles" + MaliceRPC_Events_FullMethodName = "/clientrpc.MaliceRPC/Events" + MaliceRPC_Broadcast_FullMethodName = "/clientrpc.MaliceRPC/Broadcast" + MaliceRPC_Notify_FullMethodName = "/clientrpc.MaliceRPC/Notify" + MaliceRPC_GetEvent_FullMethodName = "/clientrpc.MaliceRPC/GetEvent" + MaliceRPC_SessionEvent_FullMethodName = "/clientrpc.MaliceRPC/SessionEvent" + MaliceRPC_OnHook_FullMethodName = "/clientrpc.MaliceRPC/OnHook" + MaliceRPC_Ping_FullMethodName = "/clientrpc.MaliceRPC/Ping" + MaliceRPC_Sleep_FullMethodName = "/clientrpc.MaliceRPC/Sleep" + MaliceRPC_Suicide_FullMethodName = "/clientrpc.MaliceRPC/Suicide" + MaliceRPC_ListModule_FullMethodName = "/clientrpc.MaliceRPC/ListModule" + MaliceRPC_LoadModule_FullMethodName = "/clientrpc.MaliceRPC/LoadModule" + MaliceRPC_RefreshModule_FullMethodName = "/clientrpc.MaliceRPC/RefreshModule" + MaliceRPC_ListAddon_FullMethodName = "/clientrpc.MaliceRPC/ListAddon" + MaliceRPC_LoadAddon_FullMethodName = "/clientrpc.MaliceRPC/LoadAddon" + MaliceRPC_ExecuteAddon_FullMethodName = "/clientrpc.MaliceRPC/ExecuteAddon" + MaliceRPC_Clear_FullMethodName = "/clientrpc.MaliceRPC/Clear" + MaliceRPC_CancelTask_FullMethodName = "/clientrpc.MaliceRPC/CancelTask" + MaliceRPC_Polling_FullMethodName = "/clientrpc.MaliceRPC/Polling" + MaliceRPC_Upload_FullMethodName = "/clientrpc.MaliceRPC/Upload" + MaliceRPC_Download_FullMethodName = "/clientrpc.MaliceRPC/Download" + MaliceRPC_Sync_FullMethodName = "/clientrpc.MaliceRPC/Sync" + MaliceRPC_Pwd_FullMethodName = "/clientrpc.MaliceRPC/Pwd" + MaliceRPC_Ls_FullMethodName = "/clientrpc.MaliceRPC/Ls" + MaliceRPC_Cd_FullMethodName = "/clientrpc.MaliceRPC/Cd" + MaliceRPC_Rm_FullMethodName = "/clientrpc.MaliceRPC/Rm" + MaliceRPC_Mv_FullMethodName = "/clientrpc.MaliceRPC/Mv" + MaliceRPC_Cp_FullMethodName = "/clientrpc.MaliceRPC/Cp" + MaliceRPC_Cat_FullMethodName = "/clientrpc.MaliceRPC/Cat" + MaliceRPC_Mkdir_FullMethodName = "/clientrpc.MaliceRPC/Mkdir" + MaliceRPC_Chmod_FullMethodName = "/clientrpc.MaliceRPC/Chmod" + MaliceRPC_Chown_FullMethodName = "/clientrpc.MaliceRPC/Chown" + MaliceRPC_Kill_FullMethodName = "/clientrpc.MaliceRPC/Kill" + MaliceRPC_Ps_FullMethodName = "/clientrpc.MaliceRPC/Ps" + MaliceRPC_Netstat_FullMethodName = "/clientrpc.MaliceRPC/Netstat" + MaliceRPC_Curl_FullMethodName = "/clientrpc.MaliceRPC/Curl" + MaliceRPC_Env_FullMethodName = "/clientrpc.MaliceRPC/Env" + MaliceRPC_SetEnv_FullMethodName = "/clientrpc.MaliceRPC/SetEnv" + MaliceRPC_UnsetEnv_FullMethodName = "/clientrpc.MaliceRPC/UnsetEnv" + MaliceRPC_Whoami_FullMethodName = "/clientrpc.MaliceRPC/Whoami" + MaliceRPC_Info_FullMethodName = "/clientrpc.MaliceRPC/Info" + MaliceRPC_Bypass_FullMethodName = "/clientrpc.MaliceRPC/Bypass" + MaliceRPC_RegQuery_FullMethodName = "/clientrpc.MaliceRPC/RegQuery" + MaliceRPC_RegAdd_FullMethodName = "/clientrpc.MaliceRPC/RegAdd" + MaliceRPC_RegDelete_FullMethodName = "/clientrpc.MaliceRPC/RegDelete" + MaliceRPC_RegListKey_FullMethodName = "/clientrpc.MaliceRPC/RegListKey" + MaliceRPC_RegListValue_FullMethodName = "/clientrpc.MaliceRPC/RegListValue" + MaliceRPC_ServiceList_FullMethodName = "/clientrpc.MaliceRPC/ServiceList" + MaliceRPC_ServiceCreate_FullMethodName = "/clientrpc.MaliceRPC/ServiceCreate" + MaliceRPC_ServiceStart_FullMethodName = "/clientrpc.MaliceRPC/ServiceStart" + MaliceRPC_ServiceStop_FullMethodName = "/clientrpc.MaliceRPC/ServiceStop" + MaliceRPC_ServiceQuery_FullMethodName = "/clientrpc.MaliceRPC/ServiceQuery" + MaliceRPC_ServiceDelete_FullMethodName = "/clientrpc.MaliceRPC/ServiceDelete" + MaliceRPC_TaskSchdList_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdList" + MaliceRPC_TaskSchdCreate_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdCreate" + MaliceRPC_TaskSchdStart_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdStart" + MaliceRPC_TaskSchdStop_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdStop" + MaliceRPC_TaskSchdDelete_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdDelete" + MaliceRPC_TaskSchdQuery_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdQuery" + MaliceRPC_TaskSchdRun_FullMethodName = "/clientrpc.MaliceRPC/TaskSchdRun" + MaliceRPC_WmiQuery_FullMethodName = "/clientrpc.MaliceRPC/WmiQuery" + MaliceRPC_WmiExecute_FullMethodName = "/clientrpc.MaliceRPC/WmiExecute" + MaliceRPC_Runas_FullMethodName = "/clientrpc.MaliceRPC/Runas" + MaliceRPC_Privs_FullMethodName = "/clientrpc.MaliceRPC/Privs" + MaliceRPC_GetSystem_FullMethodName = "/clientrpc.MaliceRPC/GetSystem" + MaliceRPC_PipeUpload_FullMethodName = "/clientrpc.MaliceRPC/PipeUpload" + MaliceRPC_PipeRead_FullMethodName = "/clientrpc.MaliceRPC/PipeRead" + MaliceRPC_PipeClose_FullMethodName = "/clientrpc.MaliceRPC/PipeClose" + MaliceRPC_Execute_FullMethodName = "/clientrpc.MaliceRPC/Execute" + MaliceRPC_ExecuteSpawn_FullMethodName = "/clientrpc.MaliceRPC/ExecuteSpawn" + MaliceRPC_ExecuteAssembly_FullMethodName = "/clientrpc.MaliceRPC/ExecuteAssembly" + MaliceRPC_ExecutePowerpick_FullMethodName = "/clientrpc.MaliceRPC/ExecutePowerpick" + MaliceRPC_ExecuteEXE_FullMethodName = "/clientrpc.MaliceRPC/ExecuteEXE" + MaliceRPC_ExecuteDLL_FullMethodName = "/clientrpc.MaliceRPC/ExecuteDLL" + MaliceRPC_ExecuteArmory_FullMethodName = "/clientrpc.MaliceRPC/ExecuteArmory" + MaliceRPC_ExecuteShellcode_FullMethodName = "/clientrpc.MaliceRPC/ExecuteShellcode" + MaliceRPC_ExecuteBof_FullMethodName = "/clientrpc.MaliceRPC/ExecuteBof" + MaliceRPC_ExecuteLocal_FullMethodName = "/clientrpc.MaliceRPC/ExecuteLocal" + MaliceRPC_InlineLocal_FullMethodName = "/clientrpc.MaliceRPC/InlineLocal" + MaliceRPC_EXE2Shellcode_FullMethodName = "/clientrpc.MaliceRPC/EXE2Shellcode" + MaliceRPC_DLL2Shellcode_FullMethodName = "/clientrpc.MaliceRPC/DLL2Shellcode" + MaliceRPC_ShellcodeEncode_FullMethodName = "/clientrpc.MaliceRPC/ShellcodeEncode" + MaliceRPC_ListJobs_FullMethodName = "/clientrpc.MaliceRPC/ListJobs" + MaliceRPC_GetProfiles_FullMethodName = "/clientrpc.MaliceRPC/GetProfiles" + MaliceRPC_DeleteProfile_FullMethodName = "/clientrpc.MaliceRPC/DeleteProfile" + MaliceRPC_UpdateProfile_FullMethodName = "/clientrpc.MaliceRPC/UpdateProfile" + MaliceRPC_BuildModules_FullMethodName = "/clientrpc.MaliceRPC/BuildModules" + MaliceRPC_BuildLog_FullMethodName = "/clientrpc.MaliceRPC/BuildLog" + MaliceRPC_ListBuilder_FullMethodName = "/clientrpc.MaliceRPC/ListBuilder" + MaliceRPC_GetArtifactsByProfile_FullMethodName = "/clientrpc.MaliceRPC/GetArtifactsByProfile" + MaliceRPC_DownloadArtifact_FullMethodName = "/clientrpc.MaliceRPC/DownloadArtifact" + MaliceRPC_UploadArtifact_FullMethodName = "/clientrpc.MaliceRPC/UploadArtifact" + MaliceRPC_DeleteArtifact_FullMethodName = "/clientrpc.MaliceRPC/DeleteArtifact" + MaliceRPC_MaleficSRDI_FullMethodName = "/clientrpc.MaliceRPC/MaleficSRDI" + MaliceRPC_UpdateGithubConfig_FullMethodName = "/clientrpc.MaliceRPC/UpdateGithubConfig" + MaliceRPC_GetGithubConfig_FullMethodName = "/clientrpc.MaliceRPC/GetGithubConfig" + MaliceRPC_UpdateNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/UpdateNotifyConfig" + MaliceRPC_GetNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/GetNotifyConfig" + MaliceRPC_RefreshConfig_FullMethodName = "/clientrpc.MaliceRPC/RefreshConfig" ) // MaliceRPCClient is the client API for MaliceRPC service. @@ -267,24 +261,17 @@ type MaliceRPCClient interface { // jobs ListJobs(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Pipelines, error) // generator - NewProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) GetProfiles(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Profiles, error) DeleteProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) UpdateProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) - Build(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Builder, error) BuildModules(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Artifact, error) BuildLog(ctx context.Context, in *clientpb.Builder, opts ...grpc.CallOption) (*clientpb.Builder, error) ListBuilder(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Builders, error) GetArtifactsByProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Builders, error) DownloadArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) UploadArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Builder, error) - FindArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) DeleteArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Empty, error) MaleficSRDI(ctx context.Context, in *clientpb.Builder, opts ...grpc.CallOption) (*clientpb.Artifact, error) - DockerStatus(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) - // action - TriggerWorkflowDispatch(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Builder, error) - WorkflowStatus(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) // config UpdateGithubConfig(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) GetGithubConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.GithubWorkflowRequest, error) @@ -1224,15 +1211,6 @@ func (c *maliceRPCClient) ListJobs(ctx context.Context, in *clientpb.Empty, opts return out, nil } -func (c *maliceRPCClient) NewProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) { - out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_NewProfile_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *maliceRPCClient) GetProfiles(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Profiles, error) { out := new(clientpb.Profiles) err := c.cc.Invoke(ctx, MaliceRPC_GetProfiles_FullMethodName, in, out, opts...) @@ -1260,15 +1238,6 @@ func (c *maliceRPCClient) UpdateProfile(ctx context.Context, in *clientpb.Profil return out, nil } -func (c *maliceRPCClient) Build(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Builder, error) { - out := new(clientpb.Builder) - err := c.cc.Invoke(ctx, MaliceRPC_Build_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *maliceRPCClient) BuildModules(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Artifact, error) { out := new(clientpb.Artifact) err := c.cc.Invoke(ctx, MaliceRPC_BuildModules_FullMethodName, in, out, opts...) @@ -1323,15 +1292,6 @@ func (c *maliceRPCClient) UploadArtifact(ctx context.Context, in *clientpb.Artif return out, nil } -func (c *maliceRPCClient) FindArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) { - out := new(clientpb.Artifact) - err := c.cc.Invoke(ctx, MaliceRPC_FindArtifact_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *maliceRPCClient) DeleteArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Empty, error) { out := new(clientpb.Empty) err := c.cc.Invoke(ctx, MaliceRPC_DeleteArtifact_FullMethodName, in, out, opts...) @@ -1350,33 +1310,6 @@ func (c *maliceRPCClient) MaleficSRDI(ctx context.Context, in *clientpb.Builder, return out, nil } -func (c *maliceRPCClient) DockerStatus(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) { - out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_DockerStatus_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maliceRPCClient) TriggerWorkflowDispatch(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Builder, error) { - out := new(clientpb.Builder) - err := c.cc.Invoke(ctx, MaliceRPC_TriggerWorkflowDispatch_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maliceRPCClient) WorkflowStatus(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) { - out := new(clientpb.Empty) - err := c.cc.Invoke(ctx, MaliceRPC_WorkflowStatus_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *maliceRPCClient) UpdateGithubConfig(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) { out := new(clientpb.Empty) err := c.cc.Invoke(ctx, MaliceRPC_UpdateGithubConfig_FullMethodName, in, out, opts...) @@ -1543,24 +1476,17 @@ type MaliceRPCServer interface { // jobs ListJobs(context.Context, *clientpb.Empty) (*clientpb.Pipelines, error) // generator - NewProfile(context.Context, *clientpb.Profile) (*clientpb.Empty, error) GetProfiles(context.Context, *clientpb.Empty) (*clientpb.Profiles, error) DeleteProfile(context.Context, *clientpb.Profile) (*clientpb.Empty, error) UpdateProfile(context.Context, *clientpb.Profile) (*clientpb.Empty, error) - Build(context.Context, *clientpb.Generate) (*clientpb.Builder, error) BuildModules(context.Context, *clientpb.Generate) (*clientpb.Artifact, error) BuildLog(context.Context, *clientpb.Builder) (*clientpb.Builder, error) ListBuilder(context.Context, *clientpb.Empty) (*clientpb.Builders, error) GetArtifactsByProfile(context.Context, *clientpb.Profile) (*clientpb.Builders, error) DownloadArtifact(context.Context, *clientpb.Artifact) (*clientpb.Artifact, error) UploadArtifact(context.Context, *clientpb.Artifact) (*clientpb.Builder, error) - FindArtifact(context.Context, *clientpb.Artifact) (*clientpb.Artifact, error) DeleteArtifact(context.Context, *clientpb.Artifact) (*clientpb.Empty, error) MaleficSRDI(context.Context, *clientpb.Builder) (*clientpb.Artifact, error) - DockerStatus(context.Context, *clientpb.Empty) (*clientpb.Empty, error) - // action - TriggerWorkflowDispatch(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Builder, error) - WorkflowStatus(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) // config UpdateGithubConfig(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) GetGithubConfig(context.Context, *clientpb.Empty) (*clientpb.GithubWorkflowRequest, error) @@ -1874,9 +1800,6 @@ func (UnimplementedMaliceRPCServer) ShellcodeEncode(context.Context, *clientpb.S func (UnimplementedMaliceRPCServer) ListJobs(context.Context, *clientpb.Empty) (*clientpb.Pipelines, error) { return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") } -func (UnimplementedMaliceRPCServer) NewProfile(context.Context, *clientpb.Profile) (*clientpb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method NewProfile not implemented") -} func (UnimplementedMaliceRPCServer) GetProfiles(context.Context, *clientpb.Empty) (*clientpb.Profiles, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProfiles not implemented") } @@ -1886,9 +1809,6 @@ func (UnimplementedMaliceRPCServer) DeleteProfile(context.Context, *clientpb.Pro func (UnimplementedMaliceRPCServer) UpdateProfile(context.Context, *clientpb.Profile) (*clientpb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateProfile not implemented") } -func (UnimplementedMaliceRPCServer) Build(context.Context, *clientpb.Generate) (*clientpb.Builder, error) { - return nil, status.Errorf(codes.Unimplemented, "method Build not implemented") -} func (UnimplementedMaliceRPCServer) BuildModules(context.Context, *clientpb.Generate) (*clientpb.Artifact, error) { return nil, status.Errorf(codes.Unimplemented, "method BuildModules not implemented") } @@ -1907,24 +1827,12 @@ func (UnimplementedMaliceRPCServer) DownloadArtifact(context.Context, *clientpb. func (UnimplementedMaliceRPCServer) UploadArtifact(context.Context, *clientpb.Artifact) (*clientpb.Builder, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadArtifact not implemented") } -func (UnimplementedMaliceRPCServer) FindArtifact(context.Context, *clientpb.Artifact) (*clientpb.Artifact, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindArtifact not implemented") -} func (UnimplementedMaliceRPCServer) DeleteArtifact(context.Context, *clientpb.Artifact) (*clientpb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteArtifact not implemented") } func (UnimplementedMaliceRPCServer) MaleficSRDI(context.Context, *clientpb.Builder) (*clientpb.Artifact, error) { return nil, status.Errorf(codes.Unimplemented, "method MaleficSRDI not implemented") } -func (UnimplementedMaliceRPCServer) DockerStatus(context.Context, *clientpb.Empty) (*clientpb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DockerStatus not implemented") -} -func (UnimplementedMaliceRPCServer) TriggerWorkflowDispatch(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Builder, error) { - return nil, status.Errorf(codes.Unimplemented, "method TriggerWorkflowDispatch not implemented") -} -func (UnimplementedMaliceRPCServer) WorkflowStatus(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method WorkflowStatus not implemented") -} func (UnimplementedMaliceRPCServer) UpdateGithubConfig(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGithubConfig not implemented") } @@ -3756,24 +3664,6 @@ func _MaliceRPC_ListJobs_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _MaliceRPC_NewProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(clientpb.Profile) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaliceRPCServer).NewProfile(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MaliceRPC_NewProfile_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaliceRPCServer).NewProfile(ctx, req.(*clientpb.Profile)) - } - return interceptor(ctx, in, info, handler) -} - func _MaliceRPC_GetProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.Empty) if err := dec(in); err != nil { @@ -3828,24 +3718,6 @@ func _MaliceRPC_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _MaliceRPC_Build_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(clientpb.Generate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaliceRPCServer).Build(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MaliceRPC_Build_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaliceRPCServer).Build(ctx, req.(*clientpb.Generate)) - } - return interceptor(ctx, in, info, handler) -} - func _MaliceRPC_BuildModules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.Generate) if err := dec(in); err != nil { @@ -3954,24 +3826,6 @@ func _MaliceRPC_UploadArtifact_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _MaliceRPC_FindArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(clientpb.Artifact) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaliceRPCServer).FindArtifact(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MaliceRPC_FindArtifact_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaliceRPCServer).FindArtifact(ctx, req.(*clientpb.Artifact)) - } - return interceptor(ctx, in, info, handler) -} - func _MaliceRPC_DeleteArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.Artifact) if err := dec(in); err != nil { @@ -4008,60 +3862,6 @@ func _MaliceRPC_MaleficSRDI_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _MaliceRPC_DockerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(clientpb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaliceRPCServer).DockerStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MaliceRPC_DockerStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaliceRPCServer).DockerStatus(ctx, req.(*clientpb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _MaliceRPC_TriggerWorkflowDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(clientpb.GithubWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaliceRPCServer).TriggerWorkflowDispatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MaliceRPC_TriggerWorkflowDispatch_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaliceRPCServer).TriggerWorkflowDispatch(ctx, req.(*clientpb.GithubWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MaliceRPC_WorkflowStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(clientpb.GithubWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaliceRPCServer).WorkflowStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MaliceRPC_WorkflowStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaliceRPCServer).WorkflowStatus(ctx, req.(*clientpb.GithubWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _MaliceRPC_UpdateGithubConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.GithubWorkflowRequest) if err := dec(in); err != nil { @@ -4555,10 +4355,6 @@ var MaliceRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListJobs", Handler: _MaliceRPC_ListJobs_Handler, }, - { - MethodName: "NewProfile", - Handler: _MaliceRPC_NewProfile_Handler, - }, { MethodName: "GetProfiles", Handler: _MaliceRPC_GetProfiles_Handler, @@ -4571,10 +4367,6 @@ var MaliceRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateProfile", Handler: _MaliceRPC_UpdateProfile_Handler, }, - { - MethodName: "Build", - Handler: _MaliceRPC_Build_Handler, - }, { MethodName: "BuildModules", Handler: _MaliceRPC_BuildModules_Handler, @@ -4599,10 +4391,6 @@ var MaliceRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "UploadArtifact", Handler: _MaliceRPC_UploadArtifact_Handler, }, - { - MethodName: "FindArtifact", - Handler: _MaliceRPC_FindArtifact_Handler, - }, { MethodName: "DeleteArtifact", Handler: _MaliceRPC_DeleteArtifact_Handler, @@ -4611,18 +4399,6 @@ var MaliceRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "MaleficSRDI", Handler: _MaliceRPC_MaleficSRDI_Handler, }, - { - MethodName: "DockerStatus", - Handler: _MaliceRPC_DockerStatus_Handler, - }, - { - MethodName: "TriggerWorkflowDispatch", - Handler: _MaliceRPC_TriggerWorkflowDispatch_Handler, - }, - { - MethodName: "WorkflowStatus", - Handler: _MaliceRPC_WorkflowStatus_Handler, - }, { MethodName: "UpdateGithubConfig", Handler: _MaliceRPC_UpdateGithubConfig_Handler, diff --git a/helper/proto/services/listenerrpc/service.pb.go b/helper/proto/services/listenerrpc/service.pb.go index 1b50a7e9..50026409 100644 --- a/helper/proto/services/listenerrpc/service.pb.go +++ b/helper/proto/services/listenerrpc/service.pb.go @@ -31,7 +31,7 @@ var file_services_listenerrpc_service_proto_rawDesc = []byte{ 0x70, 0x62, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, - 0x84, 0x0c, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x50, 0x43, 0x12, + 0xe3, 0x0e, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x50, 0x43, 0x12, 0x42, 0x0a, 0x0b, 0x53, 0x70, 0x69, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x70, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x16, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, @@ -124,36 +124,62 @@ var file_services_listenerrpc_service_proto_rawDesc = []byte{ 0x73, 0x74, 0x52, 0x65, 0x6d, 0x73, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, - 0x35, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x30, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x11, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x36, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x0c, 0x44, 0x6f, 0x63, + 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x17, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x44, 0x69, + 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x72, + 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_services_listenerrpc_service_proto_goTypes = []interface{}{ - (*clientpb.SpiteResponse)(nil), // 0: clientpb.SpiteResponse - (*clientpb.JobStatus)(nil), // 1: clientpb.JobStatus - (*clientpb.RegisterSession)(nil), // 2: clientpb.RegisterSession - (*implantpb.SysInfo)(nil), // 3: modulepb.SysInfo - (*implantpb.Ping)(nil), // 4: modulepb.Ping - (*implantpb.Request)(nil), // 5: modulepb.Request - (*clientpb.RegisterListener)(nil), // 6: clientpb.RegisterListener - (*clientpb.Pipeline)(nil), // 7: clientpb.Pipeline - (*clientpb.CtrlPipeline)(nil), // 8: clientpb.CtrlPipeline - (*clientpb.Listener)(nil), // 9: clientpb.Listener - (*clientpb.Website)(nil), // 10: clientpb.Website - (*clientpb.WebContent)(nil), // 11: clientpb.WebContent - (*clientpb.Artifact)(nil), // 12: clientpb.Artifact - (*clientpb.SpiteRequest)(nil), // 13: clientpb.SpiteRequest - (*clientpb.JobCtrl)(nil), // 14: clientpb.JobCtrl - (*clientpb.Empty)(nil), // 15: clientpb.Empty - (*clientpb.Pipelines)(nil), // 16: clientpb.Pipelines - (*clientpb.WebContents)(nil), // 17: clientpb.WebContents + (*clientpb.SpiteResponse)(nil), // 0: clientpb.SpiteResponse + (*clientpb.JobStatus)(nil), // 1: clientpb.JobStatus + (*clientpb.RegisterSession)(nil), // 2: clientpb.RegisterSession + (*implantpb.SysInfo)(nil), // 3: modulepb.SysInfo + (*implantpb.Ping)(nil), // 4: modulepb.Ping + (*implantpb.Request)(nil), // 5: modulepb.Request + (*clientpb.RegisterListener)(nil), // 6: clientpb.RegisterListener + (*clientpb.Pipeline)(nil), // 7: clientpb.Pipeline + (*clientpb.CtrlPipeline)(nil), // 8: clientpb.CtrlPipeline + (*clientpb.Listener)(nil), // 9: clientpb.Listener + (*clientpb.Website)(nil), // 10: clientpb.Website + (*clientpb.WebContent)(nil), // 11: clientpb.WebContent + (*clientpb.Profile)(nil), // 12: clientpb.Profile + (*clientpb.Artifact)(nil), // 13: clientpb.Artifact + (*clientpb.Generate)(nil), // 14: clientpb.Generate + (*clientpb.Empty)(nil), // 15: clientpb.Empty + (*clientpb.GithubWorkflowRequest)(nil), // 16: clientpb.GithubWorkflowRequest + (*clientpb.SpiteRequest)(nil), // 17: clientpb.SpiteRequest + (*clientpb.JobCtrl)(nil), // 18: clientpb.JobCtrl + (*clientpb.Pipelines)(nil), // 19: clientpb.Pipelines + (*clientpb.WebContents)(nil), // 20: clientpb.WebContents + (*clientpb.Builder)(nil), // 21: clientpb.Builder } var file_services_listenerrpc_service_proto_depIdxs = []int32{ 0, // 0: listenerrpc.ListenerRPC.SpiteStream:input_type -> clientpb.SpiteResponse @@ -182,36 +208,48 @@ var file_services_listenerrpc_service_proto_depIdxs = []int32{ 8, // 23: listenerrpc.ListenerRPC.StopRem:input_type -> clientpb.CtrlPipeline 8, // 24: listenerrpc.ListenerRPC.DeleteRem:input_type -> clientpb.CtrlPipeline 9, // 25: listenerrpc.ListenerRPC.ListRems:input_type -> clientpb.Listener - 12, // 26: listenerrpc.ListenerRPC.GetArtifact:input_type -> clientpb.Artifact - 13, // 27: listenerrpc.ListenerRPC.SpiteStream:output_type -> clientpb.SpiteRequest - 14, // 28: listenerrpc.ListenerRPC.JobStream:output_type -> clientpb.JobCtrl - 15, // 29: listenerrpc.ListenerRPC.Register:output_type -> clientpb.Empty - 15, // 30: listenerrpc.ListenerRPC.SysInfo:output_type -> clientpb.Empty - 15, // 31: listenerrpc.ListenerRPC.Checkin:output_type -> clientpb.Empty - 15, // 32: listenerrpc.ListenerRPC.InitBindSession:output_type -> clientpb.Empty - 15, // 33: listenerrpc.ListenerRPC.RegisterListener:output_type -> clientpb.Empty - 15, // 34: listenerrpc.ListenerRPC.RegisterPipeline:output_type -> clientpb.Empty - 15, // 35: listenerrpc.ListenerRPC.StartPipeline:output_type -> clientpb.Empty - 15, // 36: listenerrpc.ListenerRPC.StopPipeline:output_type -> clientpb.Empty - 15, // 37: listenerrpc.ListenerRPC.DeletePipeline:output_type -> clientpb.Empty - 16, // 38: listenerrpc.ListenerRPC.ListPipelines:output_type -> clientpb.Pipelines - 15, // 39: listenerrpc.ListenerRPC.RegisterWebsite:output_type -> clientpb.Empty - 15, // 40: listenerrpc.ListenerRPC.StartWebsite:output_type -> clientpb.Empty - 15, // 41: listenerrpc.ListenerRPC.StopWebsite:output_type -> clientpb.Empty - 15, // 42: listenerrpc.ListenerRPC.DeleteWebsite:output_type -> clientpb.Empty - 16, // 43: listenerrpc.ListenerRPC.ListWebsites:output_type -> clientpb.Pipelines - 17, // 44: listenerrpc.ListenerRPC.ListWebContent:output_type -> clientpb.WebContents - 15, // 45: listenerrpc.ListenerRPC.WebsiteAddContent:output_type -> clientpb.Empty - 15, // 46: listenerrpc.ListenerRPC.WebsiteUpdateContent:output_type -> clientpb.Empty - 15, // 47: listenerrpc.ListenerRPC.WebsiteRemoveContent:output_type -> clientpb.Empty - 15, // 48: listenerrpc.ListenerRPC.RegisterRem:output_type -> clientpb.Empty - 15, // 49: listenerrpc.ListenerRPC.StartRem:output_type -> clientpb.Empty - 15, // 50: listenerrpc.ListenerRPC.StopRem:output_type -> clientpb.Empty - 15, // 51: listenerrpc.ListenerRPC.DeleteRem:output_type -> clientpb.Empty - 16, // 52: listenerrpc.ListenerRPC.ListRems:output_type -> clientpb.Pipelines - 12, // 53: listenerrpc.ListenerRPC.GetArtifact:output_type -> clientpb.Artifact - 27, // [27:54] is the sub-list for method output_type - 0, // [0:27] is the sub-list for method input_type + 12, // 26: listenerrpc.ListenerRPC.NewProfile:input_type -> clientpb.Profile + 13, // 27: listenerrpc.ListenerRPC.FindArtifact:input_type -> clientpb.Artifact + 14, // 28: listenerrpc.ListenerRPC.Build:input_type -> clientpb.Generate + 15, // 29: listenerrpc.ListenerRPC.DockerStatus:input_type -> clientpb.Empty + 16, // 30: listenerrpc.ListenerRPC.TriggerWorkflowDispatch:input_type -> clientpb.GithubWorkflowRequest + 16, // 31: listenerrpc.ListenerRPC.WorkflowStatus:input_type -> clientpb.GithubWorkflowRequest + 13, // 32: listenerrpc.ListenerRPC.GetArtifact:input_type -> clientpb.Artifact + 17, // 33: listenerrpc.ListenerRPC.SpiteStream:output_type -> clientpb.SpiteRequest + 18, // 34: listenerrpc.ListenerRPC.JobStream:output_type -> clientpb.JobCtrl + 15, // 35: listenerrpc.ListenerRPC.Register:output_type -> clientpb.Empty + 15, // 36: listenerrpc.ListenerRPC.SysInfo:output_type -> clientpb.Empty + 15, // 37: listenerrpc.ListenerRPC.Checkin:output_type -> clientpb.Empty + 15, // 38: listenerrpc.ListenerRPC.InitBindSession:output_type -> clientpb.Empty + 15, // 39: listenerrpc.ListenerRPC.RegisterListener:output_type -> clientpb.Empty + 15, // 40: listenerrpc.ListenerRPC.RegisterPipeline:output_type -> clientpb.Empty + 15, // 41: listenerrpc.ListenerRPC.StartPipeline:output_type -> clientpb.Empty + 15, // 42: listenerrpc.ListenerRPC.StopPipeline:output_type -> clientpb.Empty + 15, // 43: listenerrpc.ListenerRPC.DeletePipeline:output_type -> clientpb.Empty + 19, // 44: listenerrpc.ListenerRPC.ListPipelines:output_type -> clientpb.Pipelines + 15, // 45: listenerrpc.ListenerRPC.RegisterWebsite:output_type -> clientpb.Empty + 15, // 46: listenerrpc.ListenerRPC.StartWebsite:output_type -> clientpb.Empty + 15, // 47: listenerrpc.ListenerRPC.StopWebsite:output_type -> clientpb.Empty + 15, // 48: listenerrpc.ListenerRPC.DeleteWebsite:output_type -> clientpb.Empty + 19, // 49: listenerrpc.ListenerRPC.ListWebsites:output_type -> clientpb.Pipelines + 20, // 50: listenerrpc.ListenerRPC.ListWebContent:output_type -> clientpb.WebContents + 15, // 51: listenerrpc.ListenerRPC.WebsiteAddContent:output_type -> clientpb.Empty + 15, // 52: listenerrpc.ListenerRPC.WebsiteUpdateContent:output_type -> clientpb.Empty + 15, // 53: listenerrpc.ListenerRPC.WebsiteRemoveContent:output_type -> clientpb.Empty + 15, // 54: listenerrpc.ListenerRPC.RegisterRem:output_type -> clientpb.Empty + 15, // 55: listenerrpc.ListenerRPC.StartRem:output_type -> clientpb.Empty + 15, // 56: listenerrpc.ListenerRPC.StopRem:output_type -> clientpb.Empty + 15, // 57: listenerrpc.ListenerRPC.DeleteRem:output_type -> clientpb.Empty + 19, // 58: listenerrpc.ListenerRPC.ListRems:output_type -> clientpb.Pipelines + 15, // 59: listenerrpc.ListenerRPC.NewProfile:output_type -> clientpb.Empty + 13, // 60: listenerrpc.ListenerRPC.FindArtifact:output_type -> clientpb.Artifact + 21, // 61: listenerrpc.ListenerRPC.Build:output_type -> clientpb.Builder + 15, // 62: listenerrpc.ListenerRPC.DockerStatus:output_type -> clientpb.Empty + 21, // 63: listenerrpc.ListenerRPC.TriggerWorkflowDispatch:output_type -> clientpb.Builder + 15, // 64: listenerrpc.ListenerRPC.WorkflowStatus:output_type -> clientpb.Empty + 13, // 65: listenerrpc.ListenerRPC.GetArtifact:output_type -> clientpb.Artifact + 33, // [33:66] is the sub-list for method output_type + 0, // [0:33] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/helper/proto/services/listenerrpc/service_grpc.pb.go b/helper/proto/services/listenerrpc/service_grpc.pb.go index 43a059b0..7be43870 100644 --- a/helper/proto/services/listenerrpc/service_grpc.pb.go +++ b/helper/proto/services/listenerrpc/service_grpc.pb.go @@ -21,33 +21,39 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - ListenerRPC_SpiteStream_FullMethodName = "/listenerrpc.ListenerRPC/SpiteStream" - ListenerRPC_JobStream_FullMethodName = "/listenerrpc.ListenerRPC/JobStream" - ListenerRPC_Register_FullMethodName = "/listenerrpc.ListenerRPC/Register" - ListenerRPC_SysInfo_FullMethodName = "/listenerrpc.ListenerRPC/SysInfo" - ListenerRPC_Checkin_FullMethodName = "/listenerrpc.ListenerRPC/Checkin" - ListenerRPC_InitBindSession_FullMethodName = "/listenerrpc.ListenerRPC/InitBindSession" - ListenerRPC_RegisterListener_FullMethodName = "/listenerrpc.ListenerRPC/RegisterListener" - ListenerRPC_RegisterPipeline_FullMethodName = "/listenerrpc.ListenerRPC/RegisterPipeline" - ListenerRPC_StartPipeline_FullMethodName = "/listenerrpc.ListenerRPC/StartPipeline" - ListenerRPC_StopPipeline_FullMethodName = "/listenerrpc.ListenerRPC/StopPipeline" - ListenerRPC_DeletePipeline_FullMethodName = "/listenerrpc.ListenerRPC/DeletePipeline" - ListenerRPC_ListPipelines_FullMethodName = "/listenerrpc.ListenerRPC/ListPipelines" - ListenerRPC_RegisterWebsite_FullMethodName = "/listenerrpc.ListenerRPC/RegisterWebsite" - ListenerRPC_StartWebsite_FullMethodName = "/listenerrpc.ListenerRPC/StartWebsite" - ListenerRPC_StopWebsite_FullMethodName = "/listenerrpc.ListenerRPC/StopWebsite" - ListenerRPC_DeleteWebsite_FullMethodName = "/listenerrpc.ListenerRPC/DeleteWebsite" - ListenerRPC_ListWebsites_FullMethodName = "/listenerrpc.ListenerRPC/ListWebsites" - ListenerRPC_ListWebContent_FullMethodName = "/listenerrpc.ListenerRPC/ListWebContent" - ListenerRPC_WebsiteAddContent_FullMethodName = "/listenerrpc.ListenerRPC/WebsiteAddContent" - ListenerRPC_WebsiteUpdateContent_FullMethodName = "/listenerrpc.ListenerRPC/WebsiteUpdateContent" - ListenerRPC_WebsiteRemoveContent_FullMethodName = "/listenerrpc.ListenerRPC/WebsiteRemoveContent" - ListenerRPC_RegisterRem_FullMethodName = "/listenerrpc.ListenerRPC/RegisterRem" - ListenerRPC_StartRem_FullMethodName = "/listenerrpc.ListenerRPC/StartRem" - ListenerRPC_StopRem_FullMethodName = "/listenerrpc.ListenerRPC/StopRem" - ListenerRPC_DeleteRem_FullMethodName = "/listenerrpc.ListenerRPC/DeleteRem" - ListenerRPC_ListRems_FullMethodName = "/listenerrpc.ListenerRPC/ListRems" - ListenerRPC_GetArtifact_FullMethodName = "/listenerrpc.ListenerRPC/GetArtifact" + ListenerRPC_SpiteStream_FullMethodName = "/listenerrpc.ListenerRPC/SpiteStream" + ListenerRPC_JobStream_FullMethodName = "/listenerrpc.ListenerRPC/JobStream" + ListenerRPC_Register_FullMethodName = "/listenerrpc.ListenerRPC/Register" + ListenerRPC_SysInfo_FullMethodName = "/listenerrpc.ListenerRPC/SysInfo" + ListenerRPC_Checkin_FullMethodName = "/listenerrpc.ListenerRPC/Checkin" + ListenerRPC_InitBindSession_FullMethodName = "/listenerrpc.ListenerRPC/InitBindSession" + ListenerRPC_RegisterListener_FullMethodName = "/listenerrpc.ListenerRPC/RegisterListener" + ListenerRPC_RegisterPipeline_FullMethodName = "/listenerrpc.ListenerRPC/RegisterPipeline" + ListenerRPC_StartPipeline_FullMethodName = "/listenerrpc.ListenerRPC/StartPipeline" + ListenerRPC_StopPipeline_FullMethodName = "/listenerrpc.ListenerRPC/StopPipeline" + ListenerRPC_DeletePipeline_FullMethodName = "/listenerrpc.ListenerRPC/DeletePipeline" + ListenerRPC_ListPipelines_FullMethodName = "/listenerrpc.ListenerRPC/ListPipelines" + ListenerRPC_RegisterWebsite_FullMethodName = "/listenerrpc.ListenerRPC/RegisterWebsite" + ListenerRPC_StartWebsite_FullMethodName = "/listenerrpc.ListenerRPC/StartWebsite" + ListenerRPC_StopWebsite_FullMethodName = "/listenerrpc.ListenerRPC/StopWebsite" + ListenerRPC_DeleteWebsite_FullMethodName = "/listenerrpc.ListenerRPC/DeleteWebsite" + ListenerRPC_ListWebsites_FullMethodName = "/listenerrpc.ListenerRPC/ListWebsites" + ListenerRPC_ListWebContent_FullMethodName = "/listenerrpc.ListenerRPC/ListWebContent" + ListenerRPC_WebsiteAddContent_FullMethodName = "/listenerrpc.ListenerRPC/WebsiteAddContent" + ListenerRPC_WebsiteUpdateContent_FullMethodName = "/listenerrpc.ListenerRPC/WebsiteUpdateContent" + ListenerRPC_WebsiteRemoveContent_FullMethodName = "/listenerrpc.ListenerRPC/WebsiteRemoveContent" + ListenerRPC_RegisterRem_FullMethodName = "/listenerrpc.ListenerRPC/RegisterRem" + ListenerRPC_StartRem_FullMethodName = "/listenerrpc.ListenerRPC/StartRem" + ListenerRPC_StopRem_FullMethodName = "/listenerrpc.ListenerRPC/StopRem" + ListenerRPC_DeleteRem_FullMethodName = "/listenerrpc.ListenerRPC/DeleteRem" + ListenerRPC_ListRems_FullMethodName = "/listenerrpc.ListenerRPC/ListRems" + ListenerRPC_NewProfile_FullMethodName = "/listenerrpc.ListenerRPC/NewProfile" + ListenerRPC_FindArtifact_FullMethodName = "/listenerrpc.ListenerRPC/FindArtifact" + ListenerRPC_Build_FullMethodName = "/listenerrpc.ListenerRPC/Build" + ListenerRPC_DockerStatus_FullMethodName = "/listenerrpc.ListenerRPC/DockerStatus" + ListenerRPC_TriggerWorkflowDispatch_FullMethodName = "/listenerrpc.ListenerRPC/TriggerWorkflowDispatch" + ListenerRPC_WorkflowStatus_FullMethodName = "/listenerrpc.ListenerRPC/WorkflowStatus" + ListenerRPC_GetArtifact_FullMethodName = "/listenerrpc.ListenerRPC/GetArtifact" ) // ListenerRPCClient is the client API for ListenerRPC service. @@ -84,6 +90,14 @@ type ListenerRPCClient interface { StopRem(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) DeleteRem(ctx context.Context, in *clientpb.CtrlPipeline, opts ...grpc.CallOption) (*clientpb.Empty, error) ListRems(ctx context.Context, in *clientpb.Listener, opts ...grpc.CallOption) (*clientpb.Pipelines, error) + // generator + NewProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) + FindArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) + Build(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Builder, error) + DockerStatus(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) + // action + TriggerWorkflowDispatch(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Builder, error) + WorkflowStatus(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) GetArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) } @@ -373,6 +387,60 @@ func (c *listenerRPCClient) ListRems(ctx context.Context, in *clientpb.Listener, return out, nil } +func (c *listenerRPCClient) NewProfile(ctx context.Context, in *clientpb.Profile, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, ListenerRPC_NewProfile_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerRPCClient) FindArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) { + out := new(clientpb.Artifact) + err := c.cc.Invoke(ctx, ListenerRPC_FindArtifact_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerRPCClient) Build(ctx context.Context, in *clientpb.Generate, opts ...grpc.CallOption) (*clientpb.Builder, error) { + out := new(clientpb.Builder) + err := c.cc.Invoke(ctx, ListenerRPC_Build_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerRPCClient) DockerStatus(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, ListenerRPC_DockerStatus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerRPCClient) TriggerWorkflowDispatch(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Builder, error) { + out := new(clientpb.Builder) + err := c.cc.Invoke(ctx, ListenerRPC_TriggerWorkflowDispatch_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerRPCClient) WorkflowStatus(ctx context.Context, in *clientpb.GithubWorkflowRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, ListenerRPC_WorkflowStatus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *listenerRPCClient) GetArtifact(ctx context.Context, in *clientpb.Artifact, opts ...grpc.CallOption) (*clientpb.Artifact, error) { out := new(clientpb.Artifact) err := c.cc.Invoke(ctx, ListenerRPC_GetArtifact_FullMethodName, in, out, opts...) @@ -416,6 +484,14 @@ type ListenerRPCServer interface { StopRem(context.Context, *clientpb.CtrlPipeline) (*clientpb.Empty, error) DeleteRem(context.Context, *clientpb.CtrlPipeline) (*clientpb.Empty, error) ListRems(context.Context, *clientpb.Listener) (*clientpb.Pipelines, error) + // generator + NewProfile(context.Context, *clientpb.Profile) (*clientpb.Empty, error) + FindArtifact(context.Context, *clientpb.Artifact) (*clientpb.Artifact, error) + Build(context.Context, *clientpb.Generate) (*clientpb.Builder, error) + DockerStatus(context.Context, *clientpb.Empty) (*clientpb.Empty, error) + // action + TriggerWorkflowDispatch(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Builder, error) + WorkflowStatus(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) GetArtifact(context.Context, *clientpb.Artifact) (*clientpb.Artifact, error) mustEmbedUnimplementedListenerRPCServer() } @@ -502,6 +578,24 @@ func (UnimplementedListenerRPCServer) DeleteRem(context.Context, *clientpb.CtrlP func (UnimplementedListenerRPCServer) ListRems(context.Context, *clientpb.Listener) (*clientpb.Pipelines, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRems not implemented") } +func (UnimplementedListenerRPCServer) NewProfile(context.Context, *clientpb.Profile) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method NewProfile not implemented") +} +func (UnimplementedListenerRPCServer) FindArtifact(context.Context, *clientpb.Artifact) (*clientpb.Artifact, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindArtifact not implemented") +} +func (UnimplementedListenerRPCServer) Build(context.Context, *clientpb.Generate) (*clientpb.Builder, error) { + return nil, status.Errorf(codes.Unimplemented, "method Build not implemented") +} +func (UnimplementedListenerRPCServer) DockerStatus(context.Context, *clientpb.Empty) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DockerStatus not implemented") +} +func (UnimplementedListenerRPCServer) TriggerWorkflowDispatch(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Builder, error) { + return nil, status.Errorf(codes.Unimplemented, "method TriggerWorkflowDispatch not implemented") +} +func (UnimplementedListenerRPCServer) WorkflowStatus(context.Context, *clientpb.GithubWorkflowRequest) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method WorkflowStatus not implemented") +} func (UnimplementedListenerRPCServer) GetArtifact(context.Context, *clientpb.Artifact) (*clientpb.Artifact, error) { return nil, status.Errorf(codes.Unimplemented, "method GetArtifact not implemented") } @@ -1002,6 +1096,114 @@ func _ListenerRPC_ListRems_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _ListenerRPC_NewProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Profile) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerRPCServer).NewProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerRPC_NewProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerRPCServer).NewProfile(ctx, req.(*clientpb.Profile)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerRPC_FindArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Artifact) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerRPCServer).FindArtifact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerRPC_FindArtifact_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerRPCServer).FindArtifact(ctx, req.(*clientpb.Artifact)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerRPC_Build_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Generate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerRPCServer).Build(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerRPC_Build_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerRPCServer).Build(ctx, req.(*clientpb.Generate)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerRPC_DockerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerRPCServer).DockerStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerRPC_DockerStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerRPCServer).DockerStatus(ctx, req.(*clientpb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerRPC_TriggerWorkflowDispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.GithubWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerRPCServer).TriggerWorkflowDispatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerRPC_TriggerWorkflowDispatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerRPCServer).TriggerWorkflowDispatch(ctx, req.(*clientpb.GithubWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerRPC_WorkflowStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.GithubWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerRPCServer).WorkflowStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerRPC_WorkflowStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerRPCServer).WorkflowStatus(ctx, req.(*clientpb.GithubWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ListenerRPC_GetArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.Artifact) if err := dec(in); err != nil { @@ -1123,6 +1325,30 @@ var ListenerRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListRems", Handler: _ListenerRPC_ListRems_Handler, }, + { + MethodName: "NewProfile", + Handler: _ListenerRPC_NewProfile_Handler, + }, + { + MethodName: "FindArtifact", + Handler: _ListenerRPC_FindArtifact_Handler, + }, + { + MethodName: "Build", + Handler: _ListenerRPC_Build_Handler, + }, + { + MethodName: "DockerStatus", + Handler: _ListenerRPC_DockerStatus_Handler, + }, + { + MethodName: "TriggerWorkflowDispatch", + Handler: _ListenerRPC_TriggerWorkflowDispatch_Handler, + }, + { + MethodName: "WorkflowStatus", + Handler: _ListenerRPC_WorkflowStatus_Handler, + }, { MethodName: "GetArtifact", Handler: _ListenerRPC_GetArtifact_Handler, diff --git a/server/config.yaml b/server/config.yaml index 40b44a05..57d84e85 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -29,6 +29,7 @@ listeners: host: 0.0.0.0 protocol: tcp parser: malefic + target: x86_64-pc-windows-gnu enable: true tls: enable: false @@ -51,6 +52,8 @@ listeners: port: 5002 host: 0.0.0.0 parser: pulse + target: x86_64-pc-windows-gnu + beacon_pipeline: beacon_pipeline enable: true encryption: enable: true diff --git a/server/internal/configs/config.go b/server/internal/configs/config.go index 79636933..61a17e7b 100644 --- a/server/internal/configs/config.go +++ b/server/internal/configs/config.go @@ -22,6 +22,7 @@ func InitConfig() error { os.MkdirAll(WebsitePath, perm) os.MkdirAll(ListenerPath, perm) os.MkdirAll(BuildOutputPath, perm) + os.MkdirAll(SourceCodePath, perm) return nil } diff --git a/server/internal/configs/listener.go b/server/internal/configs/listener.go index 7c0e5ca5..669cd58c 100644 --- a/server/internal/configs/listener.go +++ b/server/internal/configs/listener.go @@ -28,6 +28,8 @@ type TcpPipelineConfig struct { Host string `config:"host" default:"0.0.0.0"` Port uint16 `config:"port" default:"5001"` Parser string `config:"parser" default:"malefic"` + Target string `config:"target" default:""` + BeaconPipeline string `config:"beacon_pipeline" default:""` TlsConfig *TlsConfig `config:"tls"` EncryptionConfig *EncryptionConfig `config:"encryption"` } @@ -39,10 +41,12 @@ func (tcp *TcpPipelineConfig) ToProtobuf(lisId string) (*clientpb.Pipeline, erro } return &clientpb.Pipeline{ - Name: tcp.Name, - ListenerId: lisId, - Enable: tcp.Enable, - Parser: tcp.Parser, + Name: tcp.Name, + ListenerId: lisId, + Enable: tcp.Enable, + Parser: tcp.Parser, + Target: tcp.Target, + BeaconPipeline: tcp.BeaconPipeline, Body: &clientpb.Pipeline_Tcp{ Tcp: &clientpb.TCPPipeline{ Host: tcp.Host, diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index ed8ba02e..3c7e9411 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -860,7 +860,7 @@ func FindArtifact(target *clientpb.Artifact) (*clientpb.Artifact, error) { return nil, fmt.Errorf("error finding artifact: %v, target: %+v", result.Error, target) } if builder == nil { - return nil, fmt.Errorf("no artifact found for target: %+v, please build %s first", target, target.Type) + return nil, errs.ErrNotFoundArtifact } var content []byte diff --git a/server/listener/listener.go b/server/listener/listener.go index 00690cdc..caa3d678 100644 --- a/server/listener/listener.go +++ b/server/listener/listener.go @@ -4,6 +4,8 @@ import ( "context" "errors" "fmt" + "github.com/chainreactors/malice-network/helper/codenames" + "github.com/chainreactors/malice-network/helper/errs" "os" "path/filepath" @@ -147,8 +149,10 @@ func (lns *listener) RegisterAndStart(pipeline *clientpb.Pipeline) error { } _, err = lns.Rpc.StartPipeline(context.Background(), &clientpb.CtrlPipeline{ - Name: pipeline.Name, - ListenerId: lns.ID(), + Name: pipeline.Name, + ListenerId: lns.ID(), + BeaconPipeline: pipeline.BeaconPipeline, + Target: pipeline.Target, }) if err != nil { return err @@ -224,6 +228,94 @@ func (lns *listener) startHandler(job *clientpb.Job) error { return err } job.Name = pipeline.ID() + + pipelineJob := job.GetPipeline() + if pipelineJob.Target == "" { + logs.Log.Errorf("pipeline %s target is empty, auto build canceled", pipelineJob.Name) + return nil + } + var buildType string + var basicPipeline string + var pulsePipeline string + var input map[string]string + if pipelineJob.Parser == consts.ImplantPulse { + buildType = consts.CommandBuildPulse + basicPipeline = pipelineJob.BeaconPipeline + pulsePipeline = pipelineJob.Name + input = map[string]string{ + "package": consts.CommandBuildPulse, + "targets": pipelineJob.Target, + } + } else { + buildType = consts.CommandBuildBeacon + basicPipeline = pipelineJob.Name + input = map[string]string{ + "package": consts.CommandBuildBeacon, + "targets": pipelineJob.Target, + } + } + target, ok := consts.GetBuildTarget(pipelineJob.Target) + if !ok { + logs.Log.Errorf(errs.ErrInvalidateTarget.Error()) + return nil + } + _, err = lns.Rpc.FindArtifact(context.Background(), &clientpb.Artifact{ + Pipeline: pipelineJob.Name, + Target: pipelineJob.Target, + Type: buildType, + Platform: target.OS, + Arch: target.Arch, + }) + if !errors.Is(err, errs.ErrNotFoundArtifact) && err != nil { + logs.Log.Errorf("find artifact error: %s", err.Error()) + return nil + } else if err == nil { + return nil + } + _, workflowErr := lns.Rpc.WorkflowStatus(context.Background(), &clientpb.GithubWorkflowRequest{ + Repo: "", + Owner: "", + Token: "", + }) + _, dockerErr := lns.Rpc.DockerStatus(context.Background(), &clientpb.Empty{}) + if workflowErr != nil && dockerErr != nil { + logs.Log.Errorf("workflow and docker not worked: %s, %s", workflowErr.Error(), dockerErr.Error()) + return nil + } + profileName := codenames.GetCodename() + _, err = lns.Rpc.NewProfile(context.Background(), &clientpb.Profile{ + Name: profileName, + PipelineId: basicPipeline, + PulsePipelineId: pulsePipeline, + }) + if err != nil { + logs.Log.Errorf("new profile error: %s", err.Error()) + return nil + } + if workflowErr == nil { + _, err = lns.Rpc.TriggerWorkflowDispatch(context.Background(), &clientpb.GithubWorkflowRequest{ + Inputs: input, + Profile: profileName, + }) + if err != nil { + logs.Log.Errorf("trigger workflow dispatch error: %s", err.Error()) + return nil + } + return nil + } else if dockerErr == nil { + _, err = lns.Rpc.Build(context.Background(), &clientpb.Generate{ + Target: pipelineJob.Target, + ProfileName: profileName, + Type: buildType, + Srdi: true, + }) + if err != nil { + logs.Log.Errorf("docker run error: %s", err.Error()) + return nil + } + return nil + } + return nil } diff --git a/server/listener/tcp.go b/server/listener/tcp.go index 6d56824a..1aad5716 100644 --- a/server/listener/tcp.go +++ b/server/listener/tcp.go @@ -28,6 +28,8 @@ func NewTcpPipeline(rpc listenerrpc.ListenerRPCClient, pipeline *clientpb.Pipeli Name: pipeline.Name, Port: uint16(tcp.Port), Host: tcp.Host, + Target: pipeline.Target, + BeaconPipeline: pipeline.BeaconPipeline, Enable: true, PipelineConfig: core.FromProtobuf(pipeline), } @@ -41,21 +43,26 @@ func NewTcpPipeline(rpc listenerrpc.ListenerRPCClient, pipeline *clientpb.Pipeli } type TCPPipeline struct { - ln net.Listener - rpc listenerrpc.ListenerRPCClient - Name string - Port uint16 - Host string - Enable bool - parser *parser.MessageParser + ln net.Listener + rpc listenerrpc.ListenerRPCClient + Name string + Port uint16 + Host string + Enable bool + Target string + BeaconPipeline string + parser *parser.MessageParser *core.PipelineConfig } func (pipeline *TCPPipeline) ToProtobuf() *clientpb.Pipeline { p := &clientpb.Pipeline{ - Name: pipeline.Name, - Enable: pipeline.Enable, - ListenerId: pipeline.ListenerID, + Name: pipeline.Name, + Enable: pipeline.Enable, + ListenerId: pipeline.ListenerID, + Parser: pipeline.Parser, + Target: pipeline.Target, + BeaconPipeline: pipeline.BeaconPipeline, Body: &clientpb.Pipeline_Tcp{ Tcp: &clientpb.TCPPipeline{ Port: uint32(pipeline.Port), diff --git a/server/rpc/rpc-action.go b/server/rpc/rpc-action.go index af65d457..adb0e871 100644 --- a/server/rpc/rpc-action.go +++ b/server/rpc/rpc-action.go @@ -27,6 +27,7 @@ func (rpc *Server) TriggerWorkflowDispatch(ctx context.Context, req *clientpb.Gi req.Owner = config.Owner req.Repo = config.Repo req.Token = config.Token + req.WorkflowId = config.Workflow } if req.Inputs["package"] == consts.CommandBuildModules { moduleBuilder, err := db.GetBuilderByModules(req.Inputs["targets"], modules) @@ -68,6 +69,7 @@ func (rpc *Server) WorkflowStatus(ctx context.Context, req *clientpb.GithubWorkf req.Owner = config.Owner req.Repo = config.Repo req.Token = config.Token + req.WorkflowId = config.Workflow } err := build.GetWorkflowStatus(req.Owner, req.Repo, req.WorkflowId, req.Token) if err != nil { diff --git a/server/rpc/rpc-listener.go b/server/rpc/rpc-listener.go index ff91a2de..2051d1f3 100644 --- a/server/rpc/rpc-listener.go +++ b/server/rpc/rpc-listener.go @@ -133,7 +133,7 @@ func (rpc *Server) ListJobs(ctx context.Context, req *clientpb.Empty) (*clientpb if !ok { continue } - if pipeline.GetTcp() != nil { + if pipeline.GetTcp() != nil || pipeline.GetWeb() != nil || pipeline.GetBind() != nil { pipelines = append(pipelines, job.Message.(*clientpb.Pipeline)) } } diff --git a/server/rpc/rpc-pipeline.go b/server/rpc/rpc-pipeline.go index 3e238215..51c88874 100644 --- a/server/rpc/rpc-pipeline.go +++ b/server/rpc/rpc-pipeline.go @@ -50,6 +50,8 @@ func (rpc *Server) StartPipeline(ctx context.Context, req *clientpb.CtrlPipeline } pipelineDB.Enable = true pipeline := pipelineDB.ToProtobuf() + pipeline.Target = req.Target + pipeline.BeaconPipeline = req.BeaconPipeline listener := core.Listeners.Get(pipeline.ListenerId) if listener == nil { return nil, fmt.Errorf("listener %s not found", req.ListenerId) From f047b9083d9f443e5ac874b354b8cebc49074952 Mon Sep 17 00:00:00 2001 From: h3zh1 Date: Sat, 11 Jan 2025 02:18:18 +0800 Subject: [PATCH 19/40] fix: pipe --- client/command/pipe/close.go | 7 +++---- client/command/pipe/commands.go | 15 +++++++++++---- client/command/pipe/read.go | 7 +++---- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/client/command/pipe/close.go b/client/command/pipe/close.go index 664c0c2a..76cd5630 100644 --- a/client/command/pipe/close.go +++ b/client/command/pipe/close.go @@ -15,15 +15,14 @@ import ( // PipeCloseCmd closes a named pipe. func PipeCloseCmd(cmd *cobra.Command, con *repl.Console) error { - name, _ := cmd.Flags().GetString("name") - + named_pipe := cmd.Flags().Arg(0) session := con.GetInteractive() - task, err := PipeClose(con.Rpc, session, name) + task, err := PipeClose(con.Rpc, session, named_pipe) if err != nil { return err } - session.Console(task, fmt.Sprintf("closed named pipe: %s", name)) + session.Console(task, fmt.Sprintf("closed named pipe: %s", named_pipe)) return nil } diff --git a/client/command/pipe/commands.go b/client/command/pipe/commands.go index 60ce0bea..35ff82b6 100644 --- a/client/command/pipe/commands.go +++ b/client/command/pipe/commands.go @@ -55,6 +55,9 @@ func Commands(con *repl.Console) []*cobra.Command { pipe read \\.\pipe\test_pipe ~~~`, } + common.BindArgCompletions(pipeReadCmd, nil, + carapace.ActionValues().Usage("pipe name"), + ) pipeCloseCmd := &cobra.Command{ Use: consts.SubCommandName(consts.ModulePipeClose) + " [pipe_name]", @@ -69,13 +72,17 @@ func Commands(con *repl.Console) []*cobra.Command { "ttp": "T1090", }, Example: `Close a pipe: - ~~~ - pipe close \\.\pipe\test_pipe - ~~~`, + ~~~ + pipe close \\.\pipe\test_pipe + ~~~`, } + common.BindArgCompletions(pipeCloseCmd, nil, + carapace.ActionValues().Usage("pipe name"), + ) // Add subcommands to the main pipe command - pipeCmd.AddCommand(pipeUploadCmd, pipeReadCmd, pipeCloseCmd) + pipeCmd.AddCommand(pipeUploadCmd, pipeReadCmd) + // , pipeCloseCmd return []*cobra.Command{pipeCmd} } diff --git a/client/command/pipe/read.go b/client/command/pipe/read.go index e6f618cf..08d01442 100644 --- a/client/command/pipe/read.go +++ b/client/command/pipe/read.go @@ -15,15 +15,14 @@ import ( // PipeReadCmd reads data from a named pipe. func PipeReadCmd(cmd *cobra.Command, con *repl.Console) error { - name, _ := cmd.Flags().GetString("name") - + named_pipe := cmd.Flags().Arg(0) session := con.GetInteractive() - task, err := PipeRead(con.Rpc, session, name) + task, err := PipeRead(con.Rpc, session, named_pipe) if err != nil { return err } - session.Console(task, fmt.Sprintf("read data from named pipe: %s", name)) + session.Console(task, fmt.Sprintf("read data from named pipe: %s", named_pipe)) return nil } From b3c58970b4aed89ccaad7338e68e838079ec0acb Mon Sep 17 00:00:00 2001 From: M09Ic Date: Sat, 11 Jan 2025 13:48:09 +0800 Subject: [PATCH 20/40] chore: optimize listener auto build --- client/core/plugin/lua.go | 9 ++--- server/listener/listener.go | 67 ++++++++++++++++--------------------- 2 files changed, 33 insertions(+), 43 deletions(-) diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index ffb1c6d3..24560417 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -3,10 +3,6 @@ package plugin import ( "fmt" - "github.com/kballard/go-shellquote" - "github.com/spf13/cobra" - lua "github.com/yuin/gopher-lua" - "github.com/yuin/gopher-lua/parse" "os" "path/filepath" "reflect" @@ -16,6 +12,11 @@ import ( "sync" "time" + "github.com/kballard/go-shellquote" + "github.com/spf13/cobra" + lua "github.com/yuin/gopher-lua" + "github.com/yuin/gopher-lua/parse" + "github.com/chainreactors/logs" "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/core" diff --git a/server/listener/listener.go b/server/listener/listener.go index caa3d678..cc8ce97c 100644 --- a/server/listener/listener.go +++ b/server/listener/listener.go @@ -228,69 +228,63 @@ func (lns *listener) startHandler(job *clientpb.Job) error { return err } job.Name = pipeline.ID() + err = lns.autoBuild(job.GetPipeline()) + if err != nil { + logs.Log.Warn(err) + } + return nil +} - pipelineJob := job.GetPipeline() - if pipelineJob.Target == "" { - logs.Log.Errorf("pipeline %s target is empty, auto build canceled", pipelineJob.Name) - return nil +func (lns *listener) autoBuild(pipeline *clientpb.Pipeline) error { + if pipeline.Target == "" { + return fmt.Errorf("pipeline %s target is empty, auto build canceled", pipeline.Name) } var buildType string - var basicPipeline string + var beaconPipeline string var pulsePipeline string var input map[string]string - if pipelineJob.Parser == consts.ImplantPulse { + if pipeline.Parser == consts.ImplantPulse { buildType = consts.CommandBuildPulse - basicPipeline = pipelineJob.BeaconPipeline - pulsePipeline = pipelineJob.Name + beaconPipeline = pipeline.BeaconPipeline + pulsePipeline = pipeline.Name input = map[string]string{ "package": consts.CommandBuildPulse, - "targets": pipelineJob.Target, + "targets": pipeline.Target, } } else { buildType = consts.CommandBuildBeacon - basicPipeline = pipelineJob.Name + beaconPipeline = pipeline.Name input = map[string]string{ "package": consts.CommandBuildBeacon, - "targets": pipelineJob.Target, + "targets": pipeline.Target, } } - target, ok := consts.GetBuildTarget(pipelineJob.Target) - if !ok { - logs.Log.Errorf(errs.ErrInvalidateTarget.Error()) - return nil - } - _, err = lns.Rpc.FindArtifact(context.Background(), &clientpb.Artifact{ - Pipeline: pipelineJob.Name, - Target: pipelineJob.Target, + target, _ := consts.GetBuildTarget(pipeline.Target) + _, err := lns.Rpc.FindArtifact(context.Background(), &clientpb.Artifact{ + Pipeline: pipeline.Name, + Target: pipeline.Target, Type: buildType, Platform: target.OS, Arch: target.Arch, }) if !errors.Is(err, errs.ErrNotFoundArtifact) && err != nil { - logs.Log.Errorf("find artifact error: %s", err.Error()) - return nil + return err } else if err == nil { return nil } - _, workflowErr := lns.Rpc.WorkflowStatus(context.Background(), &clientpb.GithubWorkflowRequest{ - Repo: "", - Owner: "", - Token: "", - }) + _, workflowErr := lns.Rpc.WorkflowStatus(context.Background(), &clientpb.GithubWorkflowRequest{}) _, dockerErr := lns.Rpc.DockerStatus(context.Background(), &clientpb.Empty{}) if workflowErr != nil && dockerErr != nil { - logs.Log.Errorf("workflow and docker not worked: %s, %s", workflowErr.Error(), dockerErr.Error()) - return nil + return fmt.Errorf("workflow and docker not worked: %s, %s", workflowErr.Error(), dockerErr.Error()) } profileName := codenames.GetCodename() _, err = lns.Rpc.NewProfile(context.Background(), &clientpb.Profile{ Name: profileName, - PipelineId: basicPipeline, + PipelineId: beaconPipeline, PulsePipelineId: pulsePipeline, }) if err != nil { - logs.Log.Errorf("new profile error: %s", err.Error()) - return nil + return err } if workflowErr == nil { _, err = lns.Rpc.TriggerWorkflowDispatch(context.Background(), &clientpb.GithubWorkflowRequest{ @@ -298,24 +292,19 @@ func (lns *listener) startHandler(job *clientpb.Job) error { Profile: profileName, }) if err != nil { - logs.Log.Errorf("trigger workflow dispatch error: %s", err.Error()) - return nil + return err } - return nil } else if dockerErr == nil { _, err = lns.Rpc.Build(context.Background(), &clientpb.Generate{ - Target: pipelineJob.Target, + Target: pipeline.Target, ProfileName: profileName, Type: buildType, Srdi: true, }) if err != nil { - logs.Log.Errorf("docker run error: %s", err.Error()) - return nil + return err } - return nil } - return nil } From 3c4541da98f1fdc7b8e7f53bd1c6f342e1a85134 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Sat, 11 Jan 2025 14:08:07 +0800 Subject: [PATCH 21/40] chore: combine implant consts --- client/command/basic/commands.go | 8 ++++---- client/command/generic/commands.go | 2 +- client/command/mutant/shellcode.go | 2 +- client/command/sessions/new.go | 2 +- helper/consts/implant.go | 15 ++++----------- server/internal/build/buildquene.go | 16 ++++++++-------- server/internal/db/helper.go | 4 ++-- server/listener/listener.go | 2 +- server/rpc/rpc-build.go | 4 ++-- 9 files changed, 24 insertions(+), 31 deletions(-) diff --git a/client/command/basic/commands.go b/client/command/basic/commands.go index caad0d7a..dbbabdb8 100644 --- a/client/command/basic/commands.go +++ b/client/command/basic/commands.go @@ -40,7 +40,7 @@ func Commands(con *repl.Console) []*cobra.Command { return GetCmd(cmd, con) }, Annotations: map[string]string{ - "implant": consts.ImplantModBind, + "implant": consts.ImplantMaleficBind, }, } @@ -52,7 +52,7 @@ func Commands(con *repl.Console) []*cobra.Command { return WaitCmd(cmd, con) }, Annotations: map[string]string{ - "implant": consts.ImplantModBind, + "implant": consts.ImplantMaleficBind, }, } common.BindFlag(waitCmd, func(f *pflag.FlagSet) { @@ -68,7 +68,7 @@ func Commands(con *repl.Console) []*cobra.Command { return PollingCmd(cmd, con) }, Annotations: map[string]string{ - "implant": consts.ImplantModBind, + "implant": consts.ImplantMaleficBind, }, } common.BindFlag(pollingCmd, func(f *pflag.FlagSet) { @@ -90,7 +90,7 @@ func Commands(con *repl.Console) []*cobra.Command { return InitCmd(cmd, con) }, Annotations: map[string]string{ - "implant": consts.ImplantModBind, + "implant": consts.ImplantMaleficBind, }, } diff --git a/client/command/generic/commands.go b/client/command/generic/commands.go index 9bb16293..e8ae34c3 100644 --- a/client/command/generic/commands.go +++ b/client/command/generic/commands.go @@ -169,6 +169,6 @@ func Register(con *repl.Console) { }, nil) con.RegisterServerFunc("isbeacon", func(con *repl.Console, sess *core.Session) (bool, error) { - return sess.Type == consts.ImplantModBeacon, nil + return sess.Type == consts.CommandBuildBeacon, nil }, nil) } diff --git a/client/command/mutant/shellcode.go b/client/command/mutant/shellcode.go index f1ac57ac..4dd819ba 100644 --- a/client/command/mutant/shellcode.go +++ b/client/command/mutant/shellcode.go @@ -44,7 +44,7 @@ func MaleficSRDI(con *repl.Console, path string, id uint32, target string, param return con.Rpc.MaleficSRDI(con.Context(), &clientpb.Builder{ Id: id, Bin: bin, - Type: consts.ImplantModShellcode, + Type: consts.CommandBuildShellCode, Name: filepath.Base(path), Target: target, IsSrdi: true, diff --git a/client/command/sessions/new.go b/client/command/sessions/new.go index 9751709a..3f00b8b5 100644 --- a/client/command/sessions/new.go +++ b/client/command/sessions/new.go @@ -34,7 +34,7 @@ func NewBindSession(con *repl.Console, PipelineID string, target string, name st RawId: encoders.BytesToUint32(rid), SessionId: sid, Target: target, - Type: consts.ImplantModBind, + Type: consts.ImplantMaleficBind, RegisterData: &implantpb.Register{ Name: name, }, diff --git a/helper/consts/implant.go b/helper/consts/implant.go index ed5f15bc..2ae798d7 100644 --- a/helper/consts/implant.go +++ b/helper/consts/implant.go @@ -1,17 +1,10 @@ package consts +// parser const ( - ImplantMalefic = "malefic" - ImplantPulse = "pulse" - ImplantCobaltStrike = "cobaltstrike" -) - -const ( - ImplantModBeacon = "beacon" - ImplantModBind = "bind" - ImplantModPulse = "pulse" - ImplantModPrelude = "prelude" - ImplantModShellcode = "shellcode" + ImplantMalefic = "malefic" + ImplantPulse = "pulse" + ImplantMaleficBind = "bind" ) const ( diff --git a/server/internal/build/buildquene.go b/server/internal/build/buildquene.go index eee2fc5d..6680ee83 100644 --- a/server/internal/build/buildquene.go +++ b/server/internal/build/buildquene.go @@ -28,7 +28,7 @@ type BuildTask struct { req *clientpb.Generate // The build request result chan *clientpb.Artifact // Channel to send back the build result err chan error // Channel to send back error in case of failure - builder models.Builder + builder *models.Builder } // BuildQueueManager manages the build task queue @@ -83,7 +83,7 @@ func (bqm *BuildQueueManager) worker(id int) { } // executeBuild executes the build process based on the request -func (bqm *BuildQueueManager) executeBuild(req *clientpb.Generate, builder models.Builder) (*clientpb.Artifact, error) { +func (bqm *BuildQueueManager) executeBuild(req *clientpb.Generate, builder *models.Builder) (*clientpb.Artifact, error) { target, ok := consts.GetBuildTarget(req.Target) if !ok { return nil, errs.ErrInvalidateTarget @@ -210,7 +210,7 @@ func (bqm *BuildQueueManager) handleNewBeaconBuild(cli *client.Client, req *clie // Add Beacon build task to queue asynchronously go func() { - _, err := GlobalBuildQueueManager.AddTask(beaconReq, *beaconBuilder) + _, err := GlobalBuildQueueManager.AddTask(beaconReq, beaconBuilder) if err != nil { logs.Log.Errorf("Error adding BuildBeacon task: %v", err) } @@ -226,7 +226,7 @@ func (bqm *BuildQueueManager) handleNewBeaconBuild(cli *client.Client, req *clie } // finalizeBuild moves the build output and updates the builder path -func (bqm *BuildQueueManager) finalizeBuild(req *clientpb.Generate, builder models.Builder, target *consts.BuildTarget) (*clientpb.Artifact, error) { +func (bqm *BuildQueueManager) finalizeBuild(req *clientpb.Generate, builder *models.Builder, target *consts.BuildTarget) (*clientpb.Artifact, error) { _, artifactPath, err := MoveBuildOutput(req.Target, req.Type) if err != nil { logs.Log.Errorf("move build output error: %v", err) @@ -239,7 +239,7 @@ func (bqm *BuildQueueManager) finalizeBuild(req *clientpb.Generate, builder mode } builder.Path = absArtifactPath - err = db.UpdateBuilderPath(&builder) + err = db.UpdateBuilderPath(builder) if err != nil { return nil, err } @@ -256,13 +256,13 @@ func (bqm *BuildQueueManager) finalizeBuild(req *clientpb.Generate, builder mode if builder.Type == consts.CommandBuildPulse { logs.Log.Infof("objcopy start ...") - _, err = OBJCOPYPulse(&builder, target.OS, target.Arch) + _, err = OBJCOPYPulse(builder, target.OS, target.Arch) if err != nil { return nil, fmt.Errorf("objcopy error: %v", err) } logs.Log.Infof("objcopy end ...") } else { - _, err = SRDIArtifact(&builder, target.OS, target.Arch) + _, err = SRDIArtifact(builder, target.OS, target.Arch) if err != nil { return nil, err } @@ -273,7 +273,7 @@ func (bqm *BuildQueueManager) finalizeBuild(req *clientpb.Generate, builder mode } // AddTask adds a build task to the queue and waits for the result -func (bqm *BuildQueueManager) AddTask(req *clientpb.Generate, builder models.Builder) (*clientpb.Artifact, error) { +func (bqm *BuildQueueManager) AddTask(req *clientpb.Generate, builder *models.Builder) (*clientpb.Artifact, error) { resultChan := make(chan *clientpb.Artifact) // Channel to receive the result errChan := make(chan error) // Channel to receive errors task := BuildTask{ diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index 3c7e9411..bded0941 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -797,7 +797,7 @@ func SaveArtifact(name, artifactType, platform, arch, stage, source string) (*mo Type: artifactType, Source: source, } - if artifactType == consts.ImplantModShellcode { + if artifactType == consts.CommandBuildShellCode { builder.IsSRDI = true builder.ShellcodePath = filepath.Join(absBuildOutputPath, encoders.UUID()) } else { @@ -846,7 +846,7 @@ func FindArtifact(target *clientpb.Artifact) (*clientpb.Artifact, error) { if v.ShellcodePath == "" { continue } - if v.Type == consts.ImplantModPulse && v.Profile.PulsePipelineID == target.Pipeline { + if v.Type == consts.ImplantPulse && v.Profile.PulsePipelineID == target.Pipeline { builder = v break } diff --git a/server/listener/listener.go b/server/listener/listener.go index cc8ce97c..06b77b9d 100644 --- a/server/listener/listener.go +++ b/server/listener/listener.go @@ -243,7 +243,7 @@ func (lns *listener) autoBuild(pipeline *clientpb.Pipeline) error { var beaconPipeline string var pulsePipeline string var input map[string]string - if pipeline.Parser == consts.ImplantPulse { + if pipeline.Parser == consts.CommandBuildPulse { buildType = consts.CommandBuildPulse beaconPipeline = pipeline.BeaconPipeline pulsePipeline = pipeline.Name diff --git a/server/rpc/rpc-build.go b/server/rpc/rpc-build.go index 1bca0188..dd76eb49 100644 --- a/server/rpc/rpc-build.go +++ b/server/rpc/rpc-build.go @@ -21,7 +21,7 @@ func (rpc *Server) Build(ctx context.Context, req *clientpb.Generate) (*clientpb return nil, err } go func() { - _, err = build.GlobalBuildQueueManager.AddTask(req, *builder) + _, err = build.GlobalBuildQueueManager.AddTask(req, builder) if err != nil { logs.Log.Errorf("Failed to enqueue build request: %v", err) return @@ -56,7 +56,7 @@ func (rpc *Server) BuildModules(ctx context.Context, req *clientpb.Generate) (*c return nil, err } go func() { - _, err = build.GlobalBuildQueueManager.AddTask(req, *builder) + _, err = build.GlobalBuildQueueManager.AddTask(req, builder) if err != nil { logs.Log.Errorf("Failed to enqueue build request: %v", err) return From dd59b84145d06d8f7e9e8cb858ae7c5cab3062df Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Sat, 11 Jan 2025 15:24:24 +0800 Subject: [PATCH 22/40] fix: change auto_build target string to list --- client/command/common/flagset.go | 6 +- client/command/listener/commands.go | 1 - helper/proto/client/clientpb/client.pb.go | 34 +++---- server/config.yaml | 8 +- server/internal/configs/listener.go | 16 +++- server/listener/listener.go | 111 ++++++++++++---------- server/listener/tcp.go | 2 +- 7 files changed, 97 insertions(+), 81 deletions(-) diff --git a/client/command/common/flagset.go b/client/command/common/flagset.go index 908aac77..07606149 100644 --- a/client/command/common/flagset.go +++ b/client/command/common/flagset.go @@ -116,12 +116,12 @@ func PipelineFlagSet(f *pflag.FlagSet) { } func ArtifactFlagSet(f *pflag.FlagSet) { - f.String("target", "", "build target") + f.StringSlice("target", []string{}, "build target") f.String("beacon-pipeline", "", "beacon pipeline id") } -func ParseArtifactFlags(cmd *cobra.Command) (string, string) { - target, _ := cmd.Flags().GetString("target") +func ParseArtifactFlags(cmd *cobra.Command) ([]string, string) { + target, _ := cmd.Flags().GetStringSlice("target") beaconPipeline, _ := cmd.Flags().GetString("beacon-pipeline") return target, beaconPipeline } diff --git a/client/command/listener/commands.go b/client/command/listener/commands.go index e980d8e1..624c90bc 100644 --- a/client/command/listener/commands.go +++ b/client/command/listener/commands.go @@ -63,7 +63,6 @@ tcp --listener tcp_default --tls --cert_path /path/to/cert --key_path /path/to/k comp["cert_path"] = carapace.ActionFiles().Usage("path to the cert file") comp["key_path"] = carapace.ActionFiles().Usage("path to the key file") comp["tls"] = carapace.ActionValues().Usage("enable tls") - comp["target"] = common.BuildTargetCompleter(con) }) tcpCmd.MarkFlagRequired("listener") diff --git a/helper/proto/client/clientpb/client.pb.go b/helper/proto/client/clientpb/client.pb.go index b7fb7cdf..70717988 100644 --- a/helper/proto/client/clientpb/client.pb.go +++ b/helper/proto/client/clientpb/client.pb.go @@ -3861,13 +3861,13 @@ type Pipeline struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - ListenerId string `protobuf:"bytes,3,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` - Parser string `protobuf:"bytes,4,opt,name=parser,proto3" json:"parser,omitempty"` - Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` - Target string `protobuf:"bytes,6,opt,name=target,proto3" json:"target,omitempty"` - BeaconPipeline string `protobuf:"bytes,7,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` + Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + ListenerId string `protobuf:"bytes,3,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` + Parser string `protobuf:"bytes,4,opt,name=parser,proto3" json:"parser,omitempty"` + Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` + Target []string `protobuf:"bytes,6,rep,name=target,proto3" json:"target,omitempty"` + BeaconPipeline string `protobuf:"bytes,7,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` // Types that are assignable to Body: // *Pipeline_Tcp // *Pipeline_Bind @@ -3945,11 +3945,11 @@ func (x *Pipeline) GetIp() string { return "" } -func (x *Pipeline) GetTarget() string { +func (x *Pipeline) GetTarget() []string { if x != nil { return x.Target } - return "" + return nil } func (x *Pipeline) GetBeaconPipeline() string { @@ -4041,10 +4041,10 @@ type CtrlPipeline struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ListenerId string `protobuf:"bytes,1,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` - BeaconPipeline string `protobuf:"bytes,4,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` + ListenerId string `protobuf:"bytes,1,opt,name=listener_id,json=listenerId,proto3" json:"listener_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Target []string `protobuf:"bytes,3,rep,name=target,proto3" json:"target,omitempty"` + BeaconPipeline string `protobuf:"bytes,4,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` } func (x *CtrlPipeline) Reset() { @@ -4093,11 +4093,11 @@ func (x *CtrlPipeline) GetName() string { return "" } -func (x *CtrlPipeline) GetTarget() string { +func (x *CtrlPipeline) GetTarget() []string { if x != nil { return x.Target } - return "" + return nil } func (x *CtrlPipeline) GetBeaconPipeline() string { @@ -5692,7 +5692,7 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x61, 0x72, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, @@ -5716,7 +5716,7 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x43, 0x0a, diff --git a/server/config.yaml b/server/config.yaml index 57d84e85..7001301f 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -29,7 +29,6 @@ listeners: host: 0.0.0.0 protocol: tcp parser: malefic - target: x86_64-pc-windows-gnu enable: true tls: enable: false @@ -52,8 +51,11 @@ listeners: port: 5002 host: 0.0.0.0 parser: pulse - target: x86_64-pc-windows-gnu - beacon_pipeline: beacon_pipeline + auto_build: + target: + - x86_64-pc-windows-gnu + - x86_64-unknown-linux-musl + beacon_pipeline: beacon_pipeline enable: true encryption: enable: true diff --git a/server/internal/configs/listener.go b/server/internal/configs/listener.go index 669cd58c..69db4a99 100644 --- a/server/internal/configs/listener.go +++ b/server/internal/configs/listener.go @@ -28,25 +28,31 @@ type TcpPipelineConfig struct { Host string `config:"host" default:"0.0.0.0"` Port uint16 `config:"port" default:"5001"` Parser string `config:"parser" default:"malefic"` - Target string `config:"target" default:""` - BeaconPipeline string `config:"beacon_pipeline" default:""` + AutoBuildConfig *AutoBuildConfig `config:"auto_build"` TlsConfig *TlsConfig `config:"tls"` EncryptionConfig *EncryptionConfig `config:"encryption"` } +type AutoBuildConfig struct { + Target []string `config:"target" default:""` + BeaconPipeline string `config:"beacon_pipeline" default:""` +} + func (tcp *TcpPipelineConfig) ToProtobuf(lisId string) (*clientpb.Pipeline, error) { tls, err := tcp.TlsConfig.ReadCert() if err != nil { return nil, err } - + if tcp.AutoBuildConfig == nil { + tcp.AutoBuildConfig = &AutoBuildConfig{} + } return &clientpb.Pipeline{ Name: tcp.Name, ListenerId: lisId, Enable: tcp.Enable, Parser: tcp.Parser, - Target: tcp.Target, - BeaconPipeline: tcp.BeaconPipeline, + Target: tcp.AutoBuildConfig.Target, + BeaconPipeline: tcp.AutoBuildConfig.BeaconPipeline, Body: &clientpb.Pipeline_Tcp{ Tcp: &clientpb.TCPPipeline{ Host: tcp.Host, diff --git a/server/listener/listener.go b/server/listener/listener.go index 06b77b9d..5f758570 100644 --- a/server/listener/listener.go +++ b/server/listener/listener.go @@ -236,74 +236,83 @@ func (lns *listener) startHandler(job *clientpb.Job) error { } func (lns *listener) autoBuild(pipeline *clientpb.Pipeline) error { - if pipeline.Target == "" { + if len(pipeline.Target) == 0 { return fmt.Errorf("pipeline %s target is empty, auto build canceled", pipeline.Name) } var buildType string var beaconPipeline string var pulsePipeline string var input map[string]string - if pipeline.Parser == consts.CommandBuildPulse { - buildType = consts.CommandBuildPulse - beaconPipeline = pipeline.BeaconPipeline - pulsePipeline = pipeline.Name - input = map[string]string{ - "package": consts.CommandBuildPulse, - "targets": pipeline.Target, - } - } else { - buildType = consts.CommandBuildBeacon - beaconPipeline = pipeline.Name - input = map[string]string{ - "package": consts.CommandBuildBeacon, - "targets": pipeline.Target, - } - } - target, _ := consts.GetBuildTarget(pipeline.Target) - _, err := lns.Rpc.FindArtifact(context.Background(), &clientpb.Artifact{ - Pipeline: pipeline.Name, - Target: pipeline.Target, - Type: buildType, - Platform: target.OS, - Arch: target.Arch, - }) - if !errors.Is(err, errs.ErrNotFoundArtifact) && err != nil { - return err - } else if err == nil { - return nil - } + _, workflowErr := lns.Rpc.WorkflowStatus(context.Background(), &clientpb.GithubWorkflowRequest{}) _, dockerErr := lns.Rpc.DockerStatus(context.Background(), &clientpb.Empty{}) if workflowErr != nil && dockerErr != nil { return fmt.Errorf("workflow and docker not worked: %s, %s", workflowErr.Error(), dockerErr.Error()) } - profileName := codenames.GetCodename() - _, err = lns.Rpc.NewProfile(context.Background(), &clientpb.Profile{ - Name: profileName, - PipelineId: beaconPipeline, - PulsePipelineId: pulsePipeline, - }) - if err != nil { - return err - } - if workflowErr == nil { - _, err = lns.Rpc.TriggerWorkflowDispatch(context.Background(), &clientpb.GithubWorkflowRequest{ - Inputs: input, - Profile: profileName, + + for _, target := range pipeline.Target { + if pipeline.Parser == consts.CommandBuildPulse { + buildType = consts.CommandBuildPulse + beaconPipeline = pipeline.BeaconPipeline + pulsePipeline = pipeline.Name + input = map[string]string{ + "package": consts.CommandBuildPulse, + "targets": target, + } + } else { + buildType = consts.CommandBuildBeacon + beaconPipeline = pipeline.Name + input = map[string]string{ + "package": consts.CommandBuildBeacon, + "targets": target, + } + } + targetMap, ok := consts.GetBuildTarget(target) + if !ok { + fmt.Printf("Error getting build target for %s\n", target) + continue + } + _, err := lns.Rpc.FindArtifact(context.Background(), &clientpb.Artifact{ + Pipeline: pipeline.Name, + Target: target, + Type: buildType, + Platform: targetMap.OS, + Arch: targetMap.Arch, }) - if err != nil { - return err + if !errors.Is(err, errs.ErrNotFoundArtifact) && err != nil { + logs.Log.Errorf("Error finding artifact for %s: %v\n", target, err) + continue + } else if err == nil { + continue } - } else if dockerErr == nil { - _, err = lns.Rpc.Build(context.Background(), &clientpb.Generate{ - Target: pipeline.Target, - ProfileName: profileName, - Type: buildType, - Srdi: true, + profileName := codenames.GetCodename() + _, err = lns.Rpc.NewProfile(context.Background(), &clientpb.Profile{ + Name: profileName, + PipelineId: beaconPipeline, + PulsePipelineId: pulsePipeline, }) if err != nil { return err } + if workflowErr == nil { + _, err = lns.Rpc.TriggerWorkflowDispatch(context.Background(), &clientpb.GithubWorkflowRequest{ + Inputs: input, + Profile: profileName, + }) + if err != nil { + return err + } + } else if dockerErr == nil { + _, err = lns.Rpc.Build(context.Background(), &clientpb.Generate{ + Target: target, + ProfileName: profileName, + Type: buildType, + Srdi: true, + }) + if err != nil { + return err + } + } } return nil } diff --git a/server/listener/tcp.go b/server/listener/tcp.go index 1aad5716..a36a3afd 100644 --- a/server/listener/tcp.go +++ b/server/listener/tcp.go @@ -49,7 +49,7 @@ type TCPPipeline struct { Port uint16 Host string Enable bool - Target string + Target []string BeaconPipeline string parser *parser.MessageParser *core.PipelineConfig From 2cb9e37b4319b88dd36edbd7dd4a894d08744d78 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 13 Jan 2025 16:56:10 +0800 Subject: [PATCH 23/40] fix: adapt go1.20 --- .github/workflows/releaser.yaml | 17 +-- client/assets/profile.go | 2 +- client/command/addon/execute.go | 2 +- client/command/armory/armory.go | 5 +- client/command/armory/install.go | 2 +- client/command/armory/manage.go | 2 +- client/command/sessions/sessions.go | 5 +- client/core/plugin/lua.go | 4 +- client/core/session.go | 2 +- client/repl/console.go | 2 +- external/carapace/example-nonposix/go.mod | 2 +- external/carapace/go.mod | 3 + external/carapace/go.work | 6 - external/carapace/go.work.sum | 27 ---- external/carapace/internal/common/dash.go | 2 +- go.mod | 34 +++-- go.sum | 170 +++++----------------- go.work | 9 -- server/internal/configs/listener.go | 2 +- 19 files changed, 72 insertions(+), 226 deletions(-) delete mode 100644 external/carapace/go.work delete mode 100644 external/carapace/go.work.sum delete mode 100644 go.work diff --git a/.github/workflows/releaser.yaml b/.github/workflows/releaser.yaml index bdc2da3e..1150abc3 100644 --- a/.github/workflows/releaser.yaml +++ b/.github/workflows/releaser.yaml @@ -24,21 +24,10 @@ jobs: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: 1.21 - - - name: Install protoc - run: | - sudo apt-get update - sudo apt-get install -y protobuf-compiler - - - name: Install protoc-gen-go and protoc-gen-go-grpc - run: | - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - env: - GOPATH: "/home/runner/go" + go-version: '1.20' + - run: go version - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 diff --git a/client/assets/profile.go b/client/assets/profile.go index 10d1ff14..5a362af5 100644 --- a/client/assets/profile.go +++ b/client/assets/profile.go @@ -4,10 +4,10 @@ import ( "github.com/chainreactors/logs" crConfig "github.com/chainreactors/malice-network/helper/utils/config" "github.com/chainreactors/malice-network/helper/utils/fileutils" + "golang.org/x/exp/slices" "gopkg.in/yaml.v3" "os" "path/filepath" - "slices" ) var ( diff --git a/client/command/addon/execute.go b/client/command/addon/execute.go index 2b9d39d3..4eb742c8 100644 --- a/client/command/addon/execute.go +++ b/client/command/addon/execute.go @@ -9,7 +9,7 @@ import ( "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" "github.com/spf13/cobra" - "slices" + "golang.org/x/exp/slices" ) func ExecuteAddonCmd(cmd *cobra.Command, con *repl.Console) { diff --git a/client/command/armory/armory.go b/client/command/armory/armory.go index 761442b1..4e9f1334 100644 --- a/client/command/armory/armory.go +++ b/client/command/armory/armory.go @@ -11,11 +11,10 @@ import ( "github.com/chainreactors/malice-network/helper/cryptography/minisign" "github.com/chainreactors/tui" "github.com/evertras/bubble-table/table" - "github.com/pterm/pterm" "github.com/spf13/cobra" + "golang.org/x/exp/slices" "io" "net/url" - "slices" "strings" "sync" "time" @@ -417,7 +416,7 @@ func PrintArmoryPackages(aliases []*alias.AliasManifest, exts []*extension.Exten for _, pkg := range entries { var commandName string if repl.CmdExist(con.ImplantMenu(), pkg.CommandName) { - commandName = pterm.FgGreen.Sprint(pkg.CommandName) + commandName = tui.GreenFg.Render(pkg.CommandName) } else { commandName = pkg.CommandName } diff --git a/client/command/armory/install.go b/client/command/armory/install.go index 8fcbb25b..01268973 100644 --- a/client/command/armory/install.go +++ b/client/command/armory/install.go @@ -12,11 +12,11 @@ import ( "github.com/chainreactors/malice-network/helper/cryptography/minisign" "github.com/chainreactors/tui" "github.com/spf13/cobra" + "golang.org/x/exp/slices" "io/ioutil" "net/url" "os" "path/filepath" - "slices" ) var ( diff --git a/client/command/armory/manage.go b/client/command/armory/manage.go index fd4fe576..8a7077d1 100644 --- a/client/command/armory/manage.go +++ b/client/command/armory/manage.go @@ -2,7 +2,7 @@ package armory import ( "github.com/chainreactors/malice-network/client/assets" - "slices" + "golang.org/x/exp/slices" ) func getCurrentArmoryConfiguration() []*assets.ArmoryConfig { diff --git a/client/command/sessions/sessions.go b/client/command/sessions/sessions.go index be4c4762..dc2f0eba 100644 --- a/client/command/sessions/sessions.go +++ b/client/command/sessions/sessions.go @@ -6,7 +6,6 @@ import ( "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/tui" "github.com/evertras/bubble-table/table" - "github.com/pterm/pterm" "github.com/spf13/cobra" "io" "strconv" @@ -60,9 +59,9 @@ func PrintSessions(sessions map[string]*core.Session, con *repl.Console, isAll b if !isAll { continue } - SessionHealth = pterm.FgRed.Sprint("DEAD") + SessionHealth = tui.RedFg.Render("DEAD") } else { - SessionHealth = pterm.FgGreen.Sprint("ALIVE") + SessionHealth = tui.GreenFg.Render("ALIVE") } row = table.NewRow( table.RowData{ diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index 24560417..838d847e 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -2,17 +2,17 @@ package plugin import ( "fmt" + "github.com/kballard/go-shellquote" + "golang.org/x/exp/slices" "os" "path/filepath" "reflect" - "slices" "strconv" "strings" "sync" "time" - "github.com/kballard/go-shellquote" "github.com/spf13/cobra" lua "github.com/yuin/gopher-lua" "github.com/yuin/gopher-lua/parse" diff --git a/client/core/session.go b/client/core/session.go index 1aff00e1..51720aef 100644 --- a/client/core/session.go +++ b/client/core/session.go @@ -8,10 +8,10 @@ import ( "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" + "golang.org/x/exp/slices" "google.golang.org/grpc/metadata" "os" "path/filepath" - "slices" ) func NewSession(sess *clientpb.Session, server *ServerStatus) *Session { diff --git a/client/repl/console.go b/client/repl/console.go index f243695b..b127a57b 100644 --- a/client/repl/console.go +++ b/client/repl/console.go @@ -13,10 +13,10 @@ import ( "github.com/reeflective/console" "github.com/rsteube/carapace/pkg/x" "github.com/spf13/cobra" + "golang.org/x/exp/slices" "google.golang.org/grpc/metadata" "io" "path/filepath" - "slices" "strings" "time" ) diff --git a/external/carapace/example-nonposix/go.mod b/external/carapace/example-nonposix/go.mod index e192494a..b7a110ff 100644 --- a/external/carapace/example-nonposix/go.mod +++ b/external/carapace/example-nonposix/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/rsteube/carapace v0.31.1 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 ) diff --git a/external/carapace/go.mod b/external/carapace/go.mod index 15520d67..0ea1d17d 100644 --- a/external/carapace/go.mod +++ b/external/carapace/go.mod @@ -6,5 +6,8 @@ require ( github.com/rsteube/carapace-shlex v0.1.2 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 + golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 gopkg.in/yaml.v3 v3.0.1 ) + +require github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/external/carapace/go.work b/external/carapace/go.work deleted file mode 100644 index 8af51741..00000000 --- a/external/carapace/go.work +++ /dev/null @@ -1,6 +0,0 @@ -go 1.19 - -use ( - . - ./example-nonposix -) diff --git a/external/carapace/go.work.sum b/external/carapace/go.work.sum deleted file mode 100644 index 16057574..00000000 --- a/external/carapace/go.work.sum +++ /dev/null @@ -1,27 +0,0 @@ -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/rsteube/carapace-pflag v0.0.4 h1:Onb0cLNLxg1xJr2EsMlBldAI5KkybrvZ89b5cRElZXI= -github.com/rsteube/carapace-pflag v0.0.4/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/rsteube/carapace-pflag v0.0.5 h1:QQC0KnthHMayHsX7B7DxqOkr0B6JSIM0glB+KrSTruU= -github.com/rsteube/carapace-pflag v0.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/rsteube/carapace-pflag v0.1.0 h1:CPJRlj3jbyOnxuMf5pdrM76hEwdQ0STDDmkAHQcGbhg= -github.com/rsteube/carapace-pflag v0.1.0/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/rsteube/carapace-pflag v0.2.0 h1:EYqFO9Haib3NDCPqKu0VxOGi9YQBkXk1IzlHdT0M0vw= -github.com/rsteube/carapace-pflag v0.2.0/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/rsteube/carapace-shlex v0.0.1 h1:8uvsc+ISKw7uoITSp92nNisFUOulYMz+Uu7N5nbHTiM= -github.com/rsteube/carapace-shlex v0.0.1/go.mod h1:zPw1dOFwvLPKStUy9g2BYKanI6bsQMATzDMYQQybo3o= -github.com/rsteube/carapace-shlex v0.1.2 h1:ZKjhIfXoCkEnzensMglTaLbkNOaLkmM8SCRshpJKx6s= -github.com/rsteube/carapace-shlex v0.1.2/go.mod h1:zPw1dOFwvLPKStUy9g2BYKanI6bsQMATzDMYQQybo3o= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/external/carapace/internal/common/dash.go b/external/carapace/internal/common/dash.go index f53c9cc4..d849bebb 100644 --- a/external/carapace/internal/common/dash.go +++ b/external/carapace/internal/common/dash.go @@ -2,7 +2,7 @@ package common import ( "github.com/spf13/cobra" - "slices" + "golang.org/x/exp/slices" ) // IsDash checks if command contains a dash disabling flag parsing diff --git a/go.mod b/go.mod index 6f374c61..d707121c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/chainreactors/malice-network -go 1.22 +go 1.20 require ( filippo.io/age v1.1.1 @@ -16,27 +16,26 @@ require ( github.com/gofrs/uuid v4.4.0+incompatible github.com/golang/snappy v0.0.4 github.com/gookit/config/v2 v2.2.5 - github.com/jessevdk/go-flags v1.5.0 + github.com/jessevdk/go-flags v1.6.1 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/klauspost/compress v1.17.0 github.com/mattn/go-tty v0.0.7 github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a github.com/ncruces/go-sqlite3 v0.9.0 - github.com/nikoksr/notify v1.0.0 - github.com/pterm/pterm v0.12.69 + github.com/nikoksr/notify v0.41.0 github.com/reeflective/console v0.1.18 github.com/robfig/cron/v3 v3.0.0 github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/tetratelabs/wazero v1.5.0 - github.com/traefik/yaegi v0.16.1 + github.com/traefik/yaegi v0.14.3 github.com/wabzsy/gonut v1.0.0 github.com/yuin/gopher-lua v1.1.1 golang.org/x/crypto v0.28.0 - golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa + golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 golang.org/x/text v0.19.0 - google.golang.org/grpc v1.67.1 + google.golang.org/grpc v1.57.2 google.golang.org/protobuf v1.36.1 gopkg.in/yaml.v3 v3.0.1 gorm.io/gorm v1.25.4 @@ -44,9 +43,6 @@ require ( require ( al.essio.dev/pkg/shellescape v1.5.1 // indirect - atomicgo.dev/cursor v0.2.0 // indirect - atomicgo.dev/keyboard v0.2.9 // indirect - atomicgo.dev/schedule v0.1.0 // indirect dario.cat/mergo v1.0.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a // indirect @@ -65,7 +61,6 @@ require ( github.com/charmbracelet/x/term v0.1.1 // indirect github.com/charmbracelet/x/windows v0.1.0 // indirect github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect @@ -87,15 +82,14 @@ require ( github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect github.com/goccy/go-yaml v1.12.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/gookit/color v1.5.4 // indirect github.com/gookit/goutil v0.6.15 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/lib/pq v1.10.9 // indirect - github.com/lithammer/fuzzysearch v1.1.8 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -133,17 +127,25 @@ require ( github.com/yuin/goldmark-emoji v1.0.3 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel v1.31.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.17.0 // indirect go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/sdk v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect + golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/term v0.25.0 // indirect + golang.org/x/time v0.9.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect gotest.tools/v3 v3.5.1 // indirect layeh.com/gopher-luar v1.0.11 // indirect mvdan.cc/sh/v3 v3.7.0 // indirect ) + +replace ( + github.com/reeflective/console => ./external/console + github.com/reeflective/readline => ./external/readline + github.com/rsteube/carapace => ./external/carapace + github.com/wabzsy/gonut => ./external/gonut +) diff --git a/go.sum b/go.sum index 46371b38..1090dd24 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,5 @@ al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho= al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= -atomicgo.dev/assert v0.0.2 h1:FiKeMiZSgRrZsPo9qn/7vmr7mCsh5SZyXY4YGYiYwrg= -atomicgo.dev/assert v0.0.2/go.mod h1:ut4NcI3QDdJtlmAxQULOmA13Gz6e2DWbSAS8RUOmNYQ= -atomicgo.dev/cursor v0.2.0 h1:H6XN5alUJ52FZZUkI7AlJbUc1aW38GWZalpYRPpoPOw= -atomicgo.dev/cursor v0.2.0/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU= -atomicgo.dev/keyboard v0.2.9 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8= -atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ= -atomicgo.dev/schedule v0.1.0 h1:nTthAbhZS5YZmgYbb2+DH8uQIZcTlIrd4eYr3UQxEjs= -atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8pEU= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= @@ -15,41 +7,26 @@ filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a h1:4c0nc0krv8eh7gD809n+swLaCuFyHpxdrxwx0ZmHvBw= github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a/go.mod h1:QzgxDLY/qdKlvnbnb65eqTedhvQPbaSP2NqIbcuKvsQ= -github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs= -github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8= -github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII= -github.com/MarvinJWendt/testza v0.2.10/go.mod h1:pd+VWsoGUiFtq+hRKSU1Bktnn+DMCSrDrXDpX2bG66k= -github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzXjB69adAhzZkI= -github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c= -github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE= -github.com/MarvinJWendt/testza v0.5.2 h1:53KDo64C1z/h/d/stCYCPY69bt/OSwjq5KpFNwi+zB4= -github.com/MarvinJWendt/testza v0.5.2/go.mod h1:xu53QFE5sCdjtMCKk8YMQ2MnymimEctc4n3EjyIYvEY= github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE= -github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E= github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= -github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= -github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/blinkbean/dingtalk v1.1.3 h1:MbidFZYom7DTFHD/YIs+eaI7kRy52kmWE/sy0xjo6E4= github.com/blinkbean/dingtalk v1.1.3/go.mod h1:9BaLuGSBqY3vT5hstValh48DbsKO7vaHaJnG9pXwbto= github.com/cbroglie/mustache v1.4.0 h1:Azg0dVhxTml5me+7PsZ7WPrQq1Gkf3WApcHMjMprYoU= github.com/cbroglie/mustache v1.4.0/go.mod h1:SS1FTIghy0sjse4DUVGV1k/40B1qE1XkD9DtDsHo9iM= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/chainreactors/files v0.0.0-20231102192550-a652458cee26/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 h1:cU3sGEODXZsUZGBXfnz0nyxF6+37vA+ZGDx6L/FKN4o= github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0/go.mod h1:NSxGNMRWryAyrDzZpVwmujI22wbGw6c52bQOd5zEvyU= @@ -75,7 +52,6 @@ github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDU github.com/charmbracelet/x/ansi v0.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM= github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a h1:G99klV19u0QnhiizODirwVksQB91TJKV/UaTnACcG30= -github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= github.com/charmbracelet/x/input v0.1.0 h1:TEsGSfZYQyOtp+STIjyBq6tpRaorH0qpwZUj8DavAhQ= github.com/charmbracelet/x/input v0.1.0/go.mod h1:ZZwaBxPF7IG8gWWzPUVqHEtWhc1+HXJPNuerJGRGZ28= github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI= @@ -87,12 +63,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9 h1:rdWOzitWlNYeUsXmz+IQfa9NkGEq3gA/qQ3mOEqBU6o= github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9/go.mod h1:X97UjDTXp+7bayQSFZk2hPvCTmTZIicUjZQRtkwgAKY= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -133,12 +105,9 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible h1:2cauKuaELYAEARXRkq2LrJ0yDDv1rW7+wrTEdVL3uaU= @@ -149,17 +118,16 @@ github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1 github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= -github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= github.com/gookit/config/v2 v2.2.5 h1:RECbYYbtherywmzn3LNeu9NA5ZqhD7MSKEMsJ7l+MpU= @@ -167,17 +135,16 @@ github.com/gookit/config/v2 v2.2.5/go.mod h1:NeX+yiNYn6Ei10eJvCQFXuHEPIE/IPS8bqa github.com/gookit/goutil v0.6.15 h1:mMQ0ElojNZoyPD0eVROk5QXJPh2uKR4g06slgPDF5Jo= github.com/gookit/goutil v0.6.15/go.mod h1:qdKdYEHQdEtyH+4fNdQNZfJHhI0jUZzHxQVAV3DaMDY= github.com/gookit/ini/v2 v2.2.3 h1:nSbN+x9OfQPcMObTFP+XuHt8ev6ndv/fWWqxFhPMu2E= -github.com/gookit/ini/v2 v2.2.3/go.mod h1:Vu6p7P7xcfmb8KYu3L0ek8bqu/Im63N81q208SCCZY4= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jessevdk/go-flags v1.5.1-0.20210607101731-3927b71304df h1:JTDw/M13b6dZmEJI/vfcCLENqcjUHi9UBry+R0pjh5Q= +github.com/jessevdk/go-flags v1.5.1-0.20210607101731-3927b71304df/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= +github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= @@ -185,34 +152,21 @@ github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA= -github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= -github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4= -github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -223,7 +177,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= @@ -254,8 +207,8 @@ github.com/ncruces/go-sqlite3 v0.9.0 h1:tl5eEmGEyzZH2ur8sDgPJTdzV4CRnKpsFngoP1QR github.com/ncruces/go-sqlite3 v0.9.0/go.mod h1:IyRoNwT0Z+mNRXIVeP2DgWPNl78Kmc/B+pO9i6GNgRg= github.com/ncruces/julianday v0.1.5 h1:hDJ9ejiMp3DHsoZ5KW4c1lwfMjbARS7u/gbYcd0FBZk= github.com/ncruces/julianday v0.1.5/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= -github.com/nikoksr/notify v1.0.0 h1:qe9/6FRsWdxBgQgWcpvQ0sv8LRGJZDpRB4TkL2uNdO8= -github.com/nikoksr/notify v1.0.0/go.mod h1:hPaaDt30d6LAA7/5nb0e48Bp/MctDfycCSs8VEgN29I= +github.com/nikoksr/notify v0.41.0 h1:4LGE41GpWdHX5M3Xo6DlWRwS2WLDbOq1Rk7IzY4vjmQ= +github.com/nikoksr/notify v0.41.0/go.mod h1:FoE0UVPeopz1Vy5nm9vQZ+JVmYjEIjQgbFstbkw+cRE= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -266,19 +219,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI= -github.com/pterm/pterm v0.12.29/go.mod h1:WI3qxgvoQFFGKGjGnJR849gU0TsEOvKn5Q8LlY1U7lg= -github.com/pterm/pterm v0.12.30/go.mod h1:MOqLIyMOgmTDz9yorcYbcw+HsgoZo3BQfg2wtl3HEFE= -github.com/pterm/pterm v0.12.31/go.mod h1:32ZAWZVXD7ZfG0s8qqHXePte42kdz8ECtRyEejaWgXU= -github.com/pterm/pterm v0.12.33/go.mod h1:x+h2uL+n7CP/rel9+bImHD5lF3nM9vJj80k9ybiiTTE= -github.com/pterm/pterm v0.12.36/go.mod h1:NjiL09hFhT/vWjQHSj1athJpx6H8cjpHXNAK5bUw8T8= -github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s= -github.com/pterm/pterm v0.12.69 h1:fBCKnB8dSLAl8FlYRQAWYGp2WTI/Xm/tKJ21Hyo9USw= -github.com/pterm/pterm v0.12.69/go.mod h1:wl06ko9MHnqxz4oDV++IORDpjCzw6+mfrvf0MPj6fdk= -github.com/reeflective/console v0.1.18 h1:DFbR1UgOa/aBSQ1I4saR9Abehqz1UVI3j3J4kPxg37k= -github.com/reeflective/console v0.1.18/go.mod h1:N1wqj5ZIioccp+pFxWh6lHp80si6k8p8uznZ0CwKoiQ= -github.com/reeflective/readline v1.0.15 h1:uB/M1sAc2yZGO14Ujgr/imLwQXqGdOhDDWAEHF+MBaE= -github.com/reeflective/readline v1.0.15/go.mod h1:3iOe/qyb2jEy0KqLrNlb/CojBVqxga9ACqz/VU22H6A= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= @@ -288,20 +228,13 @@ github.com/robfig/cron/v3 v3.0.0/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69 h1:ctOUuKn5PO6VtwtaS7unNrm6u20YXESPtnKEie/u304= -github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69/go.mod h1:4ZC5bulItu9t9sZ5yPcHgPREd8rPf274Q732n+wfl/o= -github.com/rsteube/carapace-shlex v0.1.1/go.mod h1:zPw1dOFwvLPKStUy9g2BYKanI6bsQMATzDMYQQybo3o= github.com/rsteube/carapace-shlex v0.1.2 h1:ZKjhIfXoCkEnzensMglTaLbkNOaLkmM8SCRshpJKx6s= github.com/rsteube/carapace-shlex v0.1.2/go.mod h1:zPw1dOFwvLPKStUy9g2BYKanI6bsQMATzDMYQQybo3o= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y= github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -313,8 +246,6 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -327,22 +258,18 @@ github.com/tengattack/gluacrypto v0.0.0-20240324200146-54b58c95c255 h1:F5kNKVmoh github.com/tengattack/gluacrypto v0.0.0-20240324200146-54b58c95c255/go.mod h1:stSpJ0yGGTNigTjOoPd2QkUaZhRxEHcYhCpJUdl1bsQ= github.com/tetratelabs/wazero v1.5.0 h1:Yz3fZHivfDiZFUXnWMPUoiW7s8tC1sjdBtlJn08qYa0= github.com/tetratelabs/wazero v1.5.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A= -github.com/traefik/yaegi v0.16.1 h1:f1De3DVJqIDKmnasUF6MwmWv1dSEEat0wcpXhD2On3E= -github.com/traefik/yaegi v0.16.1/go.mod h1:4eVhbPb3LnD2VigQjhYbEJ69vDRFdT2HQNrXx8eEwUY= +github.com/traefik/yaegi v0.14.3 h1:LqA0k8DKwvRMc+msfQjNusphHJc+r6WC5tZU5TmUFOM= +github.com/traefik/yaegi v0.14.3/go.mod h1:AVRxhaI2G+nUsaM1zyktzwXn69G3t/AuTDrCiTds9p0= github.com/twmb/murmur3 v1.1.8 h1:8Yt9taO/WN3l08xErzjeschgZU2QSrwm1kclYq+0aRg= github.com/twmb/murmur3 v1.1.8/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/wabzsy/compression v0.0.0-20230725232933-73109bacf457 h1:kR0qkMaKhi6GRveEKP6zB9lxpZxCUB1aWfjRV2gXWeg= github.com/wabzsy/compression v0.0.0-20230725232933-73109bacf457/go.mod h1:3anGK27b6w/V1xJYX3VQ0YRzmIwspU3pU6MUF1mWd7Q= -github.com/wabzsy/gonut v1.0.0 h1:s1sDtkWhtGwBC8dvpj6lw4XgZqA2n6CsDTmKLD9ZA6w= -github.com/wabzsy/gonut v1.0.0/go.mod h1:uOFLBJR0lkf6AtDwk4prWN5CMmhhN9S2ZTLqZ/y31Pk= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yuin/gluamapper v0.0.0-20150323120927-d836955830e7 h1:noHsffKZsNfU38DwcXWEPldrTjIZ8FPNKx8mYMGnqjs= github.com/yuin/gluamapper v0.0.0-20150323120927-d836955830e7/go.mod h1:bbMEM6aU1WDF1ErA5YJ0p91652pGv140gGw4Ww3RGp8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg= github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= @@ -356,111 +283,80 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIX go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.17.0 h1:U5GYackKpVKlPrd/5gKMlrTlP2dCESAAFU682VCpieY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.17.0 h1:kvWMtSUNVylLVrOE4WLUmBtgziYoCIYUNSpTYtMzVJI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.17.0/go.mod h1:SExUrRYIXhDgEKG4tkiQovd2HTaELiHUsuK08s5Nqx4= go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d h1:/hmn0Ku5kWij/kjGsrcJeC1T/MrJi2iNWwgAqrihFwc= -google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg= -google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/grpc v1.57.2 h1:uw37EN34aMFFXB2QPW7Tq6tdTbind1GpRxw5aOX3a5k= +google.golang.org/grpc v1.57.2/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/go.work b/go.work deleted file mode 100644 index db36013b..00000000 --- a/go.work +++ /dev/null @@ -1,9 +0,0 @@ -go 1.22.7 - -use ( - . - external/carapace - external/console - external/readline - external/gonut -) diff --git a/server/internal/configs/listener.go b/server/internal/configs/listener.go index 69db4a99..461dd2d5 100644 --- a/server/internal/configs/listener.go +++ b/server/internal/configs/listener.go @@ -6,8 +6,8 @@ import ( "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/server/internal/stream" + "golang.org/x/exp/slices" "os" - "slices" ) var ListenerConfigFileName = "listener.yaml" From 867752d91306b4dd01f7097899208fe5ffe52691 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 13 Jan 2025 17:18:15 +0800 Subject: [PATCH 24/40] fix: go/exp adapt go1.20 --- external/carapace/go.mod | 2 +- go.mod | 4 ++-- go.sum | 7 +------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/external/carapace/go.mod b/external/carapace/go.mod index 0ea1d17d..b723b8bc 100644 --- a/external/carapace/go.mod +++ b/external/carapace/go.mod @@ -6,7 +6,7 @@ require ( github.com/rsteube/carapace-shlex v0.1.2 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.mod b/go.mod index d707121c..17fe90e0 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a github.com/ncruces/go-sqlite3 v0.9.0 github.com/nikoksr/notify v0.41.0 - github.com/reeflective/console v0.1.18 + github.com/reeflective/console v0.0.0-00010101000000-000000000000 github.com/robfig/cron/v3 v3.0.0 github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69 github.com/spf13/cobra v1.8.1 @@ -33,7 +33,7 @@ require ( github.com/wabzsy/gonut v1.0.0 github.com/yuin/gopher-lua v1.1.1 golang.org/x/crypto v0.28.0 - golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa golang.org/x/text v0.19.0 google.golang.org/grpc v1.57.2 google.golang.org/protobuf v1.36.1 diff --git a/go.sum b/go.sum index 1090dd24..aa016fdb 100644 --- a/go.sum +++ b/go.sum @@ -141,8 +141,6 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rH github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jessevdk/go-flags v1.5.1-0.20210607101731-3927b71304df h1:JTDw/M13b6dZmEJI/vfcCLENqcjUHi9UBry+R0pjh5Q= -github.com/jessevdk/go-flags v1.5.1-0.20210607101731-3927b71304df/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= @@ -300,7 +298,6 @@ golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= -golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -312,8 +309,7 @@ golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -321,7 +317,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 47a7cc40c8129a35c23e63047d7b9584962b0085 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 13 Jan 2025 18:18:12 +0800 Subject: [PATCH 25/40] chore: adapt server go1.20 --- go.mod | 30 +++++++++------------ go.sum | 48 +++++++-------------------------- server/internal/build/build.go | 13 ++++----- server/internal/core/session.go | 4 ++- server/listener/listener.go | 2 +- server/root/client.go | 2 +- server/rpc/rpc-session.go | 5 +++- 7 files changed, 38 insertions(+), 66 deletions(-) diff --git a/go.mod b/go.mod index 17fe90e0..87ec2d32 100644 --- a/go.mod +++ b/go.mod @@ -5,13 +5,12 @@ go 1.20 require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 - github.com/chainreactors/mals v0.0.0-20250108111740-7701bd16eae5 + github.com/chainreactors/mals v0.0.0-20250113101555-63f07ba66262 github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 github.com/charmbracelet/glamour v0.8.0 github.com/charmbracelet/lipgloss v0.13.0 - github.com/docker/docker v27.3.1+incompatible github.com/evertras/bubble-table v0.17.1 github.com/gofrs/uuid v4.4.0+incompatible github.com/golang/snappy v0.0.4 @@ -33,14 +32,22 @@ require ( github.com/wabzsy/gonut v1.0.0 github.com/yuin/gopher-lua v1.1.1 golang.org/x/crypto v0.28.0 - golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa golang.org/x/text v0.19.0 - google.golang.org/grpc v1.57.2 - google.golang.org/protobuf v1.36.1 gopkg.in/yaml.v3 v3.0.1 gorm.io/gorm v1.25.4 ) +// compatibility + +require ( + github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/docker/docker v24.0.9+incompatible + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa + google.golang.org/grpc v1.57.2 + google.golang.org/protobuf v1.34.1 + +) + require ( al.essio.dev/pkg/shellescape v1.5.1 // indirect dario.cat/mergo v1.0.0 // indirect @@ -61,23 +68,18 @@ require ( github.com/charmbracelet/x/term v0.1.1 // indirect github.com/charmbracelet/x/windows v0.1.0 // indirect github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9 // indirect - github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.11.0 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/fatih/color v1.16.0 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect github.com/frankban/quicktest v1.14.6 // indirect github.com/go-dedup/megophone v0.0.0-20170830025436-f01be21026f5 // indirect github.com/go-dedup/simhash v0.0.0-20170904020510-9ecaca7b509c // indirect github.com/go-dedup/text v0.0.0-20170907015346-8bb1b95e3cb7 // indirect github.com/go-lark/lark v1.14.1 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect github.com/goccy/go-yaml v1.12.0 // indirect @@ -98,7 +100,6 @@ require ( github.com/mattn/go-sqlite3 v1.14.24 // indirect github.com/microcosm-cc/bluemonday v1.0.27 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.0 // indirect github.com/montanaflynn/stats v0.7.1 // indirect github.com/morikuni/aec v1.0.0 // indirect @@ -125,12 +126,6 @@ require ( github.com/yuin/gluamapper v0.0.0-20150323120927-d836955830e7 // indirect github.com/yuin/goldmark v1.7.4 // indirect github.com/yuin/goldmark-emoji v1.0.3 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.31.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.17.0 // indirect - go.opentelemetry.io/otel/metric v1.31.0 // indirect - go.opentelemetry.io/otel/sdk v1.31.0 // indirect - go.opentelemetry.io/otel/trace v1.31.0 // indirect golang.org/x/net v0.30.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.26.0 // indirect @@ -144,6 +139,7 @@ require ( ) replace ( + //github.com/docker/distribution => github.com/docker/distribution v2.6.2+incompatible github.com/reeflective/console => ./external/console github.com/reeflective/readline => ./external/readline github.com/rsteube/carapace => ./external/carapace diff --git a/go.sum b/go.sum index aa016fdb..0a20b869 100644 --- a/go.sum +++ b/go.sum @@ -26,14 +26,13 @@ github.com/blinkbean/dingtalk v1.1.3 h1:MbidFZYom7DTFHD/YIs+eaI7kRy52kmWE/sy0xjo github.com/blinkbean/dingtalk v1.1.3/go.mod h1:9BaLuGSBqY3vT5hstValh48DbsKO7vaHaJnG9pXwbto= github.com/cbroglie/mustache v1.4.0 h1:Azg0dVhxTml5me+7PsZ7WPrQq1Gkf3WApcHMjMprYoU= github.com/cbroglie/mustache v1.4.0/go.mod h1:SS1FTIghy0sjse4DUVGV1k/40B1qE1XkD9DtDsHo9iM= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/chainreactors/files v0.0.0-20231102192550-a652458cee26/go.mod h1:/Xa9YXhjBlaC33JTD6ZTJFig6pcplak2IDcovf42/6A= github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 h1:cU3sGEODXZsUZGBXfnz0nyxF6+37vA+ZGDx6L/FKN4o= github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0/go.mod h1:NSxGNMRWryAyrDzZpVwmujI22wbGw6c52bQOd5zEvyU= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= -github.com/chainreactors/mals v0.0.0-20250108111740-7701bd16eae5 h1:V6ZapihNk36R+c48SYKJWhqBfVKwquqUqJcKY0chTUM= -github.com/chainreactors/mals v0.0.0-20250108111740-7701bd16eae5/go.mod h1:/dYh9T/vQ2zarhZmlGdch/ZTgXD/s/t3jOqoHYoiRLE= +github.com/chainreactors/mals v0.0.0-20250113101555-63f07ba66262 h1:+Vf9oFzm8+rMsnac1ZiBJW+G3F/BjOVsiNxURPDTnX8= +github.com/chainreactors/mals v0.0.0-20250113101555-63f07ba66262/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/utils v0.0.0-20240716182459-e85f2b01ee16/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= @@ -63,19 +62,17 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9 h1:rdWOzitWlNYeUsXmz+IQfa9NkGEq3gA/qQ3mOEqBU6o= github.com/cjoudrey/gluahttp v0.0.0-20201111170219-25003d9adfa9/go.mod h1:X97UjDTXp+7bayQSFZk2hPvCTmTZIicUjZQRtkwgAKY= -github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= -github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= -github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= +github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -88,8 +85,6 @@ github.com/evertras/bubble-table v0.17.1 h1:HJwq3iQrZulXDE93ZcqJNiUVQCBbN4IJ2CkB github.com/evertras/bubble-table v0.17.1/go.mod h1:ifHujS1YxwnYSOgcR2+m3GnJ84f7CVU/4kUOxUCjEbQ= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-dedup/megophone v0.0.0-20170830025436-f01be21026f5 h1:4U+x+EB1P66zwYgTjxWXSOT8vF+651Ksr1lojiCZnT8= @@ -100,11 +95,6 @@ github.com/go-dedup/text v0.0.0-20170907015346-8bb1b95e3cb7 h1:11wFcswN+37U+Byjx github.com/go-dedup/text v0.0.0-20170907015346-8bb1b95e3cb7/go.mod h1:wSsK4VOECOSfSYTzkBFw+iGY7wj59e7X96ABtNj9aCQ= github.com/go-lark/lark v1.14.1 h1:qWYQTk6wLwf/08u8WbdNAHNmfqavdOvmsENlQ+Cb8aY= github.com/go-lark/lark v1.14.1/go.mod h1:6ltbSztPZRT6IaO9ZIQyVaY5pVp/KeMizDYtfZkU+vM= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= @@ -127,7 +117,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= github.com/gookit/config/v2 v2.2.5 h1:RECbYYbtherywmzn3LNeu9NA5ZqhD7MSKEMsJ7l+MpU= @@ -137,7 +126,6 @@ github.com/gookit/goutil v0.6.15/go.mod h1:qdKdYEHQdEtyH+4fNdQNZfJHhI0jUZzHxQVAV github.com/gookit/ini/v2 v2.2.3 h1:nSbN+x9OfQPcMObTFP+XuHt8ev6ndv/fWWqxFhPMu2E= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -185,8 +173,6 @@ github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwX github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= -github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= @@ -232,7 +218,7 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y= github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -277,20 +263,6 @@ github.com/yuin/gopher-lua v0.0.0-20190206043414-8bfc7677f583/go.mod h1:gqRgreBU github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.17.0 h1:U5GYackKpVKlPrd/5gKMlrTlP2dCESAAFU682VCpieY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.17.0 h1:kvWMtSUNVylLVrOE4WLUmBtgziYoCIYUNSpTYtMzVJI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.17.0/go.mod h1:SExUrRYIXhDgEKG4tkiQovd2HTaELiHUsuK08s5Nqx4= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -340,16 +312,14 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.57.2 h1:uw37EN34aMFFXB2QPW7Tq6tdTbind1GpRxw5aOX3a5k= google.golang.org/grpc v1.57.2/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= -google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/server/internal/build/build.go b/server/internal/build/build.go index f186419c..73ae0785 100644 --- a/server/internal/build/build.go +++ b/server/internal/build/build.go @@ -4,6 +4,7 @@ import ( "bufio" "context" "fmt" + "github.com/docker/docker/api/types" "io" "math/rand" "os" @@ -99,7 +100,7 @@ func BuildBeacon(cli *client.Client, req *clientpb.Generate) error { return err } - if err := cli.ContainerStart(ctx, resp.ID, container.StartOptions{}); err != nil { + if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { logs.Log.Errorf("Error starting container: %v", err) } sendContaninerCtrlMsg(false, containerName, req) @@ -145,7 +146,7 @@ func BuildBind(cli *client.Client, req *clientpb.Generate) error { return err } - if err := cli.ContainerStart(ctx, resp.ID, container.StartOptions{}); err != nil { + if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { logs.Log.Errorf("Error starting container: %v", err) } @@ -196,7 +197,7 @@ func BuildPrelude(cli *client.Client, req *clientpb.Generate) error { return err } - if err := cli.ContainerStart(ctx, resp.ID, container.StartOptions{}); err != nil { + if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { logs.Log.Errorf("Error starting container: %v", err) } @@ -244,7 +245,7 @@ func BuildPulse(cli *client.Client, req *clientpb.Generate) error { return err } - if err := cli.ContainerStart(ctx, resp.ID, container.StartOptions{}); err != nil { + if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { logs.Log.Errorf("Error starting container: %v", err) } @@ -295,7 +296,7 @@ func BuildModules(cli *client.Client, req *clientpb.Generate) error { return err } - if err := cli.ContainerStart(ctx, resp.ID, container.StartOptions{}); err != nil { + if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { logs.Log.Errorf("Error starting container: %v", err) } @@ -430,7 +431,7 @@ func MaleficSRDI(src, dst, platform, arch, funcName, dataPath string) ([]byte, e } func catchLogs(cli *client.Client, containerID, name string) error { - logOptions := container.LogsOptions{ + logOptions := types.ContainerLogsOptions{ ShowStdout: true, ShowStderr: true, Follow: true, diff --git a/server/internal/core/session.go b/server/internal/core/session.go index b8be96dc..bab924c3 100644 --- a/server/internal/core/session.go +++ b/server/internal/core/session.go @@ -137,7 +137,9 @@ func RecoverSession(sess *clientpb.Session) (*Session, error) { if err != nil { return nil, err } - tid = max(tid, uint32(logID)) + if uint32(logID) > tid { + tid = uint32(logID) + } } s.Taskseq = tid for _, task := range tasks { diff --git a/server/listener/listener.go b/server/listener/listener.go index 5f758570..7fd69e71 100644 --- a/server/listener/listener.go +++ b/server/listener/listener.go @@ -33,7 +33,7 @@ func NewListener(clientConf *mtls.ClientConfig, cfg *configs.ListenerConfig) err return err } serverAddress := listenerCfg.Address() - conn, err := grpc.NewClient(serverAddress, options...) + conn, err := grpc.Dial(serverAddress, options...) if err != nil { return err } diff --git a/server/root/client.go b/server/root/client.go index 5b2bcc97..36af227c 100644 --- a/server/root/client.go +++ b/server/root/client.go @@ -26,7 +26,7 @@ func NewRootClient(addr string) (*RootClient, error) { if err != nil { return nil, err } - conn, err := grpc.NewClient(addr, options...) + conn, err := grpc.Dial(addr, options...) if err != nil { return nil, err } diff --git a/server/rpc/rpc-session.go b/server/rpc/rpc-session.go index af0d3fac..b6e6a3ec 100644 --- a/server/rpc/rpc-session.go +++ b/server/rpc/rpc-session.go @@ -125,7 +125,10 @@ func (rpc *Server) GetSessionHistory(ctx context.Context, req *clientpb.Int) (*c tid = int(session.Taskseq) } - startTaskID := max(1, tid-int(req.Limit)+1) + startTaskID := tid - int(req.Limit) + 1 + if startTaskID < 1 { + startTaskID = 1 + } endTaskID := tid re := regexp.MustCompile(`^(\d+)_(\d+)$`) From 183036c19fe8e674e6e4fde171e0ed3f7fd6189d Mon Sep 17 00:00:00 2001 From: M09Ic Date: Tue, 14 Jan 2025 19:43:15 +0800 Subject: [PATCH 26/40] feat: fix grpc not register to lua and refactor protobuf message on lua --- README.md | 10 ++++++++++ client/cmd/genlua/gen_lua.go | 7 +++++-- client/core/plugin/lua.go | 16 ---------------- go.mod | 3 +-- go.sum | 6 ++++-- helper/intermediate/builtin.go | 13 +++++++++---- helper/proto/client/clientpb/client.pb.go | 5 +++-- helper/proto/client/rootpb/root.pb.go | 4 ++-- helper/proto/implant/implantpb/implant.pb.go | 5 +++-- helper/proto/implant/implantpb/module.pb.go | 6 +++--- helper/proto/services/clientrpc/service.pb.go | 4 ++-- .../proto/services/clientrpc/service_grpc.pb.go | 2 +- helper/proto/services/listenerrpc/service.pb.go | 4 ++-- .../services/listenerrpc/service_grpc.pb.go | 2 +- 14 files changed, 46 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 8cf092d5..8f367af8 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,16 @@ https://chainreactors.github.io/wiki/IoM/roadmap/ armory + +## Dependency + +```bash +scoop install protobuf + +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 +go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1 +``` + ## Thanks - [sliver](https://github.com/BishopFox/sliver) 从中参考并复用了大量的代码 diff --git a/client/cmd/genlua/gen_lua.go b/client/cmd/genlua/gen_lua.go index 8e7acd6a..ba947846 100644 --- a/client/cmd/genlua/gen_lua.go +++ b/client/cmd/genlua/gen_lua.go @@ -30,8 +30,11 @@ func main() { intermediate.RegisterBuiltin(rpc) command.RegisterClientFunc(con) command.RegisterImplantFunc(con) - vm := mals.NewLuaVM() - mals.GenerateLuaDefinitionFile(vm, "define.lua", plugin.ProtoPackage, intermediate.InternalFunctions.All()) + vm := plugin.NewLuaVM() + mals.GenerateLuaDefinitionFile(vm, intermediate.BuiltinPackage, plugin.ProtoPackage, intermediate.InternalFunctions.Package(intermediate.BuiltinPackage)) + mals.GenerateLuaDefinitionFile(vm, intermediate.RpcPackage, plugin.ProtoPackage, intermediate.InternalFunctions.Package(intermediate.RpcPackage)) + mals.GenerateLuaDefinitionFile(vm, intermediate.BeaconPackage, plugin.ProtoPackage, intermediate.InternalFunctions.Package(intermediate.BeaconPackage)) + mals.GenerateMarkdownDefinitionFile(vm, intermediate.BuiltinPackage, "builtin.md", intermediate.InternalFunctions.Package(intermediate.BuiltinPackage)) mals.GenerateMarkdownDefinitionFile(vm, intermediate.RpcPackage, "rpc.md", intermediate.InternalFunctions.Package(intermediate.RpcPackage)) mals.GenerateMarkdownDefinitionFile(vm, intermediate.BeaconPackage, "beacon.md", intermediate.InternalFunctions.Package(intermediate.BeaconPackage)) diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index 838d847e..0dd2232a 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -24,7 +24,6 @@ import ( "github.com/chainreactors/malice-network/helper/intermediate" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/types" - "github.com/chainreactors/malice-network/helper/utils/pe" "github.com/chainreactors/mals" ) @@ -470,18 +469,3 @@ func NewLuaVM() *lua.LState { } return vm } - -func FormatLua(value lua.LValue) interface{} { - switch v := value.(type) { - case *lua.LUserData: - switch v.Value.(type) { - case *pe.BOFResponses: - //resp.Handler() - return nil - default: - return mals.ConvertLuaValueToGo(value) - } - default: - return mals.ConvertLuaValueToGo(value) - } -} diff --git a/go.mod b/go.mod index 87ec2d32..cfe34335 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 - github.com/chainreactors/mals v0.0.0-20250113101555-63f07ba66262 + github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05 github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 @@ -45,7 +45,6 @@ require ( golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa google.golang.org/grpc v1.57.2 google.golang.org/protobuf v1.34.1 - ) require ( diff --git a/go.sum b/go.sum index 0a20b869..e7dc0ff9 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,10 @@ github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 h1:cU3sGEODXZs github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0/go.mod h1:NSxGNMRWryAyrDzZpVwmujI22wbGw6c52bQOd5zEvyU= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= -github.com/chainreactors/mals v0.0.0-20250113101555-63f07ba66262 h1:+Vf9oFzm8+rMsnac1ZiBJW+G3F/BjOVsiNxURPDTnX8= -github.com/chainreactors/mals v0.0.0-20250113101555-63f07ba66262/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= +github.com/chainreactors/mals v0.0.0-20250114095843-1768d0794ce4 h1:WX+UK60fmKxviYAETeohv5Ml9ORv35xJRWgLsB3eCII= +github.com/chainreactors/mals v0.0.0-20250114095843-1768d0794ce4/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= +github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05 h1:E8352+uYbWT3ycyI1LJ8UAtT30XZtVwC8Ubjg4dTOzA= +github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/utils v0.0.0-20240716182459-e85f2b01ee16/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= diff --git a/helper/intermediate/builtin.go b/helper/intermediate/builtin.go index a509d6a1..1c9b5bdb 100644 --- a/helper/intermediate/builtin.go +++ b/helper/intermediate/builtin.go @@ -45,8 +45,13 @@ type BuiltinCallback func(content interface{}) (bool, error) func RegisterBuiltin(rpc clientrpc.MaliceRPCClient) { RegisterCustomBuiltin(rpc) - mals.RegisterGRPCBuiltin(RpcPackage, rpc) RegisterEncodeFunc(rpc) + for _, fn := range mals.RegisterGRPCBuiltin(RpcPackage, rpc) { + err := RegisterInternalFunc(RpcPackage, fn.Name, fn, nil) + if err != nil { + logs.Log.Errorf("register internal function %s failed: %s", fn.Name, err) + } + } } func RegisterCustomBuiltin(rpc clientrpc.MaliceRPCClient) { @@ -93,7 +98,7 @@ sac = new_sacrifice(123, false, false, false, "") "sacrifice: sacrifice process", }, Output: []string{ - "implantpb.ExecuteBinary", + "ExecuteBinary", }, Example: ` sac = new_sacrifice(123, false, false, false, "") @@ -118,7 +123,7 @@ new_86_exec = new_86_executable("module", "filename", "args", sac) "sacrifice: sacrifice process", }, Output: []string{ - "implantpb.ExecuteBinary", + "ExecuteBinary", }, Example: ` sac = new_sacrifice(123, false, false, false, "") @@ -199,7 +204,7 @@ params = new_bypass_all() "sacrifice: sacrifice process", }, Output: []string{ - "implantpb.ExecuteBinary", + "ExecuteBinary", }, Example: ` sac = new_sacrifice(123, false, false, false, "") diff --git a/helper/proto/client/clientpb/client.pb.go b/helper/proto/client/clientpb/client.pb.go index 70717988..f402dd96 100644 --- a/helper/proto/client/clientpb/client.pb.go +++ b/helper/proto/client/clientpb/client.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v5.29.3 // source: client/clientpb/client.proto package clientpb @@ -3869,6 +3869,7 @@ type Pipeline struct { Target []string `protobuf:"bytes,6,rep,name=target,proto3" json:"target,omitempty"` BeaconPipeline string `protobuf:"bytes,7,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` // Types that are assignable to Body: + // // *Pipeline_Tcp // *Pipeline_Bind // *Pipeline_Web diff --git a/helper/proto/client/rootpb/root.pb.go b/helper/proto/client/rootpb/root.pb.go index f20762db..5bc4fb13 100644 --- a/helper/proto/client/rootpb/root.pb.go +++ b/helper/proto/client/rootpb/root.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v5.29.3 // source: client/rootpb/root.proto package rootpb diff --git a/helper/proto/implant/implantpb/implant.pb.go b/helper/proto/implant/implantpb/implant.pb.go index c0c2d299..7e66f076 100644 --- a/helper/proto/implant/implantpb/implant.pb.go +++ b/helper/proto/implant/implantpb/implant.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v5.29.3 // source: implant/implantpb/implant.proto package implantpb @@ -134,6 +134,7 @@ type Spite struct { Error uint32 `protobuf:"varint,5,opt,name=error,proto3" json:"error,omitempty"` Status *Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` // Types that are assignable to Body: + // // *Spite_Empty // *Spite_Block // *Spite_Ack diff --git a/helper/proto/implant/implantpb/module.pb.go b/helper/proto/implant/implantpb/module.pb.go index 79e2c28c..a25226c3 100644 --- a/helper/proto/implant/implantpb/module.pb.go +++ b/helper/proto/implant/implantpb/module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v5.29.3 // source: implant/implantpb/module.proto package implantpb @@ -620,7 +620,7 @@ type SockTabEntry struct { LocalAddr string `protobuf:"bytes,1,opt,name=local_addr,json=localAddr,proto3" json:"local_addr,omitempty"` RemoteAddr string `protobuf:"bytes,2,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` SkState string `protobuf:"bytes,3,opt,name=skState,proto3" json:"skState,omitempty"` - // uint32 uid = 4; + // uint32 uid = 4; Pid string `protobuf:"bytes,5,opt,name=pid,proto3" json:"pid,omitempty"` Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"` } diff --git a/helper/proto/services/clientrpc/service.pb.go b/helper/proto/services/clientrpc/service.pb.go index 572b1d4f..d9a8cf58 100644 --- a/helper/proto/services/clientrpc/service.pb.go +++ b/helper/proto/services/clientrpc/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v5.29.3 // source: services/clientrpc/service.proto package clientrpc diff --git a/helper/proto/services/clientrpc/service_grpc.pb.go b/helper/proto/services/clientrpc/service_grpc.pb.go index 6a3f231f..49d71993 100644 --- a/helper/proto/services/clientrpc/service_grpc.pb.go +++ b/helper/proto/services/clientrpc/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 +// - protoc v5.29.3 // source: services/clientrpc/service.proto package clientrpc diff --git a/helper/proto/services/listenerrpc/service.pb.go b/helper/proto/services/listenerrpc/service.pb.go index 50026409..d277751e 100644 --- a/helper/proto/services/listenerrpc/service.pb.go +++ b/helper/proto/services/listenerrpc/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v5.29.3 // source: services/listenerrpc/service.proto package listenerrpc diff --git a/helper/proto/services/listenerrpc/service_grpc.pb.go b/helper/proto/services/listenerrpc/service_grpc.pb.go index 7be43870..216d29b7 100644 --- a/helper/proto/services/listenerrpc/service_grpc.pb.go +++ b/helper/proto/services/listenerrpc/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 +// - protoc v5.29.3 // source: services/listenerrpc/service.proto package listenerrpc From d245d1f949f98c7ca32ffcdcef8e6977f218612d Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Wed, 15 Jan 2025 16:32:12 +0800 Subject: [PATCH 27/40] feat: add remove github action --- client/command/action/action.go | 26 +++-- client/command/build/build.go | 6 +- client/command/common/flagset.go | 6 +- client/command/config/github.go | 2 +- helper/proto/client/clientpb/client.pb.go | 124 ++++++++++++---------- server/config.yaml | 5 +- server/internal/build/action.go | 10 +- server/internal/build/artifacts.go | 59 +++++++--- server/internal/db/helper.go | 2 +- server/listener/listener.go | 5 + server/rpc/rpc-action.go | 2 +- 11 files changed, 150 insertions(+), 97 deletions(-) diff --git a/client/command/action/action.go b/client/command/action/action.go index 061b4876..b66bfe4b 100644 --- a/client/command/action/action.go +++ b/client/command/action/action.go @@ -14,8 +14,8 @@ import ( "strings" ) -func checkGithubArg(cmd *cobra.Command, isList bool) (string, string, string, string, error) { - owner, repo, token, file := common.ParseGithubFlags(cmd) +func checkGithubArg(cmd *cobra.Command, isList bool) (string, string, string, string, bool, error) { + owner, repo, token, file, remove := common.ParseGithubFlags(cmd) profile := assets.GetProfile().Settings if owner == "" { owner = profile.GithubOwner @@ -34,11 +34,11 @@ func checkGithubArg(cmd *cobra.Command, isList bool) (string, string, string, st file = "generate.yaml" } } - return owner, repo, token, file, nil + return owner, repo, token, file, remove, nil } func RunBeaconWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { - owner, repo, token, file, err := checkGithubArg(cmd, false) + owner, repo, token, file, remove, err := checkGithubArg(cmd, false) if err != nil { return err } @@ -67,6 +67,7 @@ func RunBeaconWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { Address: address, Ca: ca, Params: params.String(), + IsRemove: remove, } resp, err := RunWorkFlow(con, req) if err != nil { @@ -77,7 +78,7 @@ func RunBeaconWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { } func RunBindWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { - owner, repo, token, file, err := checkGithubArg(cmd, false) + owner, repo, token, file, remove, err := checkGithubArg(cmd, false) if err != nil { return err } @@ -106,6 +107,7 @@ func RunBindWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { Address: address, Ca: ca, Params: params.String(), + IsRemove: remove, } resp, err := RunWorkFlow(con, req) if err != nil { @@ -115,7 +117,7 @@ func RunBindWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { return nil } func RunPreludeWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { - owner, repo, token, file, err := checkGithubArg(cmd, false) + owner, repo, token, file, remove, err := checkGithubArg(cmd, false) if err != nil { return err } @@ -155,6 +157,7 @@ func RunPreludeWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { Address: address, Ca: ca, Params: params.String(), + IsRemove: remove, } resp, err := RunWorkFlow(con, req) if err != nil { @@ -164,7 +167,7 @@ func RunPreludeWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { return nil } func RunModulesWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { - owner, repo, token, file, err := checkGithubArg(cmd, false) + owner, repo, token, file, remove, err := checkGithubArg(cmd, false) if err != nil { return err } @@ -195,6 +198,7 @@ func RunModulesWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { Address: address, Ca: ca, Params: params.String(), + IsRemove: remove, } resp, err := RunWorkFlow(con, req) if err != nil { @@ -205,13 +209,14 @@ func RunModulesWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { } func RunPulseWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { - owner, repo, token, file, err := checkGithubArg(cmd, false) + owner, repo, token, file, remove, err := checkGithubArg(cmd, false) if err != nil { return err } name, address, buildTarget, modules, ca, interval, jitter, _ := common.ParseGenerateFlags(cmd) - if buildTarget != consts.TargetX64WindowsGnu && buildTarget != consts.TargetX86WindowsGnu { - return errors.New("pulse build target must be x86_64-pc-windows-msvc or i686-pc-windows-msvc") + if !strings.Contains(buildTarget, "windows") { + con.Log.Warn("pulse only support windows target\n") + return nil } artifactID, _ := cmd.Flags().GetUint32("artifact-id") params := &types.ProfileParams{ @@ -237,6 +242,7 @@ func RunPulseWorkFlowCmd(cmd *cobra.Command, con *repl.Console) error { Ca: ca, Params: params.String(), ArtifactId: artifactID, + IsRemove: remove, } resp, err := RunWorkFlow(con, req) if err != nil { diff --git a/client/command/build/build.go b/client/command/build/build.go index 27d86bdd..0e85343b 100644 --- a/client/command/build/build.go +++ b/client/command/build/build.go @@ -10,6 +10,7 @@ import ( "github.com/chainreactors/malice-network/helper/types" "github.com/spf13/cobra" "os" + "strings" ) func BeaconCmd(cmd *cobra.Command, con *repl.Console) error { @@ -123,8 +124,9 @@ func PulseCmd(cmd *cobra.Command, con *repl.Console) error { address, _ := cmd.Flags().GetString("address") buildTarget, _ := cmd.Flags().GetString("target") artifactId, _ := cmd.Flags().GetUint32("artifact-id") - if buildTarget != consts.TargetX64WindowsGnu && buildTarget != consts.TargetX86WindowsGnu { - return errors.New("pulse build target must be x86_64-pc-windows-gnu or i686-pc-windows-gnu") + if !strings.Contains(buildTarget, "windows") { + con.Log.Warn("pulse only support windows target\n") + return nil } go func() { _, err := con.Rpc.Build(con.Context(), &clientpb.Generate{ diff --git a/client/command/common/flagset.go b/client/command/common/flagset.go index 07606149..5178f539 100644 --- a/client/command/common/flagset.go +++ b/client/command/common/flagset.go @@ -268,14 +268,16 @@ func GithubFlagSet(f *pflag.FlagSet) { f.String("repo", "", "github repo") f.String("token", "", "github token") f.String("workflowFile", "", "github workflow file") + f.Bool("remove", false, "remove workflow") } -func ParseGithubFlags(cmd *cobra.Command) (string, string, string, string) { +func ParseGithubFlags(cmd *cobra.Command) (string, string, string, string, bool) { owner, _ := cmd.Flags().GetString("owner") repo, _ := cmd.Flags().GetString("repo") token, _ := cmd.Flags().GetString("token") file, _ := cmd.Flags().GetString("workflowFile") - return owner, repo, token, file + remove, _ := cmd.Flags().GetBool("remove") + return owner, repo, token, file, remove } func TelegramSet(f *pflag.FlagSet) { diff --git a/client/command/config/github.go b/client/command/config/github.go index 2e578918..2bf52fa0 100644 --- a/client/command/config/github.go +++ b/client/command/config/github.go @@ -29,7 +29,7 @@ func GetGithubConfigCmd(cmd *cobra.Command, con *repl.Console) error { } func UpdateGithubConfigCmd(cmd *cobra.Command, con *repl.Console) error { - owner, repo, token, workflow := common.ParseGithubFlags(cmd) + owner, repo, token, workflow, _ := common.ParseGithubFlags(cmd) _, err := UpdateGithubConfig(con, owner, repo, token, workflow) if err != nil { return err diff --git a/helper/proto/client/clientpb/client.pb.go b/helper/proto/client/clientpb/client.pb.go index f402dd96..a6c3a55a 100644 --- a/helper/proto/client/clientpb/client.pb.go +++ b/helper/proto/client/clientpb/client.pb.go @@ -4819,6 +4819,7 @@ type GithubWorkflowRequest struct { Ca string `protobuf:"bytes,10,opt,name=ca,proto3" json:"ca,omitempty"` Params string `protobuf:"bytes,11,opt,name=params,proto3" json:"params,omitempty"` ArtifactId uint32 `protobuf:"varint,12,opt,name=artifact_id,json=artifactId,proto3" json:"artifact_id,omitempty"` + IsRemove bool `protobuf:"varint,13,opt,name=is_remove,json=isRemove,proto3" json:"is_remove,omitempty"` } func (x *GithubWorkflowRequest) Reset() { @@ -4937,6 +4938,13 @@ func (x *GithubWorkflowRequest) GetArtifactId() uint32 { return 0 } +func (x *GithubWorkflowRequest) GetIsRemove() bool { + if x != nil { + return x.IsRemove + } + return false +} + type GithubWorkflows struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5797,7 +5805,7 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x22, 0xa6, 0x03, 0x0a, 0x15, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, + 0x72, 0x63, 0x65, 0x22, 0xc3, 0x03, 0x0a, 0x15, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -5820,62 +5828,64 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, - 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0f, - 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, - 0x36, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0e, 0x47, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, - 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x74, 0x6d, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x74, 0x6d, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x1b, - 0x0a, 0x09, 0x62, 0x61, 0x64, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x62, 0x61, 0x64, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x06, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, - 0x61, 0x6d, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x61, 0x70, 0x69, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, - 0x72, 0x61, 0x6d, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, - 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, - 0x74, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, - 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, - 0x6b, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, - 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, - 0x6c, 0x61, 0x72, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x6c, 0x61, 0x72, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, - 0x10, 0x6c, 0x61, 0x72, 0x6b, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x72, 0x6b, 0x57, 0x65, 0x62, - 0x68, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, - 0x61, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x55, 0x72, 0x6c, 0x42, 0x46, 0x5a, 0x44, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, - 0x65, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x1a, 0x39, + 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0f, 0x47, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0e, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, + 0x12, 0x19, 0x0a, 0x08, 0x68, 0x74, 0x6d, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x68, 0x74, 0x6d, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x62, + 0x61, 0x64, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x62, 0x61, 0x64, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x06, 0x4e, 0x6f, 0x74, + 0x69, 0x66, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x74, 0x65, + 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, + 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, + 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, + 0x61, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x43, 0x68, 0x61, 0x74, 0x49, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, + 0x61, 0x6c, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x6e, + 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6e, 0x67, 0x74, 0x61, 0x6c, 0x6b, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x6e, 0x67, + 0x74, 0x61, 0x6c, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x72, + 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x6c, 0x61, 0x72, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, + 0x72, 0x6b, 0x5f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x61, 0x72, 0x6b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, + 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x63, 0x68, 0x61, 0x6e, 0x55, 0x72, 0x6c, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/server/config.yaml b/server/config.yaml index 7001301f..3e4ef2ed 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -30,6 +30,10 @@ listeners: protocol: tcp parser: malefic enable: true + auto_build: + target: + - x86_64-unknown-linux-musl + beacon_pipeline: beacon_pipeline tls: enable: false name: default @@ -54,7 +58,6 @@ listeners: auto_build: target: - x86_64-pc-windows-gnu - - x86_64-unknown-linux-musl beacon_pipeline: beacon_pipeline enable: true encryption: diff --git a/server/internal/build/action.go b/server/internal/build/action.go index 2ec7da8b..961f4178 100644 --- a/server/internal/build/action.go +++ b/server/internal/build/action.go @@ -19,7 +19,7 @@ import ( ) // TriggerWorkflowDispatch is a reusable function to trigger a GitHub Actions workflow dispatch event -func TriggerWorkflowDispatch(owner, repo, workflowID, token string, inputs map[string]string, req *clientpb.Generate) (*clientpb.Builder, error) { +func TriggerWorkflowDispatch(owner, repo, workflowID, token string, inputs map[string]string, isRemove bool, req *clientpb.Generate) (*clientpb.Builder, error) { var newProfile string config, err := GenerateProfile(req) if err != nil { @@ -73,7 +73,7 @@ func TriggerWorkflowDispatch(owner, repo, workflowID, token string, inputs map[s return nil, err } beaconBuilder.IsSRDI = true - go downloadArtifactWhenReady(escapedOwner, escapedRepo, escapedToken, beaconBuilder) + go downloadArtifactWhenReady(escapedOwner, escapedRepo, escapedToken, isRemove, beaconBuilder) req.ArtifactId = beaconBuilder.ID newProfile, err = GenerateProfile(req) if err != nil { @@ -107,7 +107,7 @@ func TriggerWorkflowDispatch(owner, repo, workflowID, token string, inputs map[s if err != nil { return nil, err } - go downloadArtifactWhenReady(escapedOwner, escapedRepo, escapedToken, builder) + go downloadArtifactWhenReady(escapedOwner, escapedRepo, escapedToken, isRemove, builder) return builder.ToProtobuf(), nil } @@ -138,9 +138,9 @@ func triggerBuildWorkflow(owner, repo, workflowID, token string, inputs map[stri } // downloadArtifactWhenReady waits for the artifact to be ready and downloads it -func downloadArtifactWhenReady(owner, repo, token string, builder *models.Builder) { +func downloadArtifactWhenReady(owner, repo, token string, isRemove bool, builder *models.Builder) { for { - newBuilder, err := PushArtifact(owner, repo, token, builder.Name) + newBuilder, err := PushArtifact(owner, repo, token, builder.Name, isRemove) if err == nil { logs.Log.Info("Artifact downloaded successfully!") if builder.IsSRDI { diff --git a/server/internal/build/artifacts.go b/server/internal/build/artifacts.go index fb867760..e1889a89 100644 --- a/server/internal/build/artifacts.go +++ b/server/internal/build/artifacts.go @@ -20,7 +20,7 @@ import ( var notifiedWorkflows = make(map[string]bool) -func PushArtifact(owner, repo, token, buildName string) (*models.Builder, error) { +func PushArtifact(owner, repo, token, buildName string, isRemove bool) (*models.Builder, error) { builder, err := db.GetArtifactByName(buildName) if err != nil { return builder, err @@ -33,7 +33,7 @@ func PushArtifact(owner, repo, token, buildName string) (*models.Builder, error) return builder, nil } - artifactDownloadUrl, err := getArtifactDownloadUrl(owner, repo, token, buildName) + artifactDownloadUrl, workflowID, err := getArtifactDownloadUrl(owner, repo, token, buildName) if err != nil { return builder, err } @@ -61,6 +61,18 @@ func PushArtifact(owner, repo, token, buildName string) (*models.Builder, error) if err != nil { return builder, err } + if isRemove { + err = DeleteSuccessWorkflow(owner, repo, token, workflowID) + if err != nil { + return builder, err + } + core.EventBroker.Publish(core.Event{ + EventType: consts.EventBuild, + IsNotify: false, + Message: fmt.Sprintf("workflow %s %s %s has deleted", builder.Name, builder.Type, builder.Target), + Important: true, + }) + } core.EventBroker.Publish(core.Event{ EventType: consts.EventBuild, IsNotify: false, @@ -71,32 +83,32 @@ func PushArtifact(owner, repo, token, buildName string) (*models.Builder, error) } // getArtifactDownloadUrl retrieves the artifact download URL from the GitHub API response -func getArtifactDownloadUrl(owner, repo, token, buildName string) (string, error) { +func getArtifactDownloadUrl(owner, repo, token, buildName string) (string, int64, error) { // Get the artifact list - artifactUrl, err := getArtifact(owner, repo, token, buildName) + artifactUrl, workflowID, err := getArtifact(owner, repo, token, buildName) if err != nil && !errors.Is(err, errs.ErrWorkflowFailed) { - return "", fmt.Errorf("failed to get artifact URL: %v", err) + return "", 0, fmt.Errorf("failed to get artifact URL: %v", err) } else if errors.Is(err, errs.ErrWorkflowFailed) { - return "", err + return "", 0, err } artifactDownloadUrl, err := fetchArtifactDownloadUrl(artifactUrl, token) if err != nil { - return "", fmt.Errorf("failed to fetch artifact download URL: %v", err) + return "", 0, fmt.Errorf("failed to fetch artifact download URL: %v", err) } - return artifactDownloadUrl, nil + return artifactDownloadUrl, workflowID, nil } -func getArtifact(owner, repo, token, buildName string) (string, error) { +func getArtifact(owner, repo, token, buildName string) (string, int64, error) { workflows, err := listRepositoryWorkflows(owner, repo, token) if err != nil { - return "", err + return "", 0, err } - artifactUrl, err := findArtifactsURL(workflows, buildName) + artifactUrl, workflowID, err := findArtifactsURL(workflows, buildName) if err != nil { - return "", err + return "", 0, err } - return artifactUrl, nil + return artifactUrl, workflowID, nil } // listRepositoryWorkflows fetches the workflows for a given repository @@ -128,13 +140,13 @@ func listRepositoryWorkflows(owner, repo, token string) ([]Workflow, error) { } // findArtifactsURL finds the ArtifactsURL for a workflow by name -func findArtifactsURL(workflows []Workflow, name string) (string, error) { +func findArtifactsURL(workflows []Workflow, name string) (string, int64, error) { for _, wf := range workflows { if wf.Name == name { if wf.Status == "completed" && wf.Conclusion == "success" { - return wf.ArtifactsURL, nil + return wf.ArtifactsURL, wf.ID, nil } else if wf.Conclusion == "failure" { - return "", errs.ErrWorkflowFailed + return "", 0, errs.ErrWorkflowFailed } if !notifiedWorkflows[name] { core.EventBroker.Publish(core.Event{ @@ -147,7 +159,7 @@ func findArtifactsURL(workflows []Workflow, name string) (string, error) { } } } - return "", errors.New("no artifact found") // Return empty string if not found + return "", 0, errors.New("no artifact found") // Return empty string if not found } // fetchArtifactDownloadUrl fetch artifactUrl for zip download url @@ -203,3 +215,16 @@ func downloadFile(artifactDownloadUrl, token string) ([]byte, error) { return io.ReadAll(resp.Body) } + +func DeleteSuccessWorkflow(owner, repo, token string, workflowID int64) error { + url := fmt.Sprintf("https://api.github.com/repos/%s/%s/actions/runs/%d", owner, repo, workflowID) + resp, err := sendRequest(url, []byte{}, token, "DELETE") + if err != nil { + return err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusNoContent { + return fmt.Errorf("failed to delete workflow. Status code: %d", resp.StatusCode) + } + return nil +} diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index bded0941..10f30fba 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -843,7 +843,7 @@ func FindArtifact(target *clientpb.Artifact) (*clientpb.Artifact, error) { Preload("Profile.PulsePipeline"). Find(&builders) for _, v := range builders { - if v.ShellcodePath == "" { + if v.ShellcodePath == "" && v.IsSRDI == true { continue } if v.Type == consts.ImplantPulse && v.Profile.PulsePipelineID == target.Pipeline { diff --git a/server/listener/listener.go b/server/listener/listener.go index 7fd69e71..dc4cc08e 100644 --- a/server/listener/listener.go +++ b/server/listener/listener.go @@ -8,6 +8,7 @@ import ( "github.com/chainreactors/malice-network/helper/errs" "os" "path/filepath" + "strings" "github.com/chainreactors/logs" "github.com/chainreactors/malice-network/helper/consts" @@ -252,6 +253,10 @@ func (lns *listener) autoBuild(pipeline *clientpb.Pipeline) error { for _, target := range pipeline.Target { if pipeline.Parser == consts.CommandBuildPulse { + if !strings.Contains(target, "windows") { + logs.Log.Warnf("pulse build target must be windows, %s is not supported", target) + continue + } buildType = consts.CommandBuildPulse beaconPipeline = pipeline.BeaconPipeline pulsePipeline = pipeline.Name diff --git a/server/rpc/rpc-action.go b/server/rpc/rpc-action.go index adb0e871..3f9e6a12 100644 --- a/server/rpc/rpc-action.go +++ b/server/rpc/rpc-action.go @@ -53,7 +53,7 @@ func (rpc *Server) TriggerWorkflowDispatch(ctx context.Context, req *clientpb.Gi Ca: req.Ca, Params: req.Params, } - builder, err := build.TriggerWorkflowDispatch(req.Owner, req.Repo, req.WorkflowId, req.Token, req.Inputs, generateReq) + builder, err := build.TriggerWorkflowDispatch(req.Owner, req.Repo, req.WorkflowId, req.Token, req.Inputs, req.IsRemove, generateReq) if err != nil { return nil, err } From 0049e4f8c321b914cfe5dac490769fbd1abd6767 Mon Sep 17 00:00:00 2001 From: h3zh1 Date: Fri, 17 Jan 2025 14:24:10 +0800 Subject: [PATCH 28/40] refactor: optimize FindArtifact, introduce self_artifact, and relocate bof handling --- client/command/build/artifact.go | 4 +- client/command/build/commands.go | 167 +++++++++++++++--------- client/command/exec/execute-bof.go | 10 +- client/command/tasks/files.go | 39 ++++-- external/console/console.go | 8 +- external/console/line.go | 27 +++- helper/utils/pe/bof.go | 17 +++ server/internal/db/helper.go | 8 +- server/internal/handlers/bof_handler.go | 164 +++++++++++++++++++++++ server/rpc/rpc-artifact.go | 15 +++ server/rpc/rpc-execute.go | 49 ++++++- 11 files changed, 410 insertions(+), 98 deletions(-) create mode 100644 server/internal/handlers/bof_handler.go diff --git a/client/command/build/artifact.go b/client/command/build/artifact.go index b73c2eb4..232a8091 100644 --- a/client/command/build/artifact.go +++ b/client/command/build/artifact.go @@ -207,14 +207,14 @@ func SearchArtifact(con *repl.Console, pipeline, typ, format, os, arch string) ( case "srdi", "shellcode", "raw", "bin": isSRDI = true } - - return con.Rpc.FindArtifact(con.Context(), &clientpb.Artifact{ + artifactResp, err := con.Rpc.FindArtifact(con.Context(), &clientpb.Artifact{ Arch: arch, Platform: os, Type: typ, Pipeline: pipeline, IsSrdi: isSRDI, }) + return artifactResp, err } func DeleteArtifact(con *repl.Console, name string) (bool, error) { diff --git a/client/command/build/commands.go b/client/command/build/commands.go index a6fd1f85..fc336bad 100644 --- a/client/command/build/commands.go +++ b/client/command/build/commands.go @@ -405,77 +405,115 @@ artifact delete --name artifact_name } func Register(con *repl.Console) { - con.RegisterServerFunc("search_artifact", SearchArtifact, &mals.Helper{ - Group: intermediate.GroupArtifact, - Short: "search build artifact with arch,os,typ and pipeline id", - Input: []string{ - "pipeline: pipeline id", - "type: build type, beacon,bind,prelude", - "format: only support shellcode", - "arch: arch", - "os: os", + con.RegisterServerFunc("search_artifact", + SearchArtifact, + &mals.Helper{ + Group: intermediate.GroupArtifact, + Short: "search build artifact with arch,os,typ and pipeline id", + Input: []string{ + "pipeline: pipeline id", + "type: build type, beacon,bind,prelude", + "format: only support shellcode", + "arch: arch", + "os: os", + }, + Output: []string{ + "builder", + }, + Example: `search_artifact("x64","windows","beacon","tcp_default", true)`, + }) + + con.RegisterServerFunc("get_artifact", + func(con *repl.Console, sess *core.Session, format string) (*clientpb.Artifact, error) { + artifact := &clientpb.Artifact{Name: sess.Name} + switch format { + case "bin", "raw", "shellcode": + artifact.IsSrdi = true + } + artifact, err := con.Rpc.FindArtifact(sess.Context(), artifact) + if err != nil { + return nil, err + } + return artifact, nil }, - Output: []string{ - "builder", + &mals.Helper{ + Group: intermediate.GroupArtifact, + Short: "get artifact with session self", + Input: []string{ + "sess: session", + "format: only support shellcode", + }, + Output: []string{ + "builder", + }, + }) + + con.RegisterServerFunc("upload_artifact", + UploadArtifact, + &mals.Helper{ + Group: intermediate.GroupArtifact, + Short: "upload local bin to server build", }, - Example: `search_artifact("x64","windows","beacon","tcp_default", true)`, - }) + ) - con.RegisterServerFunc("get_artifact", func(con *repl.Console, sess *core.Session, format string) (*clientpb.Artifact, error) { - artifact := &clientpb.Artifact{Name: sess.Name} - switch format { - case "bin", "raw", "shellcode": - artifact.IsSrdi = true - } - artifact, err := con.Rpc.FindArtifact(sess.Context(), artifact) - if err != nil { - return nil, err - } - return artifact, nil - }, &mals.Helper{ - Group: intermediate.GroupArtifact, - Short: "get artifact with session self", - Input: []string{ - "sess: session", - "format: only support shellcode", - }, - Output: []string{ - "builder", + con.RegisterServerFunc("download_artifact", + DownloadArtifact, + &mals.Helper{ + Group: intermediate.GroupArtifact, + Short: "download artifact with special build id", }, - }) + ) - con.RegisterServerFunc("upload_artifact", UploadArtifact, &mals.Helper{ - Group: intermediate.GroupArtifact, - Short: "upload local bin to server build", - }) - - con.RegisterServerFunc("download_artifact", DownloadArtifact, &mals.Helper{ - Group: intermediate.GroupArtifact, - Short: "download artifact with special build id", - }) - - con.RegisterServerFunc("delete_artifact", DeleteArtifact, &mals.Helper{ - Group: intermediate.GroupArtifact, - Short: "delete artifact with special build name", - }) - - con.RegisterServerFunc("self_stager", func(con *repl.Console, sess *core.Session) (string, error) { - artifact, err := SearchArtifact(con, sess.PipelineId, "pulse", "shellcode", sess.Os.Name, sess.Os.Arch) - if err != nil { - return "", err - } - return string(artifact.Bin), nil - }, &mals.Helper{ - Group: intermediate.GroupArtifact, - Short: "get self artifact stager shellcode", - Input: []string{ - "sess: session", + con.RegisterServerFunc("delete_artifact", + DeleteArtifact, + &mals.Helper{ + Group: intermediate.GroupArtifact, + Short: "delete artifact with special build name", }, - Output: []string{ - "artifact_bin", + ) + + con.RegisterServerFunc("self_artifact", + func(con *repl.Console, sess *core.Session) (string, error) { + artifact := &clientpb.Artifact{ + Name: sess.Name, + } + artifact, err := con.Rpc.FindArtifact(sess.Context(), artifact) + if err != nil { + return "", err + } + return string(artifact.Bin), nil }, - Example: `self_payload(active())`, - }) + &mals.Helper{ + Group: intermediate.GroupArtifact, + Short: "get artifact with session self", + Input: []string{ + "sess: session", + }, + Output: []string{ + "artifact", + }, + }) + + con.RegisterServerFunc("self_stager", + func(con *repl.Console, sess *core.Session) (string, error) { + artifact, err := SearchArtifact(con, sess.PipelineId, "pulse", "shellcode", sess.Os.Name, sess.Os.Arch) + if err != nil { + return "", err + } + return string(artifact.Bin), nil + }, + &mals.Helper{ + Group: intermediate.GroupArtifact, + Short: "get self artifact stager shellcode", + Input: []string{ + "sess: session", + }, + Output: []string{ + "artifact_bin", + }, + Example: `self_payload(active())`, + }, + ) con.RegisterServerFunc("artifact_stager", func(con *repl.Console, pipeline, format, os, arch string) (string, error) { artifact, err := SearchArtifact(con, pipeline, "pulse", "shellcode", os, arch) @@ -497,6 +535,7 @@ func Register(con *repl.Console) { }, Example: `artifact_stager("tcp_default","raw","windows","x64")`, }) + con.RegisterServerFunc("self_payload", func(con *repl.Console, sess *core.Session) (string, error) { artifact, err := SearchArtifact(con, sess.PipelineId, "beacon", "shellcode", sess.Os.Name, sess.Os.Arch) if err != nil { diff --git a/client/command/exec/execute-bof.go b/client/command/exec/execute-bof.go index dbb4ed7a..bf0274d4 100644 --- a/client/command/exec/execute-bof.go +++ b/client/command/exec/execute-bof.go @@ -7,7 +7,6 @@ import ( "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/services/clientrpc" - "github.com/chainreactors/malice-network/helper/utils/pe" "github.com/kballard/go-shellquote" "github.com/spf13/cobra" ) @@ -46,14 +45,7 @@ func RegisterBofFunc(con *repl.Console) { } return ExecBof(rpc, sess, path, cmdline, true) }, - func(content *clientpb.TaskContext) (interface{}, error) { - bofResps, err := common.ParseBOFResponse(content) - if err != nil { - return "", err - } - results := bofResps.(pe.BOFResponses).Handler(content.Session) - return results, nil - }, + common.ParseBOFResponse, nil, ) diff --git a/client/command/tasks/files.go b/client/command/tasks/files.go index 56b9b53a..6d836796 100644 --- a/client/command/tasks/files.go +++ b/client/command/tasks/files.go @@ -27,27 +27,48 @@ func ListFiles(cmd *cobra.Command, con *repl.Console) error { func printFiles(files *clientpb.Files, con *repl.Console) { var rowEntries []table.Row var row table.Row - tableModel := tui.NewTable([]table.Column{ - table.NewColumn("FileID", "FileID", 8), - table.NewColumn("Name", "Name", 20), - table.NewColumn("TempID", "TempID", 10), - table.NewColumn("Type", "Type", 10), - table.NewColumn("LocalName", "LocalName", 30), - table.NewColumn("RemotePath", "RemotePath", 30), - }, true) + maxLengths := map[string]int{ + "FileID": 6, + "Name": 16, + "Sha256": 64, + "Type": 12, + "LocalName": 16, + "RemotePath": 16, + } + for _, file := range files.Files { + updateMaxLength(&maxLengths, "FileID", len(file.TaskId)) + updateMaxLength(&maxLengths, "Name", len(file.Name)) + //updateMaxLength(&maxLengths, "TempID", len(file.TempId[:8])) + updateMaxLength(&maxLengths, "Type", len(file.Op)) + updateMaxLength(&maxLengths, "LocalName", len(file.Local)) + updateMaxLength(&maxLengths, "RemotePath", len(file.Remote)) row = table.NewRow( table.RowData{ "FileID": file.TaskId, "Name": file.Name, - "TempID": file.TempId, "Type": file.Op, "LocalName": file.Local, "RemotePath": file.Remote, + "Sha256": file.TempId, }) rowEntries = append(rowEntries, row) } + tableModel := tui.NewTable([]table.Column{ + table.NewColumn("FileID", "FileID", maxLengths["FileID"]), + table.NewColumn("Name", "Name", maxLengths["Name"]), + table.NewColumn("Type", "Type", maxLengths["Type"]), + table.NewColumn("LocalName", "LocalName", maxLengths["LocalName"]), + table.NewColumn("RemotePath", "RemotePath", maxLengths["RemotePath"]), + table.NewColumn("Sha256", "Sha256", maxLengths["Sha256"]), + }, true) tableModel.SetMultiline() tableModel.SetRows(rowEntries) fmt.Printf(tableModel.View()) } + +func updateMaxLength(maxLengths *map[string]int, key string, newLength int) { + if (*maxLengths)[key] < newLength { + (*maxLengths)[key] = newLength + } +} diff --git a/external/console/console.go b/external/console/console.go index 390e6f34..af30f9b3 100644 --- a/external/console/console.go +++ b/external/console/console.go @@ -2,11 +2,9 @@ package console import ( "fmt" - "strings" "sync" "github.com/reeflective/readline" - "github.com/reeflective/readline/inputrc" ) // Console is an integrated console application instance. @@ -75,8 +73,9 @@ type Console struct { // The app parameter is an optional name of the application using this console. func New(app string) *Console { console := &Console{ - name: app, - shell: readline.NewShell(inputrc.WithApp(strings.ToLower(app))), + name: app, + //shell: readline.NewShell(inputrc.WithApp(strings.ToLower(app))), + shell: readline.NewShell(), menus: make(map[string]*Menu), mutex: &sync.RWMutex{}, } @@ -239,7 +238,6 @@ func (c *Console) SystemEditor(buffer []byte, filetype string) ([]byte, error) { func (c *Console) setupShell() { cfg := c.shell.Config - // Some options should be set to on because they // are quite neceessary for efficient console use. cfg.Set("skip-completed-text", true) diff --git a/external/console/line.go b/external/console/line.go index 9be30eb3..24cd0a8b 100644 --- a/external/console/line.go +++ b/external/console/line.go @@ -3,10 +3,11 @@ package console import ( "bytes" "errors" + "fmt" + "regexp" "strings" "unicode/utf8" - "github.com/kballard/go-shellquote" "mvdan.cc/sh/v3/syntax" ) @@ -27,6 +28,7 @@ var ( // parse is in charge of removing all comments from the input line // before execution, and if successfully parsed, split into words. func (c *Console) parse(line string) (args []string, err error) { + lineReader := strings.NewReader(line) parser := syntax.NewParser(syntax.KeepComments(false)) @@ -44,7 +46,28 @@ func (c *Console) parse(line string) (args []string, err error) { } // Split the line into shell words. - return shellquote.Split(parsedLine.String()) + return shellSplit(parsedLine.String()) + //return shellquote.Split(parsedLine.String()) +} + +func shellSplit(command string) (args []string, err error) { + re := regexp.MustCompile(`[^\s"']+|"([^"]*)"|'([^']*)'`) + matches := re.FindAllStringSubmatch(command, -1) + + var parts []string + for _, match := range matches { + if match[1] != "" { // Matched double-quoted part + parts = append(parts, match[1]) + fmt.Printf("match: %s\n", match[1]) + } else if match[2] != "" { // Matched single-quoted part + parts = append(parts, match[2]) + fmt.Printf("match: %s\n", match[2]) + } else { // Unquoted part + parts = append(parts, match[0]) + fmt.Printf("match: %s\n", match[0]) + } + } + return parts, nil } // acceptMultiline determines if the line just accepted is complete (in which case diff --git a/helper/utils/pe/bof.go b/helper/utils/pe/bof.go index cf0386b8..1a0d286b 100644 --- a/helper/utils/pe/bof.go +++ b/helper/utils/pe/bof.go @@ -221,6 +221,22 @@ type BOFResponse struct { type BOFResponses []*BOFResponse +func (bofResps BOFResponses) String() string { + var results strings.Builder + for _, bofResp := range bofResps { + var result string + switch bofResp.CallbackType { + case CALLBACK_OUTPUT, CALLBACK_OUTPUT_OEM, CALLBACK_OUTPUT_UTF8: + result = string(bofResp.Data) + case CALLBACK_ERROR: + result = fmt.Sprintf("Error occurred: %s", string(bofResp.Data)) + } + results.WriteString(result + "\n") + } + + return results.String() +} + func (bofResps BOFResponses) Handler(sess *clientpb.Session) string { var err error var results strings.Builder @@ -254,6 +270,7 @@ func (bofResps BOFResponses) Handler(sess *clientpb.Session) string { if _, err := screenfile.Write(data); err != nil { return fmt.Sprintf("Failed to write screenshot data: %s", err.Error()) } + return fmt.Sprintf("Screenshot saved to %s", screenfile.Name()) }() case CALLBACK_FILE: diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index 10f30fba..01859af6 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -830,7 +830,6 @@ func GetBuilders() (*clientpb.Builders, error) { func FindArtifact(target *clientpb.Artifact) (*clientpb.Artifact, error) { var builder *models.Builder var result *gorm.DB - // 根据 ID 或名称查找构建器 if target.Id != 0 { result = Session().Where("id = ?", target.Id).First(&builder) @@ -843,9 +842,6 @@ func FindArtifact(target *clientpb.Artifact) (*clientpb.Artifact, error) { Preload("Profile.PulsePipeline"). Find(&builders) for _, v := range builders { - if v.ShellcodePath == "" && v.IsSRDI == true { - continue - } if v.Type == consts.ImplantPulse && v.Profile.PulsePipelineID == target.Pipeline { builder = v break @@ -866,7 +862,9 @@ func FindArtifact(target *clientpb.Artifact) (*clientpb.Artifact, error) { var content []byte var err error if target.IsSrdi { - content, err = os.ReadFile(builder.ShellcodePath) + if builder.ShellcodePath != "" { + content, err = os.ReadFile(builder.ShellcodePath) + } } else { content, err = os.ReadFile(builder.Path) } diff --git a/server/internal/handlers/bof_handler.go b/server/internal/handlers/bof_handler.go new file mode 100644 index 00000000..e386b6e0 --- /dev/null +++ b/server/internal/handlers/bof_handler.go @@ -0,0 +1,164 @@ +package handlers + +import ( + "encoding/binary" + "fmt" + "github.com/chainreactors/logs" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/malice-network/helper/utils/fileutils" + "github.com/chainreactors/malice-network/server/internal/configs" + "github.com/chainreactors/malice-network/server/internal/db" + "github.com/chainreactors/malice-network/server/internal/db/models" + "os" + "path/filepath" + "strings" + "time" +) + +const ( + CALLBACK_OUTPUT = 0 + CALLBACK_FILE = 0x02 + CALLBACK_FILE_WRITE = 0x08 + CALLBACK_FILE_CLOSE = 0x09 + CALLBACK_SCREENSHOT = 0x03 + CALLBACK_ERROR = 0x0d + CALLBACK_OUTPUT_OEM = 0x1e + CALLBACK_OUTPUT_UTF8 = 0x20 +) + +type BOFResponse struct { + CallbackType uint8 + OutputType uint8 + Length uint32 + Data []byte +} + +type BOFResponses []*BOFResponse + +func (bofResps BOFResponses) Handler(taskpb *clientpb.Task) string { + var err error + var results strings.Builder + sessionId := taskpb.SessionId + fileMap := make(map[string]*os.File) + + for _, bofResp := range bofResps { + var result string + logs.Log.Consolef("handing %d\n", bofResp.CallbackType) + switch bofResp.CallbackType { + case CALLBACK_OUTPUT, CALLBACK_OUTPUT_OEM, CALLBACK_OUTPUT_UTF8: + result = string(bofResp.Data) + case CALLBACK_ERROR: + result = fmt.Sprintf("Error occurred: %s", string(bofResp.Data)) + case CALLBACK_SCREENSHOT: + result = func() string { + if bofResp.Length-4 <= 0 { + return fmt.Sprintf("Null screenshot data") + } + timestampMillis := time.Now().UnixNano() / int64(time.Millisecond) + seconds := timestampMillis / 1000 + nanoseconds := (timestampMillis % 1000) * int64(time.Millisecond) + t := time.Unix(seconds, nanoseconds) + screenshotfilename := fmt.Sprintf("screenshot_%s.jpg", t.Format("2006-01-02_15-04-05")) + sessionDir := filepath.Join(configs.ServerRootPath, sessionId, "screenshot") + if !fileutils.Exist(sessionDir) { + if err := os.MkdirAll(sessionDir, os.ModePerm); err != nil { + logs.Log.Errorf("failed to create session directory: %s", err.Error()) + } + } + screenshotFullPath := filepath.Join(sessionDir, screenshotfilename) + screenfile, err := os.Create(screenshotFullPath) + if err != nil { + return fmt.Sprintf("Failed to create screenshot file") + } + defer func() { + err := screenfile.Close() + if err != nil { + return + } + }() + data := bofResp.Data[4:] + if _, err := screenfile.Write(data); err != nil { + return fmt.Sprintf("Failed to write screenshot data: %s", err.Error()) + } + fileutils.CalculateSHA256Checksum(screenfile.Name()) + err = db.AddFile("screenshot", taskpb, &models.FileDescription{ + Name: screenshotfilename, + NickName: "", + Path: "screenshot", + Command: "", + Size: int64(len(bofResp.Data[4:])), + }) + logs.Log.Consolef("Screenshot saved to %s\n", screenfile.Name()) + return fmt.Sprintf("Screenshot saved to %s", screenfile.Name()) + }() + case CALLBACK_FILE: + result = func() string { + fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) + fileDir := filepath.Join(configs.ServerRootPath, sessionId, "download") + if !fileutils.Exist(fileDir) { + if err := os.MkdirAll(fileDir, os.ModePerm); err != nil { + logs.Log.Errorf("failed to create session directory: %s", err.Error()) + } + } + fileName := filepath.Base(string(bofResp.Data[8:])) + fullPath := filepath.Join(fileDir, fileName) + file, err := os.OpenFile(fullPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + return fmt.Sprintf("Could not open file '%s' (ID: %s): %s", filepath.Base(file.Name()), fileId, err) + } + fileMap[fileId] = file + logs.Log.Consolef("File '%s' (ID: %s) created successfully", fullPath, fileId) + return fmt.Sprintf("File '%s' (ID: %s) opened successfully", filepath.Base(file.Name()), fileId) + }() + case CALLBACK_FILE_WRITE: + result = func() string { + fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) + file := fileMap[fileId] + if file == nil { + return fmt.Sprintf("No open file to write to (ID: %s)", fileId) + } + _, err = file.Write(bofResp.Data[4:]) + if err != nil { + return fmt.Sprintf("Error writing to file (ID: %s): %s", fileId, err) + } + logs.Log.Debugf("Data(Size: %d) written to File '%s' (ID: %s) successfully", bofResp.Length-4, filepath.Base(file.Name()), fileId) + return fmt.Sprintf("Data(Size: %d) written to file (ID: %s) successfully", bofResp.Length-4, fileId) + }() + case CALLBACK_FILE_CLOSE: + result = func() string { + fileId := fmt.Sprintf("%d", binary.LittleEndian.Uint32(bofResp.Data[:4])) + file := fileMap[fileId] + fileName := file.Name() + if file == nil { + return fmt.Sprintf("No open file to close (ID: %s)", fileId) + } + err = file.Close() + if err != nil { + return fmt.Sprintf("Error closing file (ID: %s): %s", fileId, err) + } + delete(fileMap, fileId) + logs.Log.Consolef("File '%s' (ID: %s) closed successfully", filepath.Base(fileName), fileId) + return fmt.Sprintf("File '%s' (ID: %s) closed successfully", filepath.Base(fileName), fileId) + }() + default: + result = func() string { + logs.Log.Errorf("Unimplemented callback type : %d", bofResp.CallbackType) + return fmt.Sprintf("Unimplemented callback type : %d", bofResp.CallbackType) + }() + } + results.WriteString(result + "\n") + } + // Close any remaining open files + for fileId, file := range fileMap { + if file != nil { + err := file.Close() + if err != nil { + results.WriteString(fmt.Sprintf("Error closing file (ID: %s): %s\n", fileId, err)) + } else { + results.WriteString(fmt.Sprintf("File (ID: %s) closed automatically due to end of processing\n", fileId)) + } + delete(fileMap, fileId) + } + } + return results.String() +} diff --git a/server/rpc/rpc-artifact.go b/server/rpc/rpc-artifact.go index f83456aa..ecb15632 100644 --- a/server/rpc/rpc-artifact.go +++ b/server/rpc/rpc-artifact.go @@ -72,6 +72,21 @@ func (rpc *Server) ListBuilder(ctx context.Context, req *clientpb.Empty) (*clien } func (rpc *Server) FindArtifact(ctx context.Context, req *clientpb.Artifact) (*clientpb.Artifact, error) { + artifact, err := db.FindArtifact(req) + if err != nil { + } + if req.IsSrdi && len(artifact.Bin) == 0 { + builder, err := db.GetArtifactById(artifact.Id) + if err != nil { + return nil, err + } + bin, err := build.SRDIArtifact(builder, artifact.Platform, artifact.Arch) + if err != nil { + return nil, err + } + artifact.Bin = bin + return artifact, err + } return db.FindArtifact(req) } diff --git a/server/rpc/rpc-execute.go b/server/rpc/rpc-execute.go index e9571f63..d1368895 100644 --- a/server/rpc/rpc-execute.go +++ b/server/rpc/rpc-execute.go @@ -1,10 +1,14 @@ package rpc import ( + "bytes" "context" + "encoding/binary" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" "github.com/chainreactors/malice-network/helper/types" + "github.com/chainreactors/malice-network/server/internal/handlers" + "io" "math" ) @@ -74,12 +78,53 @@ func (rpc *Server) ExecuteBof(ctx context.Context, req *implantpb.ExecuteBinary) if err != nil { return nil, err } - ch, err := rpc.GenericHandler(ctx, greq) if err != nil { return nil, err } - go greq.HandlerResponse(ch, types.MsgBinaryResponse) + go greq.HandlerResponse(ch, types.MsgBinaryResponse, func(spite *implantpb.Spite) { + reader := bytes.NewReader(spite.GetBinaryResponse().GetData()) + var bofResps handlers.BOFResponses + for { + bofResp := &handlers.BOFResponse{} + + err := binary.Read(reader, binary.LittleEndian, &bofResp.OutputType) + if err == io.EOF { + break + } else if err != nil { + return + } + + err = binary.Read(reader, binary.LittleEndian, &bofResp.CallbackType) + if err == io.EOF { + break + } else if err != nil { + return + } + + err = binary.Read(reader, binary.LittleEndian, &bofResp.Length) + if err == io.EOF { + break + } else if err != nil { + return + } + + strData := make([]byte, bofResp.Length) + _, err = io.ReadFull(reader, strData) + if err == io.EOF { + break + } else if err != nil { + return + } + + bofResp.Data = strData + + bofResps = append(bofResps, bofResp) + } + + bofResps.Handler(greq.Task.ToProtobuf()) + }) + return greq.Task.ToProtobuf(), nil } From a62dad7e5dfc8915d271488a4e7374364d9d688b Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Fri, 17 Jan 2025 17:13:06 +0800 Subject: [PATCH 29/40] fix: add session profile name and use id spefic artifact --- client/command/build/artifact.go | 20 ++++++++++---------- client/command/build/build.go | 13 +++++++++---- client/command/build/commands.go | 4 ++-- client/command/modules/load.go | 8 ++++---- go.mod | 2 +- go.sum | 21 +++++++++++++++++++-- server/internal/core/session.go | 9 ++++++--- server/internal/db/helper.go | 4 ++-- server/internal/db/models/build.go | 2 +- server/internal/db/models/session.go | 8 ++++++-- server/rpc/rpc-artifact.go | 2 +- server/rpc/rpc-build.go | 2 +- 12 files changed, 62 insertions(+), 33 deletions(-) diff --git a/client/command/build/artifact.go b/client/command/build/artifact.go index 232a8091..16c1d851 100644 --- a/client/command/build/artifact.go +++ b/client/command/build/artifact.go @@ -43,7 +43,6 @@ func PrintArtifacts(builders *clientpb.Builders, con *repl.Console) error { defaultLengths := map[string]int{ "ID": 6, - "Name": 16, "Pipeline": 16, "Target": 22, "Type": 8, @@ -57,7 +56,6 @@ func PrintArtifacts(builders *clientpb.Builders, con *repl.Console) error { for _, builder := range builders.Builders { formattedTime := time.Unix(builder.Time, 0).Format("2006-01-02 15:04:05") updateMaxLength(&defaultLengths, "ID", len(strconv.Itoa(int(builder.Id)))) - updateMaxLength(&defaultLengths, "Name", len(builder.Name)) updateMaxLength(&defaultLengths, "Target", len(builder.Target)) // updateMaxLength(&defaultLengths, "Type", len(builder.Type)) // updateMaxLength(&defaultLengths, "Source", len(builder.Resource)) @@ -68,7 +66,6 @@ func PrintArtifacts(builders *clientpb.Builders, con *repl.Console) error { row = table.NewRow( table.RowData{ "ID": builder.Id, - "Name": builder.Name, "Target": builder.Target, "Type": builder.Type, "Source": builder.Resource, @@ -84,7 +81,6 @@ func PrintArtifacts(builders *clientpb.Builders, con *repl.Console) error { tableModel := tui.NewTable([]table.Column{ table.NewColumn("ID", "ID", defaultLengths["ID"]), - table.NewColumn("Name", "Name", defaultLengths["Name"]), table.NewColumn("Pipeline", "Pipeline", defaultLengths["Pipeline"]), table.NewColumn("Target", "Target", defaultLengths["Target"]), table.NewColumn("Type", "Type", defaultLengths["Type"]), @@ -111,9 +107,9 @@ func PrintArtifacts(builders *clientpb.Builders, con *repl.Console) error { con.Log.Error("No row selected\n") return nil } - builder, err := DownloadArtifact(con, selectRow.Data["Name"].(string), false) + builder, err := DownloadArtifact(con, selectRow.Data["ID"].(uint32), false) if err != nil { - con.Log.Errorf("open file %s\n", err) + return err } con.Log.Infof("download artifact %s\n", filepath.Join(assets.GetTempDir(), builder.Name)) output := filepath.Join(assets.GetTempDir(), builder.Name) @@ -125,11 +121,15 @@ func PrintArtifacts(builders *clientpb.Builders, con *repl.Console) error { } func DownloadArtifactCmd(cmd *cobra.Command, con *repl.Console) error { - name := cmd.Flags().Arg(0) + id := cmd.Flags().Arg(0) + artifactID, err := strconv.ParseUint(id, 10, 32) + if err != nil { + return err + } output, _ := cmd.Flags().GetString("output") srdi, _ := cmd.Flags().GetBool("srdi") go func() { - builder, err := DownloadArtifact(con, name, srdi) + builder, err := DownloadArtifact(con, uint32(artifactID), srdi) if err != nil { con.Log.Errorf("download artifact failed: %s", err) return @@ -147,9 +147,9 @@ func DownloadArtifactCmd(cmd *cobra.Command, con *repl.Console) error { return nil } -func DownloadArtifact(con *repl.Console, name string, srdi bool) (*clientpb.Artifact, error) { +func DownloadArtifact(con *repl.Console, ID uint32, srdi bool) (*clientpb.Artifact, error) { artifact, err := con.Rpc.DownloadArtifact(con.Context(), &clientpb.Artifact{ - Name: name, + Id: ID, IsSrdi: srdi, }) if err != nil { diff --git a/client/command/build/build.go b/client/command/build/build.go index 0e85343b..4ac3f578 100644 --- a/client/command/build/build.go +++ b/client/command/build/build.go @@ -10,6 +10,7 @@ import ( "github.com/chainreactors/malice-network/helper/types" "github.com/spf13/cobra" "os" + "strconv" "strings" ) @@ -146,17 +147,21 @@ func PulseCmd(cmd *cobra.Command, con *repl.Console) error { } func BuildLogCmd(cmd *cobra.Command, con *repl.Console) error { - name := cmd.Flags().Arg(0) + id := cmd.Flags().Arg(0) + buildID, err := strconv.ParseUint(id, 10, 32) + if err != nil { + return err + } num, _ := cmd.Flags().GetInt("limit") builder, err := con.Rpc.BuildLog(con.Context(), &clientpb.Builder{ - Name: name, - Num: uint32(num), + Id: uint32(buildID), + Num: uint32(num), }) if err != nil { return err } if len(builder.Log) == 0 { - con.Log.Infof("No log for %s", name) + con.Log.Infof("No log for %s", id) return nil } fmt.Println(string(builder.Log)) diff --git a/client/command/build/commands.go b/client/command/build/commands.go index fc336bad..79cd35d7 100644 --- a/client/command/build/commands.go +++ b/client/command/build/commands.go @@ -299,7 +299,7 @@ build log builder_name --limit 70 common.BindFlag(logCmd, func(f *pflag.FlagSet) { f.Int("limit", 50, "limit of rows") }) - common.BindArgCompletions(logCmd, nil, common.ArtifactNameCompleter(con)) + common.BindArgCompletions(logCmd, nil, common.ArtifactCompleter(con)) buildCmd.AddCommand(beaconCmd, bindCmd, modulesCmd, pulseCmd, preludeCmd, logCmd) @@ -350,7 +350,7 @@ artifact list f.StringP("output", "o", "", "output path") f.BoolP("srdi", "s", false, "Set to true to download shellcode.") }) - common.BindArgCompletions(downloadCmd, nil, common.ArtifactNameCompleter(con)) + common.BindArgCompletions(downloadCmd, nil, common.ArtifactCompleter(con)) uploadCmd := &cobra.Command{ Use: consts.CommandArtifactUpload, diff --git a/client/command/modules/load.go b/client/command/modules/load.go index e247c092..24f4a921 100644 --- a/client/command/modules/load.go +++ b/client/command/modules/load.go @@ -80,7 +80,7 @@ func buildWithDocker(con *repl.Console, target, profile string, modules []string con.Log.Errorf("Build modules failed: %v", err) return } - modulePath, err = handleModuleDownload(con, builder.Name, builder.Bin) + modulePath, err = handleModuleDownload(con, builder.Id, builder.Name, builder.Bin) if err != nil { con.Log.Errorf("Write modules failed: %v\n", err) return @@ -136,7 +136,7 @@ func buildWithAction(con *repl.Console, target, profile string, modules []string con.Log.Errorf("Run workflow failed: %v", err) return } - modulePath, err := handleModuleDownload(con, builder.Name, builder.Bin) + modulePath, err := handleModuleDownload(con, builder.Id, builder.Name, builder.Bin) if err != nil { con.Log.Errorf("Write modules failed: %v\n", err) return @@ -153,7 +153,7 @@ func buildWithAction(con *repl.Console, target, profile string, modules []string } // handleModuleDownload handles module download and saves to disk -func handleModuleDownload(con *repl.Console, moduleName string, moduleBin []byte) (string, error) { +func handleModuleDownload(con *repl.Console, moduleID uint32, moduleName string, moduleBin []byte) (string, error) { var modulePath string if len(moduleBin) > 0 { modulePath = filepath.Join(assets.GetTempDir(), moduleName) @@ -165,7 +165,7 @@ func handleModuleDownload(con *repl.Console, moduleName string, moduleBin []byte for { time.Sleep(30 * time.Second) builder, err := con.Rpc.DownloadArtifact(con.Context(), &clientpb.Artifact{ - Name: moduleName, + Id: moduleID, }) if err == nil { modulePath = filepath.Join(assets.GetTempDir(), builder.Name) diff --git a/go.mod b/go.mod index cfe34335..025960b2 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05 - github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 + github.com/chainreactors/tui v0.0.0-20250117081300-8a86f2afd450 github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 github.com/charmbracelet/glamour v0.8.0 diff --git a/go.sum b/go.sum index e7dc0ff9..afc07501 100644 --- a/go.sum +++ b/go.sum @@ -7,19 +7,23 @@ filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a h1:4c0nc0krv8eh7gD809n+swLaCuFyHpxdrxwx0ZmHvBw= github.com/Binject/debug v0.0.0-20230508195519-26db73212a7a/go.mod h1:QzgxDLY/qdKlvnbnb65eqTedhvQPbaSP2NqIbcuKvsQ= github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE= +github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E= github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= +github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/blinkbean/dingtalk v1.1.3 h1:MbidFZYom7DTFHD/YIs+eaI7kRy52kmWE/sy0xjo6E4= @@ -31,12 +35,12 @@ github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0 h1:cU3sGEODXZs github.com/chainreactors/files v0.0.0-20240716182835-7884ee1e77f0/go.mod h1:NSxGNMRWryAyrDzZpVwmujI22wbGw6c52bQOd5zEvyU= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvltkdh7cnLFCNrogwl0Qh8oNaYrKHMyz4= github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= -github.com/chainreactors/mals v0.0.0-20250114095843-1768d0794ce4 h1:WX+UK60fmKxviYAETeohv5Ml9ORv35xJRWgLsB3eCII= -github.com/chainreactors/mals v0.0.0-20250114095843-1768d0794ce4/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05 h1:E8352+uYbWT3ycyI1LJ8UAtT30XZtVwC8Ubjg4dTOzA= github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= +github.com/chainreactors/tui v0.0.0-20250117081300-8a86f2afd450 h1:uEigV9P9wj35jdaLoFk/bwpwYNMwdrv9GLsgvKoiT+0= +github.com/chainreactors/tui v0.0.0-20250117081300-8a86f2afd450/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/utils v0.0.0-20240716182459-e85f2b01ee16/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 h1:YRQRjgb3MUOOqT0CdUDC51dsXbWpI3l6w3H4xexqKr8= github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= @@ -53,6 +57,7 @@ github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDU github.com/charmbracelet/x/ansi v0.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM= github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a h1:G99klV19u0QnhiizODirwVksQB91TJKV/UaTnACcG30= +github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= github.com/charmbracelet/x/input v0.1.0 h1:TEsGSfZYQyOtp+STIjyBq6tpRaorH0qpwZUj8DavAhQ= github.com/charmbracelet/x/input v0.1.0/go.mod h1:ZZwaBxPF7IG8gWWzPUVqHEtWhc1+HXJPNuerJGRGZ28= github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI= @@ -98,8 +103,11 @@ github.com/go-dedup/text v0.0.0-20170907015346-8bb1b95e3cb7/go.mod h1:wSsK4VOECO github.com/go-lark/lark v1.14.1 h1:qWYQTk6wLwf/08u8WbdNAHNmfqavdOvmsENlQ+Cb8aY= github.com/go-lark/lark v1.14.1/go.mod h1:6ltbSztPZRT6IaO9ZIQyVaY5pVp/KeMizDYtfZkU+vM= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible h1:2cauKuaELYAEARXRkq2LrJ0yDDv1rW7+wrTEdVL3uaU= @@ -118,7 +126,9 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= github.com/gookit/config/v2 v2.2.5 h1:RECbYYbtherywmzn3LNeu9NA5ZqhD7MSKEMsJ7l+MpU= @@ -126,9 +136,11 @@ github.com/gookit/config/v2 v2.2.5/go.mod h1:NeX+yiNYn6Ei10eJvCQFXuHEPIE/IPS8bqa github.com/gookit/goutil v0.6.15 h1:mMQ0ElojNZoyPD0eVROk5QXJPh2uKR4g06slgPDF5Jo= github.com/gookit/goutil v0.6.15/go.mod h1:qdKdYEHQdEtyH+4fNdQNZfJHhI0jUZzHxQVAV3DaMDY= github.com/gookit/ini/v2 v2.2.3 h1:nSbN+x9OfQPcMObTFP+XuHt8ev6ndv/fWWqxFhPMu2E= +github.com/gookit/ini/v2 v2.2.3/go.mod h1:Vu6p7P7xcfmb8KYu3L0ek8bqu/Im63N81q208SCCZY4= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= @@ -140,6 +152,7 @@ github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA= +github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -152,7 +165,9 @@ github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3x github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= @@ -221,6 +236,7 @@ github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wr github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -324,6 +340,7 @@ google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFW google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/server/internal/core/session.go b/server/internal/core/session.go index bab924c3..6430dee9 100644 --- a/server/internal/core/session.go +++ b/server/internal/core/session.go @@ -266,7 +266,8 @@ func (s *Session) ToProtobuf() *clientpb.Session { Type: s.Type, SessionId: s.ID, RawId: s.RawID, - Note: s.Name, + Note: s.Note, + Name: s.Name, GroupName: s.Group, IsAlive: s.isAlived(), IsPrivilege: s.IsPrivilege, @@ -288,7 +289,8 @@ func (s *Session) ToProtobufLite() *clientpb.Session { Type: s.Type, SessionId: s.ID, RawId: s.RawID, - Note: s.Name, + Note: s.Note, + Name: s.Name, GroupName: s.Group, IsPrivilege: s.IsPrivilege, Target: s.Target, @@ -313,7 +315,8 @@ func (s *Session) ToModel() *models.Session { SessionID: s.ID, RawID: s.RawID, CreatedAt: time.Now(), - Note: s.Name, + Note: s.Note, + ProfileName: s.Name, GroupName: s.Group, Target: s.Target, Initialized: s.Initialized, diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index 01859af6..fd8938df 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -979,9 +979,9 @@ func UpdateBuilderLog(name string, logEntry string) { } } -func GetBuilderLogs(builderName string, limit int) (string, error) { +func GetBuilderLogs(builderID uint32, limit int) (string, error) { var builder models.Builder - if err := Session().Where("name = ?", builderName).First(&builder).Error; err != nil { + if err := Session().Where("id = ?", builderID).First(&builder).Error; err != nil { return "", err } diff --git a/server/internal/db/models/build.go b/server/internal/db/models/build.go index dae32c8b..bda49579 100644 --- a/server/internal/db/models/build.go +++ b/server/internal/db/models/build.go @@ -12,7 +12,7 @@ import ( type Builder struct { ID uint32 `gorm:"primaryKey;autoIncrement"` Name string `gorm:"unique"` - ProfileName string `gorm:"index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;foreignKey:ProfileName;references:Name"` // 将 ProfileName 设置为外键 + ProfileName string `gorm:"index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;foreignKey:ProfileName;references:Name"` CreatedAt time.Time `gorm:"->;<-:create;"` Target string // build target, like win64, win32, linux64 diff --git a/server/internal/db/models/session.go b/server/internal/db/models/session.go index 467f58d6..443e6745 100644 --- a/server/internal/db/models/session.go +++ b/server/internal/db/models/session.go @@ -28,8 +28,11 @@ type Session struct { Interval uint64 Jitter float64 IsRemoved bool `gorm:"default:false"` - Os *Os `gorm:"embedded"` - Process *Process `gorm:"embedded"` + Os *Os `gorm:"embedded;embeddedPrefix:os_"` + Process *Process `gorm:"embedded;embeddedPrefix:process_"` + + ProfileName string `gorm:"index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;foreignKey:ProfileName;references:Name"` + Profile Profile `gorm:"foreignKey:ProfileName;references:Name;"` } func (s *Session) BeforeCreate(tx *gorm.DB) (err error) { @@ -63,6 +66,7 @@ func (s *Session) ToProtobuf() *clientpb.Session { Modules: cont.Modules, Timediff: time.Now().Unix() - s.LastCheckin, Addons: cont.Addons, + Name: s.ProfileName, } } diff --git a/server/rpc/rpc-artifact.go b/server/rpc/rpc-artifact.go index ecb15632..63a3ccb5 100644 --- a/server/rpc/rpc-artifact.go +++ b/server/rpc/rpc-artifact.go @@ -12,7 +12,7 @@ import ( func (rpc *Server) DownloadArtifact(ctx context.Context, req *clientpb.Artifact) (*clientpb.Artifact, error) { var path string - builder, err := db.GetArtifactByName(req.Name) + builder, err := db.GetArtifactById(req.Id) if err != nil { return nil, err } diff --git a/server/rpc/rpc-build.go b/server/rpc/rpc-build.go index dd76eb49..e40f252b 100644 --- a/server/rpc/rpc-build.go +++ b/server/rpc/rpc-build.go @@ -33,7 +33,7 @@ func (rpc *Server) Build(ctx context.Context, req *clientpb.Generate) (*clientpb } func (rpc *Server) BuildLog(ctx context.Context, req *clientpb.Builder) (*clientpb.Builder, error) { - resultLog, err := db.GetBuilderLogs(req.Name, int(req.Num)) + resultLog, err := db.GetBuilderLogs(req.Id, int(req.Num)) if err != nil { return nil, err } From a022611857f52219a4a37df4c2fb1aebae514dd5 Mon Sep 17 00:00:00 2001 From: h3zh1 Date: Fri, 17 Jan 2025 18:40:27 +0800 Subject: [PATCH 30/40] fix: added nil judgment --- server/internal/db/models/session.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/internal/db/models/session.go b/server/internal/db/models/session.go index 443e6745..4bee2ea0 100644 --- a/server/internal/db/models/session.go +++ b/server/internal/db/models/session.go @@ -47,6 +47,12 @@ func (s *Session) BeforeCreate(tx *gorm.DB) (err error) { func (s *Session) ToProtobuf() *clientpb.Session { cont, _ := content.RecoverSessionContext(s.Context) + if s.Os == nil { + s.Os = &Os{} + } + if s.Process == nil { + s.Process = &Process{} + } return &clientpb.Session{ Type: s.Type, SessionId: s.SessionID, From 95cb131373f3b36a0a93802921aae648f6063344 Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Fri, 17 Jan 2025 19:20:56 +0800 Subject: [PATCH 31/40] feat: add context manage and refactor server filepath --- go.mod | 2 +- go.sum | 2 + helper/consts/context.go | 15 + helper/proto/client/clientpb/client.pb.go | 285 ++++++++++--- helper/proto/client/rootpb/root.pb.go | 4 +- helper/proto/implant/implantpb/implant.pb.go | 5 +- helper/proto/implant/implantpb/module.pb.go | 6 +- helper/proto/services/clientrpc/service.pb.go | 381 ++++++++++-------- .../services/clientrpc/service_grpc.pb.go | 189 ++++++++- .../proto/services/listenerrpc/service.pb.go | 4 +- .../services/listenerrpc/service_grpc.pb.go | 2 +- helper/types/context.go | 89 ++++ server/cmd/server/server.go | 5 + server/internal/configs/config.go | 4 +- server/internal/configs/server.go | 4 +- server/internal/core/context.go | 168 ++++++++ server/internal/core/session.go | 28 +- server/internal/db/helper.go | 22 +- server/internal/db/models/context.go | 90 +++++ server/internal/db/sql.go | 1 + server/rpc/grpc.go | 2 +- server/rpc/rpc-context.go | 49 +++ server/rpc/rpc-file.go | 21 +- server/rpc/rpc-session.go | 3 +- 24 files changed, 1122 insertions(+), 259 deletions(-) create mode 100644 helper/consts/context.go create mode 100644 helper/types/context.go create mode 100644 server/internal/core/context.go create mode 100644 server/internal/db/models/context.go create mode 100644 server/rpc/rpc-context.go diff --git a/go.mod b/go.mod index 025960b2..3d72125f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05 - github.com/chainreactors/tui v0.0.0-20250117081300-8a86f2afd450 + github.com/chainreactors/tui v0.0.0-20250117083346-8eff1b67016e github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 github.com/charmbracelet/glamour v0.8.0 diff --git a/go.sum b/go.sum index afc07501..8a16257e 100644 --- a/go.sum +++ b/go.sum @@ -41,6 +41,8 @@ github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55Wfs github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/tui v0.0.0-20250117081300-8a86f2afd450 h1:uEigV9P9wj35jdaLoFk/bwpwYNMwdrv9GLsgvKoiT+0= github.com/chainreactors/tui v0.0.0-20250117081300-8a86f2afd450/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= +github.com/chainreactors/tui v0.0.0-20250117083346-8eff1b67016e h1:PYELWc4sxylEgoAUwlsfOWX4I1xJd2viaMm+9wq6+pg= +github.com/chainreactors/tui v0.0.0-20250117083346-8eff1b67016e/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/utils v0.0.0-20240716182459-e85f2b01ee16/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 h1:YRQRjgb3MUOOqT0CdUDC51dsXbWpI3l6w3H4xexqKr8= github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2/go.mod h1:LajXuvESQwP+qCMAvlcoSXppQCjuLlBrnQpu9XQ1HtU= diff --git a/helper/consts/context.go b/helper/consts/context.go new file mode 100644 index 00000000..7ade991c --- /dev/null +++ b/helper/consts/context.go @@ -0,0 +1,15 @@ +package consts + +const ( + ScreenShotType = "screenshot" + KeyLoggerType = "keylogger" + CredentialType = "credential" +) + +const ( + DownloadPath = "download" + KeyLoggerPath = "keylogger" + ScreenShotPath = "screenshot" + TaskPath = "task" + CachePath = "cache" +) diff --git a/helper/proto/client/clientpb/client.pb.go b/helper/proto/client/clientpb/client.pb.go index a6c3a55a..9cbbaf3a 100644 --- a/helper/proto/client/clientpb/client.pb.go +++ b/helper/proto/client/clientpb/client.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.29.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: client/clientpb/client.proto package clientpb @@ -3869,7 +3869,6 @@ type Pipeline struct { Target []string `protobuf:"bytes,6,rep,name=target,proto3" json:"target,omitempty"` BeaconPipeline string `protobuf:"bytes,7,opt,name=beacon_pipeline,json=beaconPipeline,proto3" json:"beacon_pipeline,omitempty"` // Types that are assignable to Body: - // // *Pipeline_Tcp // *Pipeline_Bind // *Pipeline_Web @@ -5230,6 +5229,148 @@ func (x *Notify) GetServerchanUrl() string { return "" } +type Context struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"` + Task *Task `protobuf:"bytes,3,opt,name=task,proto3" json:"task,omitempty"` + Pipeline *Pipeline `protobuf:"bytes,4,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + Listener *Listener `protobuf:"bytes,5,opt,name=listener,proto3" json:"listener,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` + Value string `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Context) Reset() { + *x = Context{} + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Context) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Context) ProtoMessage() {} + +func (x *Context) ProtoReflect() protoreflect.Message { + mi := &file_client_clientpb_client_proto_msgTypes[68] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Context.ProtoReflect.Descriptor instead. +func (*Context) Descriptor() ([]byte, []int) { + return file_client_clientpb_client_proto_rawDescGZIP(), []int{68} +} + +func (x *Context) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Context) GetSession() *Session { + if x != nil { + return x.Session + } + return nil +} + +func (x *Context) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *Context) GetPipeline() *Pipeline { + if x != nil { + return x.Pipeline + } + return nil +} + +func (x *Context) GetListener() *Listener { + if x != nil { + return x.Listener + } + return nil +} + +func (x *Context) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Context) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Contexts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Contexts []*Context `protobuf:"bytes,1,rep,name=contexts,proto3" json:"contexts,omitempty"` +} + +func (x *Contexts) Reset() { + *x = Contexts{} + if protoimpl.UnsafeEnabled { + mi := &file_client_clientpb_client_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Contexts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Contexts) ProtoMessage() {} + +func (x *Contexts) ProtoReflect() protoreflect.Message { + mi := &file_client_clientpb_client_proto_msgTypes[69] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Contexts.ProtoReflect.Descriptor instead. +func (*Contexts) Descriptor() ([]byte, []int) { + return file_client_clientpb_client_proto_rawDescGZIP(), []int{69} +} + +func (x *Contexts) GetContexts() []*Context { + if x != nil { + return x.Contexts + } + return nil +} + var File_client_clientpb_client_proto protoreflect.FileDescriptor var file_client_clientpb_client_proto_rawDesc = []byte{ @@ -5880,12 +6021,31 @@ var file_client_clientpb_client_proto_rawDesc = []byte{ 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x63, 0x68, 0x61, 0x6e, 0x55, 0x72, 0x6c, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x63, 0x68, 0x61, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0xf4, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x08, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x39, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5900,7 +6060,7 @@ func file_client_clientpb_client_proto_rawDescGZIP() []byte { return file_client_clientpb_client_proto_rawDescData } -var file_client_clientpb_client_proto_msgTypes = make([]protoimpl.MessageInfo, 74) +var file_client_clientpb_client_proto_msgTypes = make([]protoimpl.MessageInfo, 76) var file_client_clientpb_client_proto_goTypes = []interface{}{ (*Empty)(nil), // 0: clientpb.Empty (*Basic)(nil), // 1: clientpb.Basic @@ -5970,33 +6130,35 @@ var file_client_clientpb_client_proto_goTypes = []interface{}{ (*GithubWorkflows)(nil), // 65: clientpb.GithubWorkflows (*GithubWorkflow)(nil), // 66: clientpb.GithubWorkflow (*Notify)(nil), // 67: clientpb.Notify - nil, // 68: clientpb.Session.ArgueEntry - nil, // 69: clientpb.Session.DataEntry - nil, // 70: clientpb.Session.LootEntry - nil, // 71: clientpb.Job.ContentsEntry - nil, // 72: clientpb.Website.ContentsEntry - nil, // 73: clientpb.GithubWorkflowRequest.InputsEntry - (*implantpb.Os)(nil), // 74: modulepb.Os - (*implantpb.Process)(nil), // 75: modulepb.Process - (*implantpb.Timer)(nil), // 76: modulepb.Timer - (*implantpb.Addon)(nil), // 77: modulepb.Addon - (*implantpb.Spite)(nil), // 78: implantpb.Spite - (*implantpb.Register)(nil), // 79: modulepb.Register + (*Context)(nil), // 68: clientpb.Context + (*Contexts)(nil), // 69: clientpb.Contexts + nil, // 70: clientpb.Session.ArgueEntry + nil, // 71: clientpb.Session.DataEntry + nil, // 72: clientpb.Session.LootEntry + nil, // 73: clientpb.Job.ContentsEntry + nil, // 74: clientpb.Website.ContentsEntry + nil, // 75: clientpb.GithubWorkflowRequest.InputsEntry + (*implantpb.Os)(nil), // 76: modulepb.Os + (*implantpb.Process)(nil), // 77: modulepb.Process + (*implantpb.Timer)(nil), // 78: modulepb.Timer + (*implantpb.Addon)(nil), // 79: modulepb.Addon + (*implantpb.Spite)(nil), // 80: implantpb.Spite + (*implantpb.Register)(nil), // 81: modulepb.Register } var file_client_clientpb_client_proto_depIdxs = []int32{ 29, // 0: clientpb.Session.tasks:type_name -> clientpb.Tasks - 74, // 1: clientpb.Session.os:type_name -> modulepb.Os - 75, // 2: clientpb.Session.process:type_name -> modulepb.Process - 76, // 3: clientpb.Session.timer:type_name -> modulepb.Timer - 77, // 4: clientpb.Session.addons:type_name -> modulepb.Addon - 68, // 5: clientpb.Session.argue:type_name -> clientpb.Session.ArgueEntry - 69, // 6: clientpb.Session.data:type_name -> clientpb.Session.DataEntry - 70, // 7: clientpb.Session.loot:type_name -> clientpb.Session.LootEntry + 76, // 1: clientpb.Session.os:type_name -> modulepb.Os + 77, // 2: clientpb.Session.process:type_name -> modulepb.Process + 78, // 3: clientpb.Session.timer:type_name -> modulepb.Timer + 79, // 4: clientpb.Session.addons:type_name -> modulepb.Addon + 70, // 5: clientpb.Session.argue:type_name -> clientpb.Session.ArgueEntry + 71, // 6: clientpb.Session.data:type_name -> clientpb.Session.DataEntry + 72, // 7: clientpb.Session.loot:type_name -> clientpb.Session.LootEntry 2, // 8: clientpb.Sessions.sessions:type_name -> clientpb.Session 9, // 9: clientpb.SpiteCache.items:type_name -> clientpb.SpiteCacheItem - 78, // 10: clientpb.SpiteCacheItem.spite:type_name -> implantpb.Spite + 80, // 10: clientpb.SpiteCacheItem.spite:type_name -> implantpb.Spite 52, // 11: clientpb.Job.pipeline:type_name -> clientpb.Pipeline - 71, // 12: clientpb.Job.contents:type_name -> clientpb.Job.ContentsEntry + 73, // 12: clientpb.Job.contents:type_name -> clientpb.Job.ContentsEntry 10, // 13: clientpb.Jobs.job:type_name -> clientpb.Job 10, // 14: clientpb.JobCtrl.job:type_name -> clientpb.Job 10, // 15: clientpb.JobStatus.job:type_name -> clientpb.Job @@ -6007,14 +6169,14 @@ var file_client_clientpb_client_proto_depIdxs = []int32{ 10, // 20: clientpb.Event.job:type_name -> clientpb.Job 16, // 21: clientpb.Event.client:type_name -> clientpb.Client 28, // 22: clientpb.Event.task:type_name -> clientpb.Task - 78, // 23: clientpb.Event.spite:type_name -> implantpb.Spite + 80, // 23: clientpb.Event.spite:type_name -> implantpb.Spite 18, // 24: clientpb.Events.events:type_name -> clientpb.Event 28, // 25: clientpb.TaskContext.task:type_name -> clientpb.Task 2, // 26: clientpb.TaskContext.session:type_name -> clientpb.Session - 78, // 27: clientpb.TaskContext.spite:type_name -> implantpb.Spite + 80, // 27: clientpb.TaskContext.spite:type_name -> implantpb.Spite 28, // 28: clientpb.TaskContexts.task:type_name -> clientpb.Task 2, // 29: clientpb.TaskContexts.session:type_name -> clientpb.Session - 78, // 30: clientpb.TaskContexts.spites:type_name -> implantpb.Spite + 80, // 30: clientpb.TaskContexts.spites:type_name -> implantpb.Spite 25, // 31: clientpb.TasksContext.contexts:type_name -> clientpb.TaskContext 28, // 32: clientpb.Tasks.tasks:type_name -> clientpb.Task 33, // 33: clientpb.TaskDescs.tasks:type_name -> clientpb.TaskDesc @@ -6023,12 +6185,12 @@ var file_client_clientpb_client_proto_depIdxs = []int32{ 41, // 36: clientpb.Artifacts.artifacts:type_name -> clientpb.Artifact 43, // 37: clientpb.Profiles.profiles:type_name -> clientpb.Profile 40, // 38: clientpb.Builders.builders:type_name -> clientpb.Builder - 79, // 39: clientpb.RegisterSession.register_data:type_name -> modulepb.Register + 81, // 39: clientpb.RegisterSession.register_data:type_name -> modulepb.Register 51, // 40: clientpb.RegisterListener.pipelines:type_name -> clientpb.Pipelines 2, // 41: clientpb.SpiteRequest.session:type_name -> clientpb.Session 28, // 42: clientpb.SpiteRequest.task:type_name -> clientpb.Task - 78, // 43: clientpb.SpiteRequest.spite:type_name -> implantpb.Spite - 78, // 44: clientpb.SpiteResponse.spite:type_name -> implantpb.Spite + 80, // 43: clientpb.SpiteRequest.spite:type_name -> implantpb.Spite + 80, // 44: clientpb.SpiteResponse.spite:type_name -> implantpb.Spite 52, // 45: clientpb.Pipelines.pipelines:type_name -> clientpb.Pipeline 58, // 46: clientpb.Pipeline.tcp:type_name -> clientpb.TCPPipeline 56, // 47: clientpb.Pipeline.bind:type_name -> clientpb.BindPipeline @@ -6037,18 +6199,23 @@ var file_client_clientpb_client_proto_depIdxs = []int32{ 54, // 50: clientpb.Pipeline.tls:type_name -> clientpb.TLS 55, // 51: clientpb.Pipeline.encryption:type_name -> clientpb.Encryption 55, // 52: clientpb.WebContent.encryption:type_name -> clientpb.Encryption - 72, // 53: clientpb.Website.contents:type_name -> clientpb.Website.ContentsEntry + 74, // 53: clientpb.Website.contents:type_name -> clientpb.Website.ContentsEntry 60, // 54: clientpb.Websites.websites:type_name -> clientpb.Website 59, // 55: clientpb.WebContents.contents:type_name -> clientpb.WebContent - 73, // 56: clientpb.GithubWorkflowRequest.inputs:type_name -> clientpb.GithubWorkflowRequest.InputsEntry + 75, // 56: clientpb.GithubWorkflowRequest.inputs:type_name -> clientpb.GithubWorkflowRequest.InputsEntry 66, // 57: clientpb.GithubWorkflows.workflows:type_name -> clientpb.GithubWorkflow - 59, // 58: clientpb.Job.ContentsEntry.value:type_name -> clientpb.WebContent - 59, // 59: clientpb.Website.ContentsEntry.value:type_name -> clientpb.WebContent - 60, // [60:60] is the sub-list for method output_type - 60, // [60:60] is the sub-list for method input_type - 60, // [60:60] is the sub-list for extension type_name - 60, // [60:60] is the sub-list for extension extendee - 0, // [0:60] is the sub-list for field type_name + 2, // 58: clientpb.Context.session:type_name -> clientpb.Session + 28, // 59: clientpb.Context.task:type_name -> clientpb.Task + 52, // 60: clientpb.Context.pipeline:type_name -> clientpb.Pipeline + 14, // 61: clientpb.Context.listener:type_name -> clientpb.Listener + 68, // 62: clientpb.Contexts.contexts:type_name -> clientpb.Context + 59, // 63: clientpb.Job.ContentsEntry.value:type_name -> clientpb.WebContent + 59, // 64: clientpb.Website.ContentsEntry.value:type_name -> clientpb.WebContent + 65, // [65:65] is the sub-list for method output_type + 65, // [65:65] is the sub-list for method input_type + 65, // [65:65] is the sub-list for extension type_name + 65, // [65:65] is the sub-list for extension extendee + 0, // [0:65] is the sub-list for field type_name } func init() { file_client_clientpb_client_proto_init() } @@ -6873,6 +7040,30 @@ func file_client_clientpb_client_proto_init() { return nil } } + file_client_clientpb_client_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Context); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_clientpb_client_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Contexts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_client_clientpb_client_proto_msgTypes[52].OneofWrappers = []interface{}{ (*Pipeline_Tcp)(nil), @@ -6886,7 +7077,7 @@ func file_client_clientpb_client_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_clientpb_client_proto_rawDesc, NumEnums: 0, - NumMessages: 74, + NumMessages: 76, NumExtensions: 0, NumServices: 0, }, diff --git a/helper/proto/client/rootpb/root.pb.go b/helper/proto/client/rootpb/root.pb.go index 5bc4fb13..f20762db 100644 --- a/helper/proto/client/rootpb/root.pb.go +++ b/helper/proto/client/rootpb/root.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.29.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: client/rootpb/root.proto package rootpb diff --git a/helper/proto/implant/implantpb/implant.pb.go b/helper/proto/implant/implantpb/implant.pb.go index 7e66f076..c0c2d299 100644 --- a/helper/proto/implant/implantpb/implant.pb.go +++ b/helper/proto/implant/implantpb/implant.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.29.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: implant/implantpb/implant.proto package implantpb @@ -134,7 +134,6 @@ type Spite struct { Error uint32 `protobuf:"varint,5,opt,name=error,proto3" json:"error,omitempty"` Status *Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` // Types that are assignable to Body: - // // *Spite_Empty // *Spite_Block // *Spite_Ack diff --git a/helper/proto/implant/implantpb/module.pb.go b/helper/proto/implant/implantpb/module.pb.go index a25226c3..79e2c28c 100644 --- a/helper/proto/implant/implantpb/module.pb.go +++ b/helper/proto/implant/implantpb/module.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.29.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: implant/implantpb/module.proto package implantpb @@ -620,7 +620,7 @@ type SockTabEntry struct { LocalAddr string `protobuf:"bytes,1,opt,name=local_addr,json=localAddr,proto3" json:"local_addr,omitempty"` RemoteAddr string `protobuf:"bytes,2,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` SkState string `protobuf:"bytes,3,opt,name=skState,proto3" json:"skState,omitempty"` - // uint32 uid = 4; + // uint32 uid = 4; Pid string `protobuf:"bytes,5,opt,name=pid,proto3" json:"pid,omitempty"` Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"` } diff --git a/helper/proto/services/clientrpc/service.pb.go b/helper/proto/services/clientrpc/service.pb.go index d9a8cf58..f0ec8e5b 100644 --- a/helper/proto/services/clientrpc/service.pb.go +++ b/helper/proto/services/clientrpc/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.29.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: services/clientrpc/service.proto package clientrpc @@ -33,7 +33,7 @@ var file_services_clientrpc_service_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd9, 0x2f, 0x0a, 0x09, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xe2, 0x31, 0x0a, 0x09, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x52, 0x50, 0x43, 0x12, 0x33, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, @@ -415,32 +415,49 @@ var file_services_clientrpc_service_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x32, 0xc3, 0x02, 0x0a, 0x07, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x50, 0x43, 0x12, 0x2f, 0x0a, - 0x09, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, - 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, - 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, - 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, + 0x79, 0x12, 0x34, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, + 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x63, + 0x72, 0x65, 0x65, 0x6e, 0x53, 0x68, 0x6f, 0x74, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x34, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0f, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0xc3, 0x02, 0x0a, 0x07, 0x52, + 0x6f, 0x6f, 0x74, 0x52, 0x50, 0x43, 0x12, 0x2f, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, + 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, + 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x11, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x31, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, - 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, - 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x36, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x1a, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, - 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x10, 0x2e, 0x72, 0x6f, 0x6f, 0x74, + 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x13, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, + 0x42, 0x49, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x61, 0x6c, + 0x69, 0x63, 0x65, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x68, 0x65, 0x6c, 0x70, + 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var file_services_clientrpc_service_proto_goTypes = []interface{}{ @@ -487,25 +504,27 @@ var file_services_clientrpc_service_proto_goTypes = []interface{}{ (*clientpb.Artifact)(nil), // 40: clientpb.Artifact (*clientpb.GithubWorkflowRequest)(nil), // 41: clientpb.GithubWorkflowRequest (*clientpb.Notify)(nil), // 42: clientpb.Notify - (*rootpb.Operator)(nil), // 43: rootpb.Operator - (*clientpb.Client)(nil), // 44: clientpb.Client - (*clientpb.Basic)(nil), // 45: clientpb.Basic - (*clientpb.Clients)(nil), // 46: clientpb.Clients - (*clientpb.Sessions)(nil), // 47: clientpb.Sessions - (*clientpb.TasksContext)(nil), // 48: clientpb.TasksContext - (*clientpb.Listeners)(nil), // 49: clientpb.Listeners - (*clientpb.Pipelines)(nil), // 50: clientpb.Pipelines - (*clientpb.Jobs)(nil), // 51: clientpb.Jobs - (*clientpb.Tasks)(nil), // 52: clientpb.Tasks - (*clientpb.TaskContext)(nil), // 53: clientpb.TaskContext - (*clientpb.Files)(nil), // 54: clientpb.Files - (*clientpb.TaskContexts)(nil), // 55: clientpb.TaskContexts - (*clientpb.Events)(nil), // 56: clientpb.Events - (*clientpb.SyncResp)(nil), // 57: clientpb.SyncResp - (*clientpb.Bin)(nil), // 58: clientpb.Bin - (*clientpb.Profiles)(nil), // 59: clientpb.Profiles - (*clientpb.Builders)(nil), // 60: clientpb.Builders - (*rootpb.Response)(nil), // 61: rootpb.Response + (*clientpb.Context)(nil), // 43: clientpb.Context + (*rootpb.Operator)(nil), // 44: rootpb.Operator + (*clientpb.Client)(nil), // 45: clientpb.Client + (*clientpb.Basic)(nil), // 46: clientpb.Basic + (*clientpb.Clients)(nil), // 47: clientpb.Clients + (*clientpb.Sessions)(nil), // 48: clientpb.Sessions + (*clientpb.TasksContext)(nil), // 49: clientpb.TasksContext + (*clientpb.Listeners)(nil), // 50: clientpb.Listeners + (*clientpb.Pipelines)(nil), // 51: clientpb.Pipelines + (*clientpb.Jobs)(nil), // 52: clientpb.Jobs + (*clientpb.Tasks)(nil), // 53: clientpb.Tasks + (*clientpb.TaskContext)(nil), // 54: clientpb.TaskContext + (*clientpb.Files)(nil), // 55: clientpb.Files + (*clientpb.TaskContexts)(nil), // 56: clientpb.TaskContexts + (*clientpb.Events)(nil), // 57: clientpb.Events + (*clientpb.SyncResp)(nil), // 58: clientpb.SyncResp + (*clientpb.Bin)(nil), // 59: clientpb.Bin + (*clientpb.Profiles)(nil), // 60: clientpb.Profiles + (*clientpb.Builders)(nil), // 61: clientpb.Builders + (*clientpb.Contexts)(nil), // 62: clientpb.Contexts + (*rootpb.Response)(nil), // 63: rootpb.Response } var file_services_clientrpc_service_proto_depIdxs = []int32{ 0, // 0: clientrpc.MaliceRPC.LoginClient:input_type -> clientpb.LoginReq @@ -624,136 +643,146 @@ var file_services_clientrpc_service_proto_depIdxs = []int32{ 42, // 113: clientrpc.MaliceRPC.UpdateNotifyConfig:input_type -> clientpb.Notify 1, // 114: clientrpc.MaliceRPC.GetNotifyConfig:input_type -> clientpb.Empty 1, // 115: clientrpc.MaliceRPC.RefreshConfig:input_type -> clientpb.Empty - 43, // 116: clientrpc.RootRPC.AddClient:input_type -> rootpb.Operator - 43, // 117: clientrpc.RootRPC.RemoveClient:input_type -> rootpb.Operator - 43, // 118: clientrpc.RootRPC.ListClients:input_type -> rootpb.Operator - 43, // 119: clientrpc.RootRPC.AddListener:input_type -> rootpb.Operator - 43, // 120: clientrpc.RootRPC.RemoveListener:input_type -> rootpb.Operator - 43, // 121: clientrpc.RootRPC.ListListeners:input_type -> rootpb.Operator - 44, // 122: clientrpc.MaliceRPC.LoginClient:output_type -> clientpb.Client - 45, // 123: clientrpc.MaliceRPC.GetBasic:output_type -> clientpb.Basic - 46, // 124: clientrpc.MaliceRPC.GetClients:output_type -> clientpb.Clients - 47, // 125: clientrpc.MaliceRPC.GetSessions:output_type -> clientpb.Sessions - 7, // 126: clientrpc.MaliceRPC.GetSession:output_type -> clientpb.Session - 48, // 127: clientrpc.MaliceRPC.GetSessionHistory:output_type -> clientpb.TasksContext - 1, // 128: clientrpc.MaliceRPC.SessionManage:output_type -> clientpb.Empty - 49, // 129: clientrpc.MaliceRPC.GetListeners:output_type -> clientpb.Listeners - 50, // 130: clientrpc.MaliceRPC.GetPipelines:output_type -> clientpb.Pipelines - 51, // 131: clientrpc.MaliceRPC.GetJobs:output_type -> clientpb.Jobs - 52, // 132: clientrpc.MaliceRPC.GetTasks:output_type -> clientpb.Tasks - 53, // 133: clientrpc.MaliceRPC.GetTaskContent:output_type -> clientpb.TaskContext - 54, // 134: clientrpc.MaliceRPC.GetTaskFiles:output_type -> clientpb.Files - 53, // 135: clientrpc.MaliceRPC.WaitTaskContent:output_type -> clientpb.TaskContext - 53, // 136: clientrpc.MaliceRPC.WaitTaskFinish:output_type -> clientpb.TaskContext - 55, // 137: clientrpc.MaliceRPC.GetAllTaskContent:output_type -> clientpb.TaskContexts - 54, // 138: clientrpc.MaliceRPC.GetFiles:output_type -> clientpb.Files - 54, // 139: clientrpc.MaliceRPC.GetAllDownloadFiles:output_type -> clientpb.Files - 8, // 140: clientrpc.MaliceRPC.Events:output_type -> clientpb.Event - 1, // 141: clientrpc.MaliceRPC.Broadcast:output_type -> clientpb.Empty - 1, // 142: clientrpc.MaliceRPC.Notify:output_type -> clientpb.Empty - 56, // 143: clientrpc.MaliceRPC.GetEvent:output_type -> clientpb.Events - 1, // 144: clientrpc.MaliceRPC.SessionEvent:output_type -> clientpb.Empty - 1, // 145: clientrpc.MaliceRPC.OnHook:output_type -> clientpb.Empty - 6, // 146: clientrpc.MaliceRPC.Ping:output_type -> clientpb.Task - 6, // 147: clientrpc.MaliceRPC.Sleep:output_type -> clientpb.Task - 6, // 148: clientrpc.MaliceRPC.Suicide:output_type -> clientpb.Task - 6, // 149: clientrpc.MaliceRPC.ListModule:output_type -> clientpb.Task - 6, // 150: clientrpc.MaliceRPC.LoadModule:output_type -> clientpb.Task - 6, // 151: clientrpc.MaliceRPC.RefreshModule:output_type -> clientpb.Task - 6, // 152: clientrpc.MaliceRPC.ListAddon:output_type -> clientpb.Task - 6, // 153: clientrpc.MaliceRPC.LoadAddon:output_type -> clientpb.Task - 6, // 154: clientrpc.MaliceRPC.ExecuteAddon:output_type -> clientpb.Task - 6, // 155: clientrpc.MaliceRPC.Clear:output_type -> clientpb.Task - 6, // 156: clientrpc.MaliceRPC.CancelTask:output_type -> clientpb.Task - 1, // 157: clientrpc.MaliceRPC.Polling:output_type -> clientpb.Empty - 6, // 158: clientrpc.MaliceRPC.Upload:output_type -> clientpb.Task - 6, // 159: clientrpc.MaliceRPC.Download:output_type -> clientpb.Task - 57, // 160: clientrpc.MaliceRPC.Sync:output_type -> clientpb.SyncResp - 6, // 161: clientrpc.MaliceRPC.Pwd:output_type -> clientpb.Task - 6, // 162: clientrpc.MaliceRPC.Ls:output_type -> clientpb.Task - 6, // 163: clientrpc.MaliceRPC.Cd:output_type -> clientpb.Task - 6, // 164: clientrpc.MaliceRPC.Rm:output_type -> clientpb.Task - 6, // 165: clientrpc.MaliceRPC.Mv:output_type -> clientpb.Task - 6, // 166: clientrpc.MaliceRPC.Cp:output_type -> clientpb.Task - 6, // 167: clientrpc.MaliceRPC.Cat:output_type -> clientpb.Task - 6, // 168: clientrpc.MaliceRPC.Mkdir:output_type -> clientpb.Task - 6, // 169: clientrpc.MaliceRPC.Chmod:output_type -> clientpb.Task - 6, // 170: clientrpc.MaliceRPC.Chown:output_type -> clientpb.Task - 6, // 171: clientrpc.MaliceRPC.Kill:output_type -> clientpb.Task - 6, // 172: clientrpc.MaliceRPC.Ps:output_type -> clientpb.Task - 6, // 173: clientrpc.MaliceRPC.Netstat:output_type -> clientpb.Task - 6, // 174: clientrpc.MaliceRPC.Curl:output_type -> clientpb.Task - 6, // 175: clientrpc.MaliceRPC.Env:output_type -> clientpb.Task - 6, // 176: clientrpc.MaliceRPC.SetEnv:output_type -> clientpb.Task - 6, // 177: clientrpc.MaliceRPC.UnsetEnv:output_type -> clientpb.Task - 6, // 178: clientrpc.MaliceRPC.Whoami:output_type -> clientpb.Task - 6, // 179: clientrpc.MaliceRPC.Info:output_type -> clientpb.Task - 6, // 180: clientrpc.MaliceRPC.Bypass:output_type -> clientpb.Task - 6, // 181: clientrpc.MaliceRPC.RegQuery:output_type -> clientpb.Task - 6, // 182: clientrpc.MaliceRPC.RegAdd:output_type -> clientpb.Task - 6, // 183: clientrpc.MaliceRPC.RegDelete:output_type -> clientpb.Task - 6, // 184: clientrpc.MaliceRPC.RegListKey:output_type -> clientpb.Task - 6, // 185: clientrpc.MaliceRPC.RegListValue:output_type -> clientpb.Task - 6, // 186: clientrpc.MaliceRPC.ServiceList:output_type -> clientpb.Task - 6, // 187: clientrpc.MaliceRPC.ServiceCreate:output_type -> clientpb.Task - 6, // 188: clientrpc.MaliceRPC.ServiceStart:output_type -> clientpb.Task - 6, // 189: clientrpc.MaliceRPC.ServiceStop:output_type -> clientpb.Task - 6, // 190: clientrpc.MaliceRPC.ServiceQuery:output_type -> clientpb.Task - 6, // 191: clientrpc.MaliceRPC.ServiceDelete:output_type -> clientpb.Task - 6, // 192: clientrpc.MaliceRPC.TaskSchdList:output_type -> clientpb.Task - 6, // 193: clientrpc.MaliceRPC.TaskSchdCreate:output_type -> clientpb.Task - 6, // 194: clientrpc.MaliceRPC.TaskSchdStart:output_type -> clientpb.Task - 6, // 195: clientrpc.MaliceRPC.TaskSchdStop:output_type -> clientpb.Task - 6, // 196: clientrpc.MaliceRPC.TaskSchdDelete:output_type -> clientpb.Task - 6, // 197: clientrpc.MaliceRPC.TaskSchdQuery:output_type -> clientpb.Task - 6, // 198: clientrpc.MaliceRPC.TaskSchdRun:output_type -> clientpb.Task - 6, // 199: clientrpc.MaliceRPC.WmiQuery:output_type -> clientpb.Task - 6, // 200: clientrpc.MaliceRPC.WmiExecute:output_type -> clientpb.Task - 6, // 201: clientrpc.MaliceRPC.Runas:output_type -> clientpb.Task - 6, // 202: clientrpc.MaliceRPC.Privs:output_type -> clientpb.Task - 6, // 203: clientrpc.MaliceRPC.GetSystem:output_type -> clientpb.Task - 6, // 204: clientrpc.MaliceRPC.PipeUpload:output_type -> clientpb.Task - 6, // 205: clientrpc.MaliceRPC.PipeRead:output_type -> clientpb.Task - 6, // 206: clientrpc.MaliceRPC.PipeClose:output_type -> clientpb.Task - 6, // 207: clientrpc.MaliceRPC.Execute:output_type -> clientpb.Task - 6, // 208: clientrpc.MaliceRPC.ExecuteSpawn:output_type -> clientpb.Task - 6, // 209: clientrpc.MaliceRPC.ExecuteAssembly:output_type -> clientpb.Task - 6, // 210: clientrpc.MaliceRPC.ExecutePowerpick:output_type -> clientpb.Task - 6, // 211: clientrpc.MaliceRPC.ExecuteEXE:output_type -> clientpb.Task - 6, // 212: clientrpc.MaliceRPC.ExecuteDLL:output_type -> clientpb.Task - 6, // 213: clientrpc.MaliceRPC.ExecuteArmory:output_type -> clientpb.Task - 6, // 214: clientrpc.MaliceRPC.ExecuteShellcode:output_type -> clientpb.Task - 6, // 215: clientrpc.MaliceRPC.ExecuteBof:output_type -> clientpb.Task - 6, // 216: clientrpc.MaliceRPC.ExecuteLocal:output_type -> clientpb.Task - 6, // 217: clientrpc.MaliceRPC.InlineLocal:output_type -> clientpb.Task - 58, // 218: clientrpc.MaliceRPC.EXE2Shellcode:output_type -> clientpb.Bin - 58, // 219: clientrpc.MaliceRPC.DLL2Shellcode:output_type -> clientpb.Bin - 58, // 220: clientrpc.MaliceRPC.ShellcodeEncode:output_type -> clientpb.Bin - 50, // 221: clientrpc.MaliceRPC.ListJobs:output_type -> clientpb.Pipelines - 59, // 222: clientrpc.MaliceRPC.GetProfiles:output_type -> clientpb.Profiles - 1, // 223: clientrpc.MaliceRPC.DeleteProfile:output_type -> clientpb.Empty - 1, // 224: clientrpc.MaliceRPC.UpdateProfile:output_type -> clientpb.Empty - 40, // 225: clientrpc.MaliceRPC.BuildModules:output_type -> clientpb.Artifact - 39, // 226: clientrpc.MaliceRPC.BuildLog:output_type -> clientpb.Builder - 60, // 227: clientrpc.MaliceRPC.ListBuilder:output_type -> clientpb.Builders - 60, // 228: clientrpc.MaliceRPC.GetArtifactsByProfile:output_type -> clientpb.Builders - 40, // 229: clientrpc.MaliceRPC.DownloadArtifact:output_type -> clientpb.Artifact - 39, // 230: clientrpc.MaliceRPC.UploadArtifact:output_type -> clientpb.Builder - 1, // 231: clientrpc.MaliceRPC.DeleteArtifact:output_type -> clientpb.Empty - 40, // 232: clientrpc.MaliceRPC.MaleficSRDI:output_type -> clientpb.Artifact - 1, // 233: clientrpc.MaliceRPC.UpdateGithubConfig:output_type -> clientpb.Empty - 41, // 234: clientrpc.MaliceRPC.GetGithubConfig:output_type -> clientpb.GithubWorkflowRequest - 1, // 235: clientrpc.MaliceRPC.UpdateNotifyConfig:output_type -> clientpb.Empty - 42, // 236: clientrpc.MaliceRPC.GetNotifyConfig:output_type -> clientpb.Notify - 1, // 237: clientrpc.MaliceRPC.RefreshConfig:output_type -> clientpb.Empty - 61, // 238: clientrpc.RootRPC.AddClient:output_type -> rootpb.Response - 61, // 239: clientrpc.RootRPC.RemoveClient:output_type -> rootpb.Response - 46, // 240: clientrpc.RootRPC.ListClients:output_type -> clientpb.Clients - 61, // 241: clientrpc.RootRPC.AddListener:output_type -> rootpb.Response - 61, // 242: clientrpc.RootRPC.RemoveListener:output_type -> rootpb.Response - 49, // 243: clientrpc.RootRPC.ListListeners:output_type -> clientpb.Listeners - 122, // [122:244] is the sub-list for method output_type - 0, // [0:122] is the sub-list for method input_type + 43, // 116: clientrpc.MaliceRPC.GetContexts:input_type -> clientpb.Context + 1, // 117: clientrpc.MaliceRPC.GetScreenShot:input_type -> clientpb.Empty + 1, // 118: clientrpc.MaliceRPC.GetCredential:input_type -> clientpb.Empty + 1, // 119: clientrpc.MaliceRPC.GetKeylogger:input_type -> clientpb.Empty + 43, // 120: clientrpc.MaliceRPC.AddContext:input_type -> clientpb.Context + 44, // 121: clientrpc.RootRPC.AddClient:input_type -> rootpb.Operator + 44, // 122: clientrpc.RootRPC.RemoveClient:input_type -> rootpb.Operator + 44, // 123: clientrpc.RootRPC.ListClients:input_type -> rootpb.Operator + 44, // 124: clientrpc.RootRPC.AddListener:input_type -> rootpb.Operator + 44, // 125: clientrpc.RootRPC.RemoveListener:input_type -> rootpb.Operator + 44, // 126: clientrpc.RootRPC.ListListeners:input_type -> rootpb.Operator + 45, // 127: clientrpc.MaliceRPC.LoginClient:output_type -> clientpb.Client + 46, // 128: clientrpc.MaliceRPC.GetBasic:output_type -> clientpb.Basic + 47, // 129: clientrpc.MaliceRPC.GetClients:output_type -> clientpb.Clients + 48, // 130: clientrpc.MaliceRPC.GetSessions:output_type -> clientpb.Sessions + 7, // 131: clientrpc.MaliceRPC.GetSession:output_type -> clientpb.Session + 49, // 132: clientrpc.MaliceRPC.GetSessionHistory:output_type -> clientpb.TasksContext + 1, // 133: clientrpc.MaliceRPC.SessionManage:output_type -> clientpb.Empty + 50, // 134: clientrpc.MaliceRPC.GetListeners:output_type -> clientpb.Listeners + 51, // 135: clientrpc.MaliceRPC.GetPipelines:output_type -> clientpb.Pipelines + 52, // 136: clientrpc.MaliceRPC.GetJobs:output_type -> clientpb.Jobs + 53, // 137: clientrpc.MaliceRPC.GetTasks:output_type -> clientpb.Tasks + 54, // 138: clientrpc.MaliceRPC.GetTaskContent:output_type -> clientpb.TaskContext + 55, // 139: clientrpc.MaliceRPC.GetTaskFiles:output_type -> clientpb.Files + 54, // 140: clientrpc.MaliceRPC.WaitTaskContent:output_type -> clientpb.TaskContext + 54, // 141: clientrpc.MaliceRPC.WaitTaskFinish:output_type -> clientpb.TaskContext + 56, // 142: clientrpc.MaliceRPC.GetAllTaskContent:output_type -> clientpb.TaskContexts + 55, // 143: clientrpc.MaliceRPC.GetFiles:output_type -> clientpb.Files + 55, // 144: clientrpc.MaliceRPC.GetAllDownloadFiles:output_type -> clientpb.Files + 8, // 145: clientrpc.MaliceRPC.Events:output_type -> clientpb.Event + 1, // 146: clientrpc.MaliceRPC.Broadcast:output_type -> clientpb.Empty + 1, // 147: clientrpc.MaliceRPC.Notify:output_type -> clientpb.Empty + 57, // 148: clientrpc.MaliceRPC.GetEvent:output_type -> clientpb.Events + 1, // 149: clientrpc.MaliceRPC.SessionEvent:output_type -> clientpb.Empty + 1, // 150: clientrpc.MaliceRPC.OnHook:output_type -> clientpb.Empty + 6, // 151: clientrpc.MaliceRPC.Ping:output_type -> clientpb.Task + 6, // 152: clientrpc.MaliceRPC.Sleep:output_type -> clientpb.Task + 6, // 153: clientrpc.MaliceRPC.Suicide:output_type -> clientpb.Task + 6, // 154: clientrpc.MaliceRPC.ListModule:output_type -> clientpb.Task + 6, // 155: clientrpc.MaliceRPC.LoadModule:output_type -> clientpb.Task + 6, // 156: clientrpc.MaliceRPC.RefreshModule:output_type -> clientpb.Task + 6, // 157: clientrpc.MaliceRPC.ListAddon:output_type -> clientpb.Task + 6, // 158: clientrpc.MaliceRPC.LoadAddon:output_type -> clientpb.Task + 6, // 159: clientrpc.MaliceRPC.ExecuteAddon:output_type -> clientpb.Task + 6, // 160: clientrpc.MaliceRPC.Clear:output_type -> clientpb.Task + 6, // 161: clientrpc.MaliceRPC.CancelTask:output_type -> clientpb.Task + 1, // 162: clientrpc.MaliceRPC.Polling:output_type -> clientpb.Empty + 6, // 163: clientrpc.MaliceRPC.Upload:output_type -> clientpb.Task + 6, // 164: clientrpc.MaliceRPC.Download:output_type -> clientpb.Task + 58, // 165: clientrpc.MaliceRPC.Sync:output_type -> clientpb.SyncResp + 6, // 166: clientrpc.MaliceRPC.Pwd:output_type -> clientpb.Task + 6, // 167: clientrpc.MaliceRPC.Ls:output_type -> clientpb.Task + 6, // 168: clientrpc.MaliceRPC.Cd:output_type -> clientpb.Task + 6, // 169: clientrpc.MaliceRPC.Rm:output_type -> clientpb.Task + 6, // 170: clientrpc.MaliceRPC.Mv:output_type -> clientpb.Task + 6, // 171: clientrpc.MaliceRPC.Cp:output_type -> clientpb.Task + 6, // 172: clientrpc.MaliceRPC.Cat:output_type -> clientpb.Task + 6, // 173: clientrpc.MaliceRPC.Mkdir:output_type -> clientpb.Task + 6, // 174: clientrpc.MaliceRPC.Chmod:output_type -> clientpb.Task + 6, // 175: clientrpc.MaliceRPC.Chown:output_type -> clientpb.Task + 6, // 176: clientrpc.MaliceRPC.Kill:output_type -> clientpb.Task + 6, // 177: clientrpc.MaliceRPC.Ps:output_type -> clientpb.Task + 6, // 178: clientrpc.MaliceRPC.Netstat:output_type -> clientpb.Task + 6, // 179: clientrpc.MaliceRPC.Curl:output_type -> clientpb.Task + 6, // 180: clientrpc.MaliceRPC.Env:output_type -> clientpb.Task + 6, // 181: clientrpc.MaliceRPC.SetEnv:output_type -> clientpb.Task + 6, // 182: clientrpc.MaliceRPC.UnsetEnv:output_type -> clientpb.Task + 6, // 183: clientrpc.MaliceRPC.Whoami:output_type -> clientpb.Task + 6, // 184: clientrpc.MaliceRPC.Info:output_type -> clientpb.Task + 6, // 185: clientrpc.MaliceRPC.Bypass:output_type -> clientpb.Task + 6, // 186: clientrpc.MaliceRPC.RegQuery:output_type -> clientpb.Task + 6, // 187: clientrpc.MaliceRPC.RegAdd:output_type -> clientpb.Task + 6, // 188: clientrpc.MaliceRPC.RegDelete:output_type -> clientpb.Task + 6, // 189: clientrpc.MaliceRPC.RegListKey:output_type -> clientpb.Task + 6, // 190: clientrpc.MaliceRPC.RegListValue:output_type -> clientpb.Task + 6, // 191: clientrpc.MaliceRPC.ServiceList:output_type -> clientpb.Task + 6, // 192: clientrpc.MaliceRPC.ServiceCreate:output_type -> clientpb.Task + 6, // 193: clientrpc.MaliceRPC.ServiceStart:output_type -> clientpb.Task + 6, // 194: clientrpc.MaliceRPC.ServiceStop:output_type -> clientpb.Task + 6, // 195: clientrpc.MaliceRPC.ServiceQuery:output_type -> clientpb.Task + 6, // 196: clientrpc.MaliceRPC.ServiceDelete:output_type -> clientpb.Task + 6, // 197: clientrpc.MaliceRPC.TaskSchdList:output_type -> clientpb.Task + 6, // 198: clientrpc.MaliceRPC.TaskSchdCreate:output_type -> clientpb.Task + 6, // 199: clientrpc.MaliceRPC.TaskSchdStart:output_type -> clientpb.Task + 6, // 200: clientrpc.MaliceRPC.TaskSchdStop:output_type -> clientpb.Task + 6, // 201: clientrpc.MaliceRPC.TaskSchdDelete:output_type -> clientpb.Task + 6, // 202: clientrpc.MaliceRPC.TaskSchdQuery:output_type -> clientpb.Task + 6, // 203: clientrpc.MaliceRPC.TaskSchdRun:output_type -> clientpb.Task + 6, // 204: clientrpc.MaliceRPC.WmiQuery:output_type -> clientpb.Task + 6, // 205: clientrpc.MaliceRPC.WmiExecute:output_type -> clientpb.Task + 6, // 206: clientrpc.MaliceRPC.Runas:output_type -> clientpb.Task + 6, // 207: clientrpc.MaliceRPC.Privs:output_type -> clientpb.Task + 6, // 208: clientrpc.MaliceRPC.GetSystem:output_type -> clientpb.Task + 6, // 209: clientrpc.MaliceRPC.PipeUpload:output_type -> clientpb.Task + 6, // 210: clientrpc.MaliceRPC.PipeRead:output_type -> clientpb.Task + 6, // 211: clientrpc.MaliceRPC.PipeClose:output_type -> clientpb.Task + 6, // 212: clientrpc.MaliceRPC.Execute:output_type -> clientpb.Task + 6, // 213: clientrpc.MaliceRPC.ExecuteSpawn:output_type -> clientpb.Task + 6, // 214: clientrpc.MaliceRPC.ExecuteAssembly:output_type -> clientpb.Task + 6, // 215: clientrpc.MaliceRPC.ExecutePowerpick:output_type -> clientpb.Task + 6, // 216: clientrpc.MaliceRPC.ExecuteEXE:output_type -> clientpb.Task + 6, // 217: clientrpc.MaliceRPC.ExecuteDLL:output_type -> clientpb.Task + 6, // 218: clientrpc.MaliceRPC.ExecuteArmory:output_type -> clientpb.Task + 6, // 219: clientrpc.MaliceRPC.ExecuteShellcode:output_type -> clientpb.Task + 6, // 220: clientrpc.MaliceRPC.ExecuteBof:output_type -> clientpb.Task + 6, // 221: clientrpc.MaliceRPC.ExecuteLocal:output_type -> clientpb.Task + 6, // 222: clientrpc.MaliceRPC.InlineLocal:output_type -> clientpb.Task + 59, // 223: clientrpc.MaliceRPC.EXE2Shellcode:output_type -> clientpb.Bin + 59, // 224: clientrpc.MaliceRPC.DLL2Shellcode:output_type -> clientpb.Bin + 59, // 225: clientrpc.MaliceRPC.ShellcodeEncode:output_type -> clientpb.Bin + 51, // 226: clientrpc.MaliceRPC.ListJobs:output_type -> clientpb.Pipelines + 60, // 227: clientrpc.MaliceRPC.GetProfiles:output_type -> clientpb.Profiles + 1, // 228: clientrpc.MaliceRPC.DeleteProfile:output_type -> clientpb.Empty + 1, // 229: clientrpc.MaliceRPC.UpdateProfile:output_type -> clientpb.Empty + 40, // 230: clientrpc.MaliceRPC.BuildModules:output_type -> clientpb.Artifact + 39, // 231: clientrpc.MaliceRPC.BuildLog:output_type -> clientpb.Builder + 61, // 232: clientrpc.MaliceRPC.ListBuilder:output_type -> clientpb.Builders + 61, // 233: clientrpc.MaliceRPC.GetArtifactsByProfile:output_type -> clientpb.Builders + 40, // 234: clientrpc.MaliceRPC.DownloadArtifact:output_type -> clientpb.Artifact + 39, // 235: clientrpc.MaliceRPC.UploadArtifact:output_type -> clientpb.Builder + 1, // 236: clientrpc.MaliceRPC.DeleteArtifact:output_type -> clientpb.Empty + 40, // 237: clientrpc.MaliceRPC.MaleficSRDI:output_type -> clientpb.Artifact + 1, // 238: clientrpc.MaliceRPC.UpdateGithubConfig:output_type -> clientpb.Empty + 41, // 239: clientrpc.MaliceRPC.GetGithubConfig:output_type -> clientpb.GithubWorkflowRequest + 1, // 240: clientrpc.MaliceRPC.UpdateNotifyConfig:output_type -> clientpb.Empty + 42, // 241: clientrpc.MaliceRPC.GetNotifyConfig:output_type -> clientpb.Notify + 1, // 242: clientrpc.MaliceRPC.RefreshConfig:output_type -> clientpb.Empty + 62, // 243: clientrpc.MaliceRPC.GetContexts:output_type -> clientpb.Contexts + 62, // 244: clientrpc.MaliceRPC.GetScreenShot:output_type -> clientpb.Contexts + 62, // 245: clientrpc.MaliceRPC.GetCredential:output_type -> clientpb.Contexts + 62, // 246: clientrpc.MaliceRPC.GetKeylogger:output_type -> clientpb.Contexts + 1, // 247: clientrpc.MaliceRPC.AddContext:output_type -> clientpb.Empty + 63, // 248: clientrpc.RootRPC.AddClient:output_type -> rootpb.Response + 63, // 249: clientrpc.RootRPC.RemoveClient:output_type -> rootpb.Response + 47, // 250: clientrpc.RootRPC.ListClients:output_type -> clientpb.Clients + 63, // 251: clientrpc.RootRPC.AddListener:output_type -> rootpb.Response + 63, // 252: clientrpc.RootRPC.RemoveListener:output_type -> rootpb.Response + 50, // 253: clientrpc.RootRPC.ListListeners:output_type -> clientpb.Listeners + 127, // [127:254] is the sub-list for method output_type + 0, // [0:127] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/helper/proto/services/clientrpc/service_grpc.pb.go b/helper/proto/services/clientrpc/service_grpc.pb.go index 49d71993..7c2759cd 100644 --- a/helper/proto/services/clientrpc/service_grpc.pb.go +++ b/helper/proto/services/clientrpc/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.29.3 +// - protoc v3.21.12 // source: services/clientrpc/service.proto package clientrpc @@ -138,6 +138,11 @@ const ( MaliceRPC_UpdateNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/UpdateNotifyConfig" MaliceRPC_GetNotifyConfig_FullMethodName = "/clientrpc.MaliceRPC/GetNotifyConfig" MaliceRPC_RefreshConfig_FullMethodName = "/clientrpc.MaliceRPC/RefreshConfig" + MaliceRPC_GetContexts_FullMethodName = "/clientrpc.MaliceRPC/GetContexts" + MaliceRPC_GetScreenShot_FullMethodName = "/clientrpc.MaliceRPC/GetScreenShot" + MaliceRPC_GetCredential_FullMethodName = "/clientrpc.MaliceRPC/GetCredential" + MaliceRPC_GetKeylogger_FullMethodName = "/clientrpc.MaliceRPC/GetKeylogger" + MaliceRPC_AddContext_FullMethodName = "/clientrpc.MaliceRPC/AddContext" ) // MaliceRPCClient is the client API for MaliceRPC service. @@ -278,6 +283,12 @@ type MaliceRPCClient interface { UpdateNotifyConfig(ctx context.Context, in *clientpb.Notify, opts ...grpc.CallOption) (*clientpb.Empty, error) GetNotifyConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Notify, error) RefreshConfig(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Empty, error) + // context + GetContexts(ctx context.Context, in *clientpb.Context, opts ...grpc.CallOption) (*clientpb.Contexts, error) + GetScreenShot(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Contexts, error) + GetCredential(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Contexts, error) + GetKeylogger(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Contexts, error) + AddContext(ctx context.Context, in *clientpb.Context, opts ...grpc.CallOption) (*clientpb.Empty, error) } type maliceRPCClient struct { @@ -1355,6 +1366,51 @@ func (c *maliceRPCClient) RefreshConfig(ctx context.Context, in *clientpb.Empty, return out, nil } +func (c *maliceRPCClient) GetContexts(ctx context.Context, in *clientpb.Context, opts ...grpc.CallOption) (*clientpb.Contexts, error) { + out := new(clientpb.Contexts) + err := c.cc.Invoke(ctx, MaliceRPC_GetContexts_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) GetScreenShot(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Contexts, error) { + out := new(clientpb.Contexts) + err := c.cc.Invoke(ctx, MaliceRPC_GetScreenShot_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) GetCredential(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Contexts, error) { + out := new(clientpb.Contexts) + err := c.cc.Invoke(ctx, MaliceRPC_GetCredential_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) GetKeylogger(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (*clientpb.Contexts, error) { + out := new(clientpb.Contexts) + err := c.cc.Invoke(ctx, MaliceRPC_GetKeylogger_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maliceRPCClient) AddContext(ctx context.Context, in *clientpb.Context, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, MaliceRPC_AddContext_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MaliceRPCServer is the server API for MaliceRPC service. // All implementations must embed UnimplementedMaliceRPCServer // for forward compatibility @@ -1493,6 +1549,12 @@ type MaliceRPCServer interface { UpdateNotifyConfig(context.Context, *clientpb.Notify) (*clientpb.Empty, error) GetNotifyConfig(context.Context, *clientpb.Empty) (*clientpb.Notify, error) RefreshConfig(context.Context, *clientpb.Empty) (*clientpb.Empty, error) + // context + GetContexts(context.Context, *clientpb.Context) (*clientpb.Contexts, error) + GetScreenShot(context.Context, *clientpb.Empty) (*clientpb.Contexts, error) + GetCredential(context.Context, *clientpb.Empty) (*clientpb.Contexts, error) + GetKeylogger(context.Context, *clientpb.Empty) (*clientpb.Contexts, error) + AddContext(context.Context, *clientpb.Context) (*clientpb.Empty, error) mustEmbedUnimplementedMaliceRPCServer() } @@ -1848,6 +1910,21 @@ func (UnimplementedMaliceRPCServer) GetNotifyConfig(context.Context, *clientpb.E func (UnimplementedMaliceRPCServer) RefreshConfig(context.Context, *clientpb.Empty) (*clientpb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RefreshConfig not implemented") } +func (UnimplementedMaliceRPCServer) GetContexts(context.Context, *clientpb.Context) (*clientpb.Contexts, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetContexts not implemented") +} +func (UnimplementedMaliceRPCServer) GetScreenShot(context.Context, *clientpb.Empty) (*clientpb.Contexts, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetScreenShot not implemented") +} +func (UnimplementedMaliceRPCServer) GetCredential(context.Context, *clientpb.Empty) (*clientpb.Contexts, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCredential not implemented") +} +func (UnimplementedMaliceRPCServer) GetKeylogger(context.Context, *clientpb.Empty) (*clientpb.Contexts, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetKeylogger not implemented") +} +func (UnimplementedMaliceRPCServer) AddContext(context.Context, *clientpb.Context) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddContext not implemented") +} func (UnimplementedMaliceRPCServer) mustEmbedUnimplementedMaliceRPCServer() {} // UnsafeMaliceRPCServer may be embedded to opt out of forward compatibility for this service. @@ -3952,6 +4029,96 @@ func _MaliceRPC_RefreshConfig_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _MaliceRPC_GetContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Context) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).GetContexts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_GetContexts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).GetContexts(ctx, req.(*clientpb.Context)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_GetScreenShot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).GetScreenShot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_GetScreenShot_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).GetScreenShot(ctx, req.(*clientpb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_GetCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).GetCredential(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_GetCredential_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).GetCredential(ctx, req.(*clientpb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_GetKeylogger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).GetKeylogger(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_GetKeylogger_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).GetKeylogger(ctx, req.(*clientpb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _MaliceRPC_AddContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.Context) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaliceRPCServer).AddContext(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MaliceRPC_AddContext_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaliceRPCServer).AddContext(ctx, req.(*clientpb.Context)) + } + return interceptor(ctx, in, info, handler) +} + // MaliceRPC_ServiceDesc is the grpc.ServiceDesc for MaliceRPC service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -4419,6 +4586,26 @@ var MaliceRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "RefreshConfig", Handler: _MaliceRPC_RefreshConfig_Handler, }, + { + MethodName: "GetContexts", + Handler: _MaliceRPC_GetContexts_Handler, + }, + { + MethodName: "GetScreenShot", + Handler: _MaliceRPC_GetScreenShot_Handler, + }, + { + MethodName: "GetCredential", + Handler: _MaliceRPC_GetCredential_Handler, + }, + { + MethodName: "GetKeylogger", + Handler: _MaliceRPC_GetKeylogger_Handler, + }, + { + MethodName: "AddContext", + Handler: _MaliceRPC_AddContext_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/helper/proto/services/listenerrpc/service.pb.go b/helper/proto/services/listenerrpc/service.pb.go index d277751e..50026409 100644 --- a/helper/proto/services/listenerrpc/service.pb.go +++ b/helper/proto/services/listenerrpc/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.29.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: services/listenerrpc/service.proto package listenerrpc diff --git a/helper/proto/services/listenerrpc/service_grpc.pb.go b/helper/proto/services/listenerrpc/service_grpc.pb.go index 216d29b7..7be43870 100644 --- a/helper/proto/services/listenerrpc/service_grpc.pb.go +++ b/helper/proto/services/listenerrpc/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v5.29.3 +// - protoc v3.21.12 // source: services/listenerrpc/service.proto package listenerrpc diff --git a/helper/types/context.go b/helper/types/context.go new file mode 100644 index 00000000..3f008040 --- /dev/null +++ b/helper/types/context.go @@ -0,0 +1,89 @@ +package types + +import ( + "encoding/json" + "github.com/chainreactors/malice-network/helper/consts" +) + +type Context interface { + Type() string + String() string +} + +func NewScreenShot(content []byte) (*ScreenShot, error) { + screenShot := &ScreenShot{} + err := json.Unmarshal(content, screenShot) + if err != nil { + return nil, err + } + return screenShot, nil +} + +func NewCredential(content []byte) (*Credential, error) { + credential := &Credential{} + err := json.Unmarshal(content, credential) + if err != nil { + return nil, err + } + return credential, nil +} + +func NewKeyLogger(content []byte) (*KeyLogger, error) { + keyLogger := &KeyLogger{} + err := json.Unmarshal(content, keyLogger) + if err != nil { + return nil, err + } + return keyLogger, nil +} + +type ScreenShot struct { + FilePath string + Content string `json:"-"` +} + +func (s *ScreenShot) Type() string { + return consts.ScreenShotType +} + +func (s *ScreenShot) String() string { + marshal, err := json.Marshal(s) + if err != nil { + return "" + } + return string(marshal) +} + +type Credential struct { + CredentialType string `json:"type"` + Params map[string]string +} + +func (c *Credential) Type() string { + return consts.CredentialType +} + +func (c *Credential) String() string { + marshal, err := json.Marshal(c) + if err != nil { + return "" + } + return string(marshal) +} + +type KeyLogger struct { + FilePath string + Content string `json:"-"` +} + +func (k *KeyLogger) Type() string { + return consts.KeyLoggerType +} + +func (k *KeyLogger) String() string { + marshal, err := json.Marshal(k) + if err != nil { + return "" + } + return string(marshal) +} diff --git a/server/cmd/server/server.go b/server/cmd/server/server.go index 84026230..c1b7df49 100644 --- a/server/cmd/server/server.go +++ b/server/cmd/server/server.go @@ -88,6 +88,7 @@ func Execute() { db.Client = db.NewDBClient() core.NewBroker() core.NewSessions() + core.NewContext() if opt.IP != "" { logs.Log.Infof("manually specified IP: %s will override %s config: %s", opt.IP, opt.Config, opt.Server.IP) opt.Server.IP = opt.IP @@ -200,6 +201,10 @@ func RecoverAliveSession() error { core.Sessions.Add(newSession) } } + err = core.Contexts.Recover() + if err != nil { + return err + } return nil } diff --git a/server/internal/configs/config.go b/server/internal/configs/config.go index 61a17e7b..e0fb98ac 100644 --- a/server/internal/configs/config.go +++ b/server/internal/configs/config.go @@ -12,13 +12,13 @@ func InitConfig() error { if err != nil { return err } - os.MkdirAll(LogPath, perm) + os.MkdirAll(ContextPath, perm) os.MkdirAll(CertsPath, perm) os.MkdirAll(TempPath, perm) + os.MkdirAll(LogPath, perm) //os.MkdirAll(PluginPath, perm) os.MkdirAll(AuditPath, perm) os.MkdirAll(BinPath, perm) - os.MkdirAll(CachePath, perm) os.MkdirAll(WebsitePath, perm) os.MkdirAll(ListenerPath, perm) os.MkdirAll(BuildOutputPath, perm) diff --git a/server/internal/configs/server.go b/server/internal/configs/server.go index 006fe47c..4e86b755 100644 --- a/server/internal/configs/server.go +++ b/server/internal/configs/server.go @@ -18,13 +18,13 @@ var ( ServerConfigFileName = "config.yaml" ServerRootPath = path.Join(GetWorkDir(), ".malice") CurrentServerConfigFilename = "config.yaml" - LogPath = path.Join(ServerRootPath, "logs") + ContextPath = path.Join(ServerRootPath, "context") + LogPath = path.Join(ServerRootPath, "log") CertsPath = path.Join(ServerRootPath, "certs") ListenerPath = path.Join(ServerRootPath, "listener") TempPath = path.Join(ServerRootPath, "temp") PluginPath = path.Join(ServerRootPath, "plugins") AuditPath = path.Join(ServerRootPath, "audit") - CachePath = path.Join(TempPath, "cache") ErrNoConfig = errors.New("no config found") WebsitePath = path.Join(ServerRootPath, "web") // variables for implant build diff --git a/server/internal/core/context.go b/server/internal/core/context.go new file mode 100644 index 00000000..6318f31f --- /dev/null +++ b/server/internal/core/context.go @@ -0,0 +1,168 @@ +package core + +import ( + "github.com/chainreactors/logs" + "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/malice-network/server/internal/db" + "github.com/chainreactors/malice-network/server/internal/db/models" + "sync" +) + +type ContextsResp []*clientpb.Context + +type Context struct { + sync.Map +} + +var Contexts *Context + +func NewContext() *Context { + newContexts := &Context{ + Map: sync.Map{}, + } + Contexts = newContexts + return newContexts +} + +func (ctx *Context) WithSession(sid string) ContextsResp { + var contexts ContextsResp + + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + c.SessionID = sid + contexts = append(contexts, c.ToProtobuf()) + } + return true + }) + return contexts +} + +func (ctx *Context) WithPipeline(pid string) ContextsResp { + var contexts ContextsResp + + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + c.PipelineName = pid + contexts = append(contexts, c.ToProtobuf()) + } + return true + }) + return contexts +} + +func (ctx *Context) WithListener(lName string) ContextsResp { + var contexts ContextsResp + + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + c.ListenerName = lName + contexts = append(contexts, c.ToProtobuf()) + } + return true + }) + return contexts + +} + +func (ctx *Context) WithTask(tName string) ContextsResp { + var contexts ContextsResp + + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + c.TaskID = tName + contexts = append(contexts, c.ToProtobuf()) + } + return true + }) + return contexts + +} + +func (ctx *Context) ScreenShot() ContextsResp { + var contexts ContextsResp + + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + if c.Type == consts.ScreenShotType { + contexts = append(contexts, c.ToProtobuf()) + } + } + return true + }) + return contexts +} + +func (ctx *Context) KeyLogger() ContextsResp { + var contexts ContextsResp + + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + if c.Type == consts.KeyLoggerType { + contexts = append(contexts, c.ToProtobuf()) + } + } + return true + }) + return contexts +} + +func (ctx *Context) Credential() ContextsResp { + var contexts ContextsResp + + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + if c.Type == consts.CredentialType { + contexts = append(contexts, c.ToProtobuf()) + } + } + return true + }) + return contexts +} + +func (ctx *Context) Add(c *models.Context) { + ctx.Store(c.ID.String(), c) +} + +func (ctx *Context) Remove(cID string) { + val, ok := ctx.Load(cID) + if !ok { + logs.Log.Errorf("Context not found: %s", cID) + return + } + v := val.(*models.Context) + ctx.Delete(v.ID) + +} + +func (ctx *Context) Get(cID string) (*models.Context, bool) { + val, ok := ctx.Load(cID) + if !ok { + return nil, false + } + v := val.(*models.Context) + return v, true +} + +func (ctx *Context) All() []*models.Context { + var contexts []*models.Context + ctx.Map.Range(func(key, value interface{}) bool { + if c, ok := value.(*models.Context); ok { + contexts = append(contexts, c) + } + return true + }) + return contexts +} + +func (ctx *Context) Recover() error { + contexts, err := db.GetAllContext() + if err != nil { + return err + } + for _, c := range contexts { + ctx.Add(c) + } + return nil +} diff --git a/server/internal/core/session.go b/server/internal/core/session.go index 6430dee9..056b4acf 100644 --- a/server/internal/core/session.go +++ b/server/internal/core/session.go @@ -64,8 +64,13 @@ func NewSessions() *sessions { } func RegisterSession(req *clientpb.RegisterSession) (*Session, error) { - cache := NewCache(path.Join(configs.CachePath, req.SessionId)) - err := cache.Save() + contextDir := filepath.Join(configs.ContextPath, req.SessionId) + err := os.MkdirAll(contextDir, os.ModePerm) + if err != nil { + logs.Log.Errorf("cannot create log directory %s, %s", contextDir, err.Error()) + } + cache := NewCache(path.Join(contextDir, consts.CachePath, req.SessionId)) + err = cache.Save() if err != nil { return nil, err } @@ -84,10 +89,15 @@ func RegisterSession(req *clientpb.RegisterSession) (*Session, error) { Cache: cache, responses: &sync.Map{}, } - logDir := filepath.Join(configs.LogPath, sess.ID) - err = os.MkdirAll(logDir, os.ModePerm) - if err != nil { - logs.Log.Errorf("cannot create log directory %s, %s", logDir, err.Error()) + downloadDir := filepath.Join(contextDir, consts.DownloadPath) + keyLoggerDir := filepath.Join(contextDir, consts.KeyLoggerPath) + screenShotDir := filepath.Join(contextDir, consts.ScreenShotPath) + taskDir := filepath.Join(contextDir, consts.TaskPath) + for _, dir := range []string{downloadDir, keyLoggerDir, screenShotDir, taskDir} { + err = os.MkdirAll(dir, os.ModePerm) + if err != nil { + logs.Log.Errorf("cannot create log directory %s, %s", dir, err.Error()) + } } if req.RegisterData.Sysinfo != nil { sess.UpdateSysInfo(req.RegisterData.Sysinfo) @@ -97,7 +107,7 @@ func RegisterSession(req *clientpb.RegisterSession) (*Session, error) { } func RecoverSession(sess *clientpb.Session) (*Session, error) { - cache := NewCache(path.Join(configs.CachePath, sess.SessionId)) + cache := NewCache(path.Join(configs.ContextPath, sess.SessionId, consts.CachePath, sess.SessionId)) err := cache.Load() if err != nil { return nil, err @@ -202,7 +212,7 @@ func (s *Session) TaskLog(task *Task, spite *implantpb.Spite) error { if err != nil { return err } - filePath := filepath.Join(configs.LogPath, s.ID, fmt.Sprintf("%d_%d", task.Id, task.Cur)) + filePath := filepath.Join(configs.ContextPath, s.ID, consts.TaskPath, fmt.Sprintf("%d_%d", task.Id, task.Cur)) f, err := os.OpenFile(filePath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) if err != nil { return err @@ -228,7 +238,7 @@ func (s *Session) Recover() error { } func (s *Session) RecoverTaskIDByLog() (int, error) { - files, err := os.ReadDir(filepath.Join(configs.LogPath, s.ID)) + files, err := os.ReadDir(filepath.Join(configs.ContextPath, s.ID, consts.TaskPath)) if err != nil { return 0, err } diff --git a/server/internal/db/helper.go b/server/internal/db/helper.go index fd8938df..10b6a24b 100644 --- a/server/internal/db/helper.go +++ b/server/internal/db/helper.go @@ -174,18 +174,18 @@ func ListClients() ([]models.Operator, error) { return operators, nil } -func GetTaskDescriptionByID(taskID string) (*models.FileDescription, error) { +func GetTaskDescriptionByID(taskID string) (*models.File, *models.FileDescription, error) { var task models.File if err := Session().Where("id = ?", taskID).First(&task).Error; err != nil { - return nil, err + return nil, nil, err } var td models.FileDescription if err := json.Unmarshal([]byte(task.Description), &td); err != nil { - return nil, err + return nil, nil, err } - return &td, nil + return &task, &td, nil } // File @@ -1020,3 +1020,17 @@ func GetBuilderByProfileName(profileName string) (*clientpb.Builders, error) { } return pbBuilders, nil } + +// context +func GetAllContext() ([]*models.Context, error) { + var contexts []*models.Context + result := Session().Find(&contexts) + if result.Error != nil { + return nil, result.Error + } + return contexts, nil +} + +func CreateContext(ctx *models.Context) error { + return Session().Create(ctx).Error +} diff --git a/server/internal/db/models/context.go b/server/internal/db/models/context.go new file mode 100644 index 00000000..c75758df --- /dev/null +++ b/server/internal/db/models/context.go @@ -0,0 +1,90 @@ +package models + +import ( + "github.com/chainreactors/malice-network/helper/consts" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/malice-network/helper/types" + "github.com/gofrs/uuid" + "gorm.io/gorm" + "strconv" + "time" +) + +type Context struct { + ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"` + CreatedAt time.Time `gorm:"->;<-:create;"` + SessionID string `gorm:"type:string;index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` + PipelineName string `gorm:"type:string;index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` + ListenerName string `gorm:"type:string;index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` + TaskID string `gorm:"type:string;index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` + Type string + Value string + value types.Context `gorm:"-"` + + Session *Session `gorm:"foreignKey:SessionID;references:SessionID;"` + Pipeline *Pipeline `gorm:"foreignKey:PipelineName;references:Name;"` + Listener *Operator `gorm:"foreignKey:ListenerName;references:Name;"` + Task *Task `gorm:"foreignKey:TaskID;references:ID;"` +} + +func (c *Context) BeforeCreate(tx *gorm.DB) (err error) { + c.ID, err = uuid.NewV4() + if err != nil { + return err + } + c.CreatedAt = time.Now() + return nil +} + +func (c *Context) ToProtobuf() *clientpb.Context { + if c.Session == nil { + c.Session = &Session{} + } + if c.Pipeline == nil { + c.Pipeline = &Pipeline{} + } + if c.Task == nil { + c.Task = &Task{} + } + return &clientpb.Context{ + Id: c.ID.String(), + Session: c.Session.ToProtobuf(), + Pipeline: c.Pipeline.ToProtobuf(), + Task: c.Task.ToProtobuf(), + Type: c.Type, + Value: c.Value, + } +} + +func ToContextDB(ctx *clientpb.Context) *Context { + context := &Context{ + ID: uuid.FromStringOrNil(ctx.Id), + SessionID: ctx.Session.SessionId, + PipelineName: ctx.Pipeline.Name, + ListenerName: ctx.Listener.Id, + TaskID: ctx.Task.SessionId + "-" + strconv.Itoa(int(ctx.Task.TaskId)), + Type: ctx.Type, + Value: ctx.Value, + } + switch context.Type { + case consts.ScreenShotType: + shot, err := types.NewScreenShot([]byte(ctx.Value)) + if err != nil { + return nil + } + context.value = shot + case consts.CredentialType: + credential, err := types.NewCredential([]byte(ctx.Value)) + if err != nil { + return nil + } + context.value = credential + case consts.KeyLoggerType: + keyLogger, err := types.NewKeyLogger([]byte(ctx.Value)) + if err != nil { + return nil + } + context.value = keyLogger + } + return context +} diff --git a/server/internal/db/sql.go b/server/internal/db/sql.go index 7fc751e3..3c03fd13 100644 --- a/server/internal/db/sql.go +++ b/server/internal/db/sql.go @@ -31,6 +31,7 @@ func NewDBClient() *gorm.DB { &models.WebsiteContent{}, &models.Operator{}, &models.Certificate{}, + &models.Context{}, ) if dbClient == nil { logs.Log.Errorf("Failed to initialize database") diff --git a/server/rpc/grpc.go b/server/rpc/grpc.go index 1a9012ec..b7622374 100644 --- a/server/rpc/grpc.go +++ b/server/rpc/grpc.go @@ -119,7 +119,7 @@ func NewServer() *Server { // } // data, err := req.Session.RequestAndWait( // &clientpb.SpiteSession{SessionId: req.Session.ID, TaskId: req.Task.Id, Spite: spite}, -// pipelinesCh[req.Session.PipelineID], +// pipelinesCh[req.Session.PipelineName], // consts.MinTimeout) // if err != nil { // return nil, err diff --git a/server/rpc/rpc-context.go b/server/rpc/rpc-context.go new file mode 100644 index 00000000..1e6a45cc --- /dev/null +++ b/server/rpc/rpc-context.go @@ -0,0 +1,49 @@ +package rpc + +import ( + "context" + "github.com/chainreactors/malice-network/helper/proto/client/clientpb" + "github.com/chainreactors/malice-network/server/internal/core" + "github.com/chainreactors/malice-network/server/internal/db" + "github.com/chainreactors/malice-network/server/internal/db/models" + "strconv" +) + +func (rpc *Server) GetContexts(ctx context.Context, req *clientpb.Context) (*clientpb.Contexts, error) { + contexts := make([]*clientpb.Context, 0) + for _, c := range core.Contexts.All() { + if req.Session != nil && req.Session.SessionId != "" && c.SessionID != req.Session.SessionId { + continue + } else if req.Task != nil && req.Task.TaskId != 0 && c.TaskID != req.Task.SessionId+"-"+strconv.Itoa(int(req.Task.TaskId)) { + continue + } else if req.Pipeline != nil && req.Pipeline.Name != "" && c.PipelineName != req.Pipeline.Name { + continue + } else if req.Listener != nil && req.Listener.Id != "" && c.ListenerName != req.Listener.Id { + continue + } + contexts = append(contexts, c.ToProtobuf()) + } + return &clientpb.Contexts{Contexts: contexts}, nil +} + +func (rpc *Server) GetScreenShot(ctx context.Context, req *clientpb.Empty) (*clientpb.Contexts, error) { + return &clientpb.Contexts{Contexts: core.Contexts.ScreenShot()}, nil +} + +func (rpc *Server) GetCredential(ctx context.Context, req *clientpb.Empty) (*clientpb.Contexts, error) { + return &clientpb.Contexts{Contexts: core.Contexts.Credential()}, nil +} + +func (rpc *Server) GetKeylogger(ctx context.Context, req *clientpb.Empty) (*clientpb.Contexts, error) { + return &clientpb.Contexts{Contexts: core.Contexts.KeyLogger()}, nil +} + +func (rpc *Server) AddContext(ctx context.Context, req *clientpb.Context) (*clientpb.Empty, error) { + contextDB := models.ToContextDB(req) + core.Contexts.Add(contextDB) + err := db.CreateContext(contextDB) + if err != nil { + return nil, err + } + return &clientpb.Empty{}, nil +} diff --git a/server/rpc/rpc-file.go b/server/rpc/rpc-file.go index 60713c25..ca97bb8e 100644 --- a/server/rpc/rpc-file.go +++ b/server/rpc/rpc-file.go @@ -153,6 +153,7 @@ func (rpc *Server) Download(ctx context.Context, req *implantpb.DownloadRequest) downloadAbs := resp.GetDownloadResponse() fileName := path.Join(configs.TempPath, downloadAbs.Checksum) + moveName := path.Join(configs.ContextPath, greq.Session.ID, consts.DownloadPath, downloadAbs.Checksum) greq.Session.AddMessage(resp, 0) greq.Task.Total = int(resp.GetDownloadResponse().Size)/config.Int(consts.ConfigMaxPacketLength) + 1 size := resp.GetDownloadResponse().Size @@ -212,6 +213,10 @@ func (rpc *Server) Download(ctx context.Context, req *implantpb.DownloadRequest) if err != nil { logs.Log.Errorf("cannot create task %d , %s in db", greq.Task.Id, err.Error()) } + err = fileutils.MoveFile(fileName, moveName) + if err != nil { + return + } greq.Task.Finish(resp, "sync id "+checksum) } } @@ -220,7 +225,7 @@ func (rpc *Server) Download(ctx context.Context, req *implantpb.DownloadRequest) } func (rpc *Server) Sync(ctx context.Context, req *clientpb.Sync) (*clientpb.SyncResp, error) { - td, err := db.GetTaskDescriptionByID(req.FileId) + task, td, err := db.GetTaskDescriptionByID(req.FileId) if err != nil { logs.Log.Errorf("cannot find task in db by fileid: %s", err) return nil, err @@ -228,9 +233,17 @@ func (rpc *Server) Sync(ctx context.Context, req *clientpb.Sync) (*clientpb.Sync //if !file.Exist(td.Path + td.Name) { // return nil, os.ErrExist //} - data, err := os.ReadFile(path.Join(configs.TempPath, td.NickName)) - if err != nil { - return nil, err + var data []byte + if task.Type == consts.ModuleDownload { + data, err = os.ReadFile(path.Join(configs.ContextPath, task.SessionID, consts.DownloadPath, td.NickName)) + if err != nil { + return nil, err + } + } else { + data, err = os.ReadFile(path.Join(configs.TempPath, td.NickName)) + if err != nil { + return nil, err + } } resp := &clientpb.SyncResp{ Name: td.Name, diff --git a/server/rpc/rpc-session.go b/server/rpc/rpc-session.go index b6e6a3ec..7cdef6c0 100644 --- a/server/rpc/rpc-session.go +++ b/server/rpc/rpc-session.go @@ -3,6 +3,7 @@ package rpc import ( "context" "github.com/chainreactors/logs" + "github.com/chainreactors/malice-network/helper/consts" "github.com/chainreactors/malice-network/helper/errs" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/chainreactors/malice-network/helper/proto/implant/implantpb" @@ -113,7 +114,7 @@ func (rpc *Server) GetSessionHistory(ctx context.Context, req *clientpb.Int) (*c Contexts: make([]*clientpb.TaskContext, 0), } - taskDir := filepath.Join(configs.LogPath, sid) + taskDir := filepath.Join(configs.ContextPath, sid, consts.TaskPath) session, ok := core.Sessions.Get(sid) if !ok { _, taskId, err := db.FindTaskAndMaxTasksID(sid) From ace33f01f94ae6dd56a7232d0cb8f6fadae4b52b Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Sun, 19 Jan 2025 01:35:28 +0800 Subject: [PATCH 32/40] fix: use config auto save and singleton --- client/assets/plugin.go | 21 ++++++-- client/assets/profile.go | 86 +++++++++++++++++++++---------- client/cmd/cli/cmd.go | 3 +- client/command/action/action.go | 13 +++-- client/command/action/commands.go | 6 ++- client/command/alias/load.go | 7 ++- client/command/common/monitor.go | 6 ++- client/command/config/commands.go | 6 ++- client/command/config/config.go | 21 ++++++-- client/command/extension/load.go | 8 ++- client/command/mal/load.go | 5 +- client/command/modules/load.go | 5 +- client/core/session.go | 6 ++- server/internal/core/cache.go | 2 + server/internal/core/session.go | 4 +- 15 files changed, 147 insertions(+), 52 deletions(-) diff --git a/client/assets/plugin.go b/client/assets/plugin.go index 71fddc81..b4b42809 100644 --- a/client/assets/plugin.go +++ b/client/assets/plugin.go @@ -29,7 +29,12 @@ func GetAliasesDir() string { func GetInstalledAliasManifests() []string { aliasDir := GetAliasesDir() var manifests []string - for _, alias := range GetProfile().Aliases { + aliases, err := GetAliases() + if err != nil { + logs.Log.Errorf("Failed to get aliases %s", err) + return manifests + } + for _, alias := range aliases { manifestPath := filepath.Join(aliasDir, alias, "alias.json") if _, err := os.Stat(manifestPath); os.IsNotExist(err) { logs.Log.Errorf("no manifest in %s, skipping ...\n", manifestPath) @@ -57,7 +62,12 @@ func GetExtensionsDir() string { func GetInstalledExtensionManifests() []string { extDir := GetExtensionsDir() var manifests []string - for _, extension := range GetProfile().Extensions { + extensions, err := GetExtensions() + if err != nil { + logs.Log.Errorf("Failed to get extensions %s", err) + return manifests + } + for _, extension := range extensions { manifestPath := filepath.Join(extDir, extension, "extension.json") if _, err := os.Stat(manifestPath); os.IsNotExist(err) { logs.Log.Errorf("no manifest in %s, skipping ...\n", manifestPath) @@ -83,7 +93,12 @@ func GetMalsDir() string { func GetInstalledMalManifests() []string { dir := GetMalsDir() var manifests []string - for _, mal := range GetProfile().Mals { + mals, err := GetMals() + if err != nil { + logs.Log.Errorf("Failed to get mals %s", err) + return manifests + } + for _, mal := range mals { manifestPath := filepath.Join(dir, mal, "mal.yaml") if _, err := os.Stat(manifestPath); os.IsNotExist(err) { logs.Log.Errorf("no manifest in %s, skipping ...\n", manifestPath) diff --git a/client/assets/profile.go b/client/assets/profile.go index 5a362af5..1759617a 100644 --- a/client/assets/profile.go +++ b/client/assets/profile.go @@ -2,8 +2,7 @@ package assets import ( "github.com/chainreactors/logs" - crConfig "github.com/chainreactors/malice-network/helper/utils/config" - "github.com/chainreactors/malice-network/helper/utils/fileutils" + "github.com/gookit/config/v2" "golang.org/x/exp/slices" "gopkg.in/yaml.v3" "os" @@ -14,6 +13,22 @@ var ( maliceProfile = "malice.yaml" ) +var HookFn = func(event string, c *config.Config) { + p := &Profile{} + if event == config.OnSetValue { + err := c.MapStruct("", p) + if err != nil { + logs.Log.Errorf(err.Error()) + return + } + err = SaveProfile(p) + if err != nil { + logs.Log.Errorf(err.Error()) + return + } + } +} + type Profile struct { ResourceDir string `yaml:"resources" config:"resources" default:""` TempDir string `yaml:"tmp" config:"tmp" default:""` @@ -54,42 +69,61 @@ func findFile(filename string) (string, error) { return malicePath, nil } -func loadProfile(path string) (*Profile, error) { - var profile Profile - if !fileutils.Exist(path) { - confStr := crConfig.InitDefaultConfig(&profile, 0) - err := os.WriteFile(path, confStr, 0644) - if err != nil { - logs.Log.Errorf("cannot write default config , %s ", err.Error()) - return nil, err - } - logs.Log.Warnf("config file not found, created default config %s", path) +func RefreshProfile() error { + a := &Profile{} + config.MapStruct("", a) + err := config.ReloadFiles() + if err != nil { + return err } + config.MapStruct("", a) + return nil +} - err := crConfig.LoadConfig(path, &profile) +func GetProfile() (*Profile, error) { + p := &Profile{} + err := config.MapStruct("", p) if err != nil { - logs.Log.Warnf("cannot load config , %s ", err.Error()) - return nil, err + return p, err } - return &profile, nil + return p, nil } -func GetProfile() *Profile { - filePath, err := findFile(maliceProfile) +func GetAliases() ([]string, error) { + var alias []string + err := config.MapStruct("aliases", alias) if err != nil { - logs.Log.Errorf("Failed to find malice.yaml: %v", err) - os.Exit(0) - return nil + return alias, err } + return alias, nil +} - profile, err := loadProfile(filePath) +func GetExtensions() ([]string, error) { + var extension []string + err := config.MapStruct("extensions", extension) if err != nil { - logs.Log.Errorf("Failed to load malice.yaml: %v", err) - os.Exit(0) - return nil + return extension, err } + return extension, nil +} - return profile +func GetMals() ([]string, error) { + var mal []string + err := config.MapStruct("mals", mal) + if err != nil { + return mal, err + } + return mal, nil + +} + +func GetSetting() (*Settings, error) { + s := &Settings{} + err := config.MapStruct("settings", s) + if err != nil { + return s, err + } + return s, nil } func SaveProfile(profile *Profile) error { diff --git a/client/cmd/cli/cmd.go b/client/cmd/cli/cmd.go index 6f6fa232..d18975f5 100644 --- a/client/cmd/cli/cmd.go +++ b/client/cmd/cli/cmd.go @@ -3,6 +3,7 @@ package cli import ( "fmt" "github.com/chainreactors/logs" + "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/core" "github.com/chainreactors/malice-network/client/repl" "github.com/gookit/config/v2" @@ -16,7 +17,7 @@ func init() { config.WithOptions(func(opt *config.Options) { opt.DecoderConfig.TagName = "config" opt.ParseDefault = true - }) + }, config.WithHookFunc(assets.HookFn)) config.AddDriver(yaml.Driver) } diff --git a/client/command/action/action.go b/client/command/action/action.go index b66bfe4b..f625f84e 100644 --- a/client/command/action/action.go +++ b/client/command/action/action.go @@ -16,19 +16,22 @@ import ( func checkGithubArg(cmd *cobra.Command, isList bool) (string, string, string, string, bool, error) { owner, repo, token, file, remove := common.ParseGithubFlags(cmd) - profile := assets.GetProfile().Settings + setting, err := assets.GetSetting() + if err != nil { + return "", "", "", "", false, err + } if owner == "" { - owner = profile.GithubOwner + owner = setting.GithubOwner } if repo == "" { - repo = profile.GithubRepo + repo = setting.GithubRepo } if token == "" { - token = profile.GithubToken + token = setting.GithubToken } if !isList { if file == "" { - file = profile.GithubWorkflowFile + file = setting.GithubWorkflowFile } if file == "" { file = "generate.yaml" diff --git a/client/command/action/commands.go b/client/command/action/commands.go index b7748ce8..612219a0 100644 --- a/client/command/action/commands.go +++ b/client/command/action/commands.go @@ -163,7 +163,11 @@ action pulse --target x86_64-pc-windows-msvc --profile pulse_profile --artifact- } func Register(con *repl.Console) { - settings := assets.GetProfile().Settings + settings, err := assets.GetSetting() + if err != nil { + con.Log.Errorf("Get settings failed: %v", err) + return + } con.RegisterServerFunc(consts.CommandAction+"_"+consts.CommandActionRun, func(con *repl.Console, msg string) (*clientpb.Builder, error) { return RunWorkFlow(con, &clientpb.GithubWorkflowRequest{ Owner: settings.GithubOwner, diff --git a/client/command/alias/load.go b/client/command/alias/load.go index f75c063a..0f87e1e9 100644 --- a/client/command/alias/load.go +++ b/client/command/alias/load.go @@ -189,9 +189,12 @@ func RegisterAlias(aliasManifest *AliasManifest, cmd *cobra.Command, con *repl.C return ExecuteAlias(rpc, sess, aliasManifest.CommandName, args, param, sac) }, common.ParseAssembly), } - profile := assets.GetProfile() + profile, err := assets.GetProfile() + if err != nil { + return err + } profile.AddAlias(aliasManifest.CommandName) - err := assets.SaveProfile(profile) + err = assets.SaveProfile(profile) if err != nil { return err } diff --git a/client/command/common/monitor.go b/client/command/common/monitor.go index 26b3be8f..a980f708 100644 --- a/client/command/common/monitor.go +++ b/client/command/common/monitor.go @@ -14,7 +14,11 @@ func OpsecConfirm(cmd *cobra.Command) error { if err != nil { return err } - threshold := assets.GetProfile().Settings.OpsecThreshold + setting, err := assets.GetSetting() + if err != nil { + return err + } + threshold := setting.OpsecThreshold if err != nil { return err } diff --git a/client/command/config/commands.go b/client/command/config/commands.go index 614f8ab7..fe6c8a87 100644 --- a/client/command/config/commands.go +++ b/client/command/config/commands.go @@ -5,6 +5,7 @@ import ( "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) func Commands(con *repl.Console) []*cobra.Command { @@ -15,7 +16,6 @@ func Commands(con *repl.Console) []*cobra.Command { return cmd.Help() }, } - configRefreshCmd := &cobra.Command{ Use: consts.CommandRefresh, Short: "Refresh config", @@ -24,6 +24,10 @@ func Commands(con *repl.Console) []*cobra.Command { }, } + common.BindFlag(configRefreshCmd, func(f *pflag.FlagSet) { + f.Bool("client", false, "Refresh client config") + }) + githubCmd := &cobra.Command{ Use: consts.CommandGithub, Short: "Show Github config and more operations", diff --git a/client/command/config/config.go b/client/command/config/config.go index bec38fb8..0ca60e09 100644 --- a/client/command/config/config.go +++ b/client/command/config/config.go @@ -1,18 +1,29 @@ package config import ( + "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/proto/client/clientpb" "github.com/spf13/cobra" ) func RefreshCmd(cmd *cobra.Command, con *repl.Console) error { - _, err := Refresh(con) - if err != nil { - return err + isClient, _ := cmd.Flags().GetBool("client") + if isClient { + err := assets.RefreshProfile() + if err != nil { + return err + } + con.Log.Console("Refresh client config success\n") + return nil + } else { + _, err := Refresh(con) + if err != nil { + return err + } + con.Log.Console("Refresh config success\n") + return nil } - con.Log.Console("Refresh config success\n") - return nil } func Refresh(con *repl.Console) (*clientpb.Empty, error) { diff --git a/client/command/extension/load.go b/client/command/extension/load.go index 1beb4528..f3ca48c9 100644 --- a/client/command/extension/load.go +++ b/client/command/extension/load.go @@ -274,10 +274,14 @@ func ExtensionRegisterCommand(extCmd *ExtCommand, cmd *cobra.Command, con *repl. return ExecuteExtension(rpc, sess, extensionCmd.Name(), args) }, common.ParseAssembly), } - profile := assets.GetProfile() + profile, err := assets.GetProfile() + if err != nil { + con.Log.Errorf("Error getting profile: %s\n", err) + return + } profile.AddExtension(extCmd.CommandName) cmd.AddCommand(extensionCmd) - err := assets.SaveProfile(profile) + err = assets.SaveProfile(profile) if err != nil { con.Log.Errorf("Error saving profile: %s\n", err) return diff --git a/client/command/mal/load.go b/client/command/mal/load.go index 0ba81a05..f5febd34 100644 --- a/client/command/mal/load.go +++ b/client/command/mal/load.go @@ -48,7 +48,10 @@ func LoadMalWithManifest(con *repl.Console, rootCmd *cobra.Command, manifest *pl for event, fn := range plug.GetEvents() { con.AddEventHook(event, fn) } - profile := assets.GetProfile() + profile, err := assets.GetProfile() + if err != nil { + return nil, err + } profile.AddMal(manifest.Name) var cmdNames []string var cmds []*cobra.Command diff --git a/client/command/modules/load.go b/client/command/modules/load.go index 24f4a921..891329b9 100644 --- a/client/command/modules/load.go +++ b/client/command/modules/load.go @@ -102,7 +102,10 @@ func buildWithAction(con *repl.Console, target, profile string, modules []string modules = []string{"full"} } var workflowID string - setting := assets.GetProfile().Settings + setting, err := assets.GetSetting() + if err != nil { + return err + } if setting.GithubWorkflowFile == "" { workflowID = "generate.yaml" } else { diff --git a/client/core/session.go b/client/core/session.go index 51720aef..f44f9263 100644 --- a/client/core/session.go +++ b/client/core/session.go @@ -121,7 +121,11 @@ func (s *Session) HasTask(taskId uint32) bool { } func (s *Session) GetHistory() { - profile := assets.GetProfile() + profile, err := assets.GetProfile() + if err != nil { + Log.Errorf("Failed to get profile: %v", err) + return + } contexts, err := s.Server.Rpc.GetSessionHistory(s.Context(), &clientpb.Int{ Limit: int32(profile.Settings.MaxServerLogSize), }) diff --git a/server/internal/core/cache.go b/server/internal/core/cache.go index fd1e70c8..a0ff2777 100644 --- a/server/internal/core/cache.go +++ b/server/internal/core/cache.go @@ -14,6 +14,8 @@ import ( "time" ) +var CacheName = "cache.bin" + type Cache struct { items map[string]*clientpb.SpiteCacheItem mutex sync.RWMutex diff --git a/server/internal/core/session.go b/server/internal/core/session.go index 056b4acf..90a7f1b4 100644 --- a/server/internal/core/session.go +++ b/server/internal/core/session.go @@ -69,7 +69,7 @@ func RegisterSession(req *clientpb.RegisterSession) (*Session, error) { if err != nil { logs.Log.Errorf("cannot create log directory %s, %s", contextDir, err.Error()) } - cache := NewCache(path.Join(contextDir, consts.CachePath, req.SessionId)) + cache := NewCache(path.Join(contextDir, consts.CachePath, CacheName)) err = cache.Save() if err != nil { return nil, err @@ -107,7 +107,7 @@ func RegisterSession(req *clientpb.RegisterSession) (*Session, error) { } func RecoverSession(sess *clientpb.Session) (*Session, error) { - cache := NewCache(path.Join(configs.ContextPath, sess.SessionId, consts.CachePath, sess.SessionId)) + cache := NewCache(path.Join(configs.ContextPath, sess.SessionId, consts.CachePath, CacheName)) err := cache.Load() if err != nil { return nil, err From 30083561aaf85219a7a4c78e983c842ad679af66 Mon Sep 17 00:00:00 2001 From: HuYlllc <632781087@qq.com> Date: Mon, 20 Jan 2025 16:20:57 +0800 Subject: [PATCH 33/40] fix: config not loading in initializing --- client/assets/profile.go | 36 ++++++++++++++++++++++++++++++------ client/repl/console.go | 4 ++++ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/client/assets/profile.go b/client/assets/profile.go index 1759617a..2f0d548d 100644 --- a/client/assets/profile.go +++ b/client/assets/profile.go @@ -2,6 +2,8 @@ package assets import ( "github.com/chainreactors/logs" + crConfig "github.com/chainreactors/malice-network/helper/utils/config" + "github.com/chainreactors/malice-network/helper/utils/fileutils" "github.com/gookit/config/v2" "golang.org/x/exp/slices" "gopkg.in/yaml.v3" @@ -69,6 +71,25 @@ func findFile(filename string) (string, error) { return malicePath, nil } +func LoadProfile() (*Profile, error) { + rootDir, _ := filepath.Abs(GetRootAppDir()) + malicePath := filepath.Join(rootDir, maliceProfile) + profile := &Profile{} + if !fileutils.Exist(malicePath) { + confStr := crConfig.InitDefaultConfig(profile, 0) + err := os.WriteFile(malicePath, confStr, 0644) + if err != nil { + return profile, err + } + logs.Log.Warnf("config file not found, created default config %s", malicePath) + } + err := crConfig.LoadConfig(malicePath, profile) + if err != nil { + return profile, err + } + return profile, nil +} + func RefreshProfile() error { a := &Profile{} config.MapStruct("", a) @@ -90,29 +111,32 @@ func GetProfile() (*Profile, error) { } func GetAliases() ([]string, error) { + profile, err := GetProfile() var alias []string - err := config.MapStruct("aliases", alias) if err != nil { return alias, err } + alias = profile.Aliases return alias, nil } func GetExtensions() ([]string, error) { - var extension []string - err := config.MapStruct("extensions", extension) + profile, err := GetProfile() + var extensions []string if err != nil { - return extension, err + return extensions, err } - return extension, nil + extensions = profile.Extensions + return extensions, nil } func GetMals() ([]string, error) { + profile, err := GetProfile() var mal []string - err := config.MapStruct("mals", mal) if err != nil { return mal, err } + mal = profile.Mals return mal, nil } diff --git a/client/repl/console.go b/client/repl/console.go index b127a57b..74caa722 100644 --- a/client/repl/console.go +++ b/client/repl/console.go @@ -44,6 +44,10 @@ func NewConsole() (*Console, error) { Helpers: make(map[string]*cobra.Command), } con.NewConsole() + _, err := assets.LoadProfile() + if err != nil { + return nil, err + } return con, nil } From 9ebee1c0617f24bd404729f5d1a7a670f209ecb0 Mon Sep 17 00:00:00 2001 From: h3zh1 Date: Mon, 20 Jan 2025 17:38:55 +0800 Subject: [PATCH 34/40] fix: remove debug output --- external/console/line.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/external/console/line.go b/external/console/line.go index 24cd0a8b..46ca9309 100644 --- a/external/console/line.go +++ b/external/console/line.go @@ -3,7 +3,6 @@ package console import ( "bytes" "errors" - "fmt" "regexp" "strings" "unicode/utf8" @@ -58,13 +57,10 @@ func shellSplit(command string) (args []string, err error) { for _, match := range matches { if match[1] != "" { // Matched double-quoted part parts = append(parts, match[1]) - fmt.Printf("match: %s\n", match[1]) } else if match[2] != "" { // Matched single-quoted part parts = append(parts, match[2]) - fmt.Printf("match: %s\n", match[2]) } else { // Unquoted part parts = append(parts, match[0]) - fmt.Printf("match: %s\n", match[0]) } } return parts, nil From 8fbb24c9bdb1697deed51449033be3ec95fad170 Mon Sep 17 00:00:00 2001 From: h3zh1 Date: Mon, 20 Jan 2025 18:03:06 +0800 Subject: [PATCH 35/40] fix: cache --- server/internal/core/cache.go | 2 +- server/internal/core/session.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/server/internal/core/cache.go b/server/internal/core/cache.go index a0ff2777..174745b9 100644 --- a/server/internal/core/cache.go +++ b/server/internal/core/cache.go @@ -30,7 +30,7 @@ func NewCache(savePath string) *Cache { items: make(map[string]*clientpb.SpiteCacheItem), maxSize: 1024, duration: math.MaxInt64, - savePath: savePath + ".cache", + savePath: savePath, } GlobalTicker.Start(consts.DefaultCacheInterval, func() { err := cache.Save() diff --git a/server/internal/core/session.go b/server/internal/core/session.go index 90a7f1b4..e6ac4bdb 100644 --- a/server/internal/core/session.go +++ b/server/internal/core/session.go @@ -64,12 +64,18 @@ func NewSessions() *sessions { } func RegisterSession(req *clientpb.RegisterSession) (*Session, error) { + var err error contextDir := filepath.Join(configs.ContextPath, req.SessionId) - err := os.MkdirAll(contextDir, os.ModePerm) + err = os.MkdirAll(contextDir, os.ModePerm) if err != nil { logs.Log.Errorf("cannot create log directory %s, %s", contextDir, err.Error()) } - cache := NewCache(path.Join(contextDir, consts.CachePath, CacheName)) + cacheDir := filepath.Join(contextDir, consts.CachePath) + err = os.MkdirAll(cacheDir, os.ModePerm) + if err != nil { + logs.Log.Errorf("cannot create cache directory %s, %s", cacheDir, err.Error()) + } + cache := NewCache(filepath.Join(cacheDir, CacheName)) err = cache.Save() if err != nil { return nil, err From d5f3ab62546bb4bd57730d786b712db173a1b769 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Sat, 18 Jan 2025 19:53:13 +0800 Subject: [PATCH 36/40] chore: mals command func return cobra.Command --- client/command/taskschd/commands.go | 12 ++++++++---- client/core/plugin/lua.go | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/client/command/taskschd/commands.go b/client/command/taskschd/commands.go index fc600a05..c400624f 100644 --- a/client/command/taskschd/commands.go +++ b/client/command/taskschd/commands.go @@ -1,9 +1,11 @@ package taskschd import ( + "github.com/chainreactors/malice-network/client/command/common" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/consts" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) func Commands(con *repl.Console) []*cobra.Command { @@ -50,10 +52,12 @@ func Commands(con *repl.Console) []*cobra.Command { taskschd create --name ExampleTask --path /path/to/executable --trigger_type 1 --start_boundary "2023-10-10T09:00:00" ~~~`, } - taskSchdCreateCmd.Flags().String("name", "", "Name of the scheduled task (required)") - taskSchdCreateCmd.Flags().String("path", "", "Path to the executable for the scheduled task (required)") - taskSchdCreateCmd.Flags().Uint32("trigger_type", 1, "Trigger type for the task (e.g., 1 for daily, 2 for weekly)") - taskSchdCreateCmd.Flags().String("start_boundary", "", "Start boundary for the scheduled task (e.g., 2023-10-10T09:00:00)") + common.BindFlag(taskSchdCreateCmd, func(f *pflag.FlagSet) { + f.String("name", "", "Name of the scheduled task (required)") + f.String("path", "", "Path to the executable for the scheduled task (required)") + f.Uint32("trigger_type", 1, "Trigger type for the task (e.g., 1 for daily, 2 for weekly)") + f.String("start_boundary", "", "Start boundary for the scheduled task (e.g., 2023-10-10T09:00:00)") + }) taskSchdStartCmd := &cobra.Command{ Use: consts.SubCommandName(consts.ModuleTaskSchdStart) + " [name]", diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index 0dd2232a..d192e15f 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -324,7 +324,7 @@ func (plug *LuaPlugin) RegisterLuaBuiltin(vm *lua.LState) error { return true, nil }) - plug.registerLuaFunction(vm, "command", func(name string, fn *lua.LFunction, short string, ttp string) (bool, error) { + plug.registerLuaFunction(vm, "command", func(name string, fn *lua.LFunction, short string, ttp string) (*cobra.Command, error) { cmd := plug.CMDs.Find(name) var paramNames []string @@ -418,7 +418,7 @@ func (plug *LuaPlugin) RegisterLuaBuiltin(vm *lua.LState) error { logs.Log.Debugf("Registered Command: %s\n", cmd.Name) plug.CMDs.SetCommand(name, malCmd) - return true, nil + return malCmd, nil }) return nil From ee089a1c0c09fe46a2d72687910dbc150c4e5316 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 20 Jan 2025 15:25:06 +0800 Subject: [PATCH 37/40] feat: support custom bind flagset --- client/core/plugin/lua.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index d192e15f..5629b3a3 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -358,6 +358,8 @@ func (plug *LuaPlugin) RegisterLuaBuiltin(vm *lua.LState) error { wrapper.Push(lua.LString(shellquote.Join(args...))) case "args": wrapper.Push(mals.ConvertGoValueToLua(wrapper.LState, args)) + case "cmd": + wrapper.Push(mals.ConvertGoValueToLua(wrapper.LState, cmd)) default: val, err := cmd.Flags().GetString(paramName) if err != nil { From 2ffcf3cd02caf3029ea81fe23a2fe6b9b1543cc5 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 20 Jan 2025 16:08:13 +0800 Subject: [PATCH 38/40] refactor: move mal parser to mals package --- client/assets/package.go | 36 ++---- client/command/mal/install.go | 11 +- client/command/mal/load.go | 3 +- client/command/mal/manage.go | 30 ++--- client/command/mal/parser.go | 227 ---------------------------------- client/command/mal/remove.go | 2 +- go.mod | 4 +- go.sum | 2 + 8 files changed, 32 insertions(+), 283 deletions(-) delete mode 100644 client/command/mal/parser.go diff --git a/client/assets/package.go b/client/assets/package.go index 2f798e2c..4ba04708 100644 --- a/client/assets/package.go +++ b/client/assets/package.go @@ -2,6 +2,7 @@ package assets import ( "encoding/json" + "github.com/chainreactors/mals/m" "io/ioutil" "log" "os" @@ -12,8 +13,6 @@ import ( const ( armoryConfigFileName = "armories.json" DefaultArmoryName = "Default" - malConfigFileName = "mals.yaml" - DefaultMalName = "Default" ) var ( @@ -28,47 +27,28 @@ var ( Name: DefaultArmoryName, Enabled: true, } - - DefaultMalRepoURL = "https://api.github.com/repos/chainreactors/mals/releases" - - DefaultMalConfig = &MalConfig{ - //PublicKey: DefaultArmoryPublicKey, - RepoURL: DefaultMalRepoURL, - Name: DefaultMalName, - Enabled: true, - } ) -type MalConfig struct { - RepoURL string `yaml:"repo_url"` - Authorization string `yaml:"authorization"` - AuthorizationCmd string `yaml:"authorization_cmd"` - Name string `yaml:"name"` - Enabled bool `yaml:"enabled"` - Version string `yaml:"version"` - Help string `yaml:"help"` -} - -func GetMalsConfig() []*MalConfig { - malConfigPath := filepath.Join(GetRootAppDir(), malConfigFileName) +func GetMalsConfig() []*m.MalConfig { + malConfigPath := filepath.Join(GetRootAppDir(), m.ManifestFileName) if _, err := os.Stat(malConfigPath); os.IsNotExist(err) { - return []*MalConfig{DefaultMalConfig} + return nil } data, err := os.ReadFile(malConfigPath) if err != nil { - return []*MalConfig{DefaultMalConfig} + return nil } - var malConfigs []*MalConfig + var malConfigs []*m.MalConfig err = json.Unmarshal(data, &malConfigs) if err != nil { - return []*MalConfig{DefaultMalConfig} + return nil } for _, malConfig := range malConfigs { if malConfig.AuthorizationCmd != "" { malConfig.Authorization = ExecuteAuthorizationCmd(malConfig.AuthorizationCmd) } } - return append(malConfigs, DefaultMalConfig) + return append(malConfigs, m.DefaultMalConfig) } // ArmoryConfig - The armory config file diff --git a/client/command/mal/install.go b/client/command/mal/install.go index c943dbd0..a06a5c38 100644 --- a/client/command/mal/install.go +++ b/client/command/mal/install.go @@ -6,16 +6,13 @@ import ( "github.com/chainreactors/malice-network/client/core/plugin" "github.com/chainreactors/malice-network/client/repl" "github.com/chainreactors/malice-network/helper/utils/fileutils" + "github.com/chainreactors/mals/m" "github.com/chainreactors/tui" "github.com/spf13/cobra" "os" "path/filepath" ) -var ( - ManifestFileName = "mal.yaml" -) - // ExtensionsInstallCmd - Install an extension func MalInstallCmd(cmd *cobra.Command, con *repl.Console) error { localPath := cmd.Flags().Arg(0) @@ -31,15 +28,15 @@ func InstallFromDir(extLocalPath string, promptToOverwrite bool, con *repl.Conso var manifestData []byte var err error - manifestData, err = fileutils.ReadFileFromTarGz(extLocalPath, ManifestFileName) + manifestData, err = fileutils.ReadFileFromTarGz(extLocalPath, m.ManifestFileName) if err != nil { - con.Log.Errorf("Error reading %s: %s\n", ManifestFileName, err) + con.Log.Errorf("Error reading %s: %s\n", m.ManifestFileName, err) return } manifest, err := plugin.ParseMalManifest(manifestData) if err != nil { - con.Log.Errorf("Error parsing %s: %s\n", ManifestFileName, err) + con.Log.Errorf("Error parsing %s: %s\n", m.ManifestFileName, err) return } diff --git a/client/command/mal/load.go b/client/command/mal/load.go index f5febd34..94169e0e 100644 --- a/client/command/mal/load.go +++ b/client/command/mal/load.go @@ -5,6 +5,7 @@ import ( "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/core/plugin" "github.com/chainreactors/malice-network/client/repl" + "github.com/chainreactors/mals/m" "github.com/chainreactors/tui" "github.com/evertras/bubble-table/table" "github.com/spf13/cobra" @@ -21,7 +22,7 @@ type LoadedMal struct { func MalLoadCmd(ctx *cobra.Command, con *repl.Console) error { dirPath := ctx.Flags().Arg(0) - mal, err := LoadMal(con, con.ImplantMenu(), filepath.Join(assets.GetMalsDir(), dirPath, ManifestFileName)) + mal, err := LoadMal(con, con.ImplantMenu(), filepath.Join(assets.GetMalsDir(), dirPath, m.ManifestFileName)) if err != nil { return err } diff --git a/client/command/mal/manage.go b/client/command/mal/manage.go index befa4dcb..4f73ad1b 100644 --- a/client/command/mal/manage.go +++ b/client/command/mal/manage.go @@ -4,6 +4,7 @@ import ( "github.com/chainreactors/logs" "github.com/chainreactors/malice-network/client/assets" "github.com/chainreactors/malice-network/client/repl" + "github.com/chainreactors/mals/m" "github.com/chainreactors/tui" "github.com/evertras/bubble-table/table" "github.com/spf13/cobra" @@ -17,16 +18,7 @@ var ( defaultTimeout = 15 * time.Minute ) -// MalHTTPConfig - Configuration for armory HTTP client -type MalHTTPConfig struct { - MalConfig *assets.MalConfig - IgnoreCache bool - ProxyURL *url.URL - Timeout time.Duration - DisableTLSValidation bool -} - -func parseMalHTTPConfig(cmd *cobra.Command) MalHTTPConfig { +func parseMalHTTPConfig(cmd *cobra.Command) m.MalHTTPConfig { var proxyURL *url.URL rawProxyURL, _ := cmd.Flags().GetString("proxy") if rawProxyURL != "" { @@ -44,7 +36,7 @@ func parseMalHTTPConfig(cmd *cobra.Command) MalHTTPConfig { } ignoreCache, _ := cmd.Flags().GetBool("ignore-cache") insecure, _ := cmd.Flags().GetBool("insecure") - return MalHTTPConfig{ + return m.MalHTTPConfig{ IgnoreCache: ignoreCache, ProxyURL: proxyURL, Timeout: timeout, @@ -55,7 +47,7 @@ func parseMalHTTPConfig(cmd *cobra.Command) MalHTTPConfig { func MalCmd(cmd *cobra.Command, con *repl.Console) error { malHttpConfig := parseMalHTTPConfig(cmd) //malIndex, _ := DefaultMalIndexParser(malHttpConfig) - malsJson, err := parserMalYaml(malHttpConfig) + malsJson, err := m.ParserMalYaml(m.DefaultMalRepoURL, filepath.Join(assets.GetConfigDir(), m.MalIndexFileName), malHttpConfig) if err != nil { return err } @@ -70,7 +62,7 @@ func MalCmd(cmd *cobra.Command, con *repl.Console) error { return nil } -func printMals(maljson MalsYaml, malHttpConfig MalHTTPConfig, con *repl.Console) error { +func printMals(maljson m.MalsYaml, malHttpConfig m.MalHTTPConfig, con *repl.Console) error { var rowEntries []table.Row var row table.Row @@ -95,7 +87,7 @@ func printMals(maljson MalsYaml, malHttpConfig MalHTTPConfig, con *repl.Console) tableModel.SetMultiline() tableModel.SetRows(rowEntries) tableModel.SetHandle(func() { - installMal(tableModel, newTable.Buffer, malHttpConfig, con) + InstallMal(tableModel, newTable.Buffer, malHttpConfig, con) }) err := newTable.Run() if err != nil { @@ -105,7 +97,7 @@ func printMals(maljson MalsYaml, malHttpConfig MalHTTPConfig, con *repl.Console) return nil } -func installMal(tableModel *tui.TableModel, writer io.Writer, malHttpConfig MalHTTPConfig, con *repl.Console) func() { +func InstallMal(tableModel *tui.TableModel, writer io.Writer, malHttpConfig m.MalHTTPConfig, con *repl.Console) func() { selectRow := tableModel.GetHighlightedRow() if selectRow.Data == nil { return func() { @@ -114,8 +106,12 @@ func installMal(tableModel *tui.TableModel, writer io.Writer, malHttpConfig MalH } } logs.Log.Infof("Installing mal: %s", selectRow.Data["Name"].(string)) - err := GithubMalPackageParser(selectRow.Data["Repo_url"].(string), selectRow.Data["Name"].(string), - selectRow.Data["Version"].(string), malHttpConfig) + err := m.GithubMalPackageParser( + selectRow.Data["Repo_url"].(string), + selectRow.Data["Name"].(string), + selectRow.Data["Version"].(string), + assets.GetMalsDir(), + malHttpConfig) if err != nil { return func() { con.Log.FErrorf(writer, "Error installing mal: %s\n", err) diff --git a/client/command/mal/parser.go b/client/command/mal/parser.go deleted file mode 100644 index 582ca7df..00000000 --- a/client/command/mal/parser.go +++ /dev/null @@ -1,227 +0,0 @@ -package mal - -import ( - "crypto/tls" - "encoding/json" - "errors" - "fmt" - "github.com/chainreactors/malice-network/client/assets" - "github.com/chainreactors/malice-network/helper/cryptography/minisign" - "gopkg.in/yaml.v3" - "io/ioutil" - "net" - "net/http" - "net/url" - "os" - "path" - "path/filepath" - "strings" - "time" -) - -const ( - malIndexFileName = "mals.yaml" - malIndexSigFileName = "mal.minisig" -) - -type MalsYaml struct { - Mals []assets.MalConfig `yaml:"mals"` -} - -// GitHub API Parsers for Mal - -type GithubAsset struct { - ID int `json:"id"` - Name string `json:"name"` - URL string `json:"url"` - Size int `json:"size"` - BrowserDownloadURL string `json:"browser_download_url"` -} - -type GithubRelease struct { - ID int `json:"id"` - Name string `json:"name"` - URL string `json:"url"` - HTMLURL string `json:"html_url"` - TagName string `json:"tag_name"` - Body string `json:"body"` - Prerelease bool `json:"prerelease"` - TarballURL string `json:"tarball_url"` - ZipballURL string `json:"zipball_url"` - CreatedAt string `json:"created_at"` - PublishedAt string `json:"published_at"` - Assets []GithubAsset `json:"assets"` -} - -func httpClient(config MalHTTPConfig) *http.Client { - return &http.Client{ - Timeout: config.Timeout, - Transport: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: config.Timeout, - }).Dial, - IdleConnTimeout: time.Millisecond, - Proxy: http.ProxyURL(config.ProxyURL), - TLSHandshakeTimeout: config.Timeout, - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: config.DisableTLSValidation, - }, - }, - } -} - -func httpRequest(clientConfig MalHTTPConfig, reqURL string, extraHeaders http.Header) (*http.Response, []byte, error) { - client := httpClient(clientConfig) - req, err := http.NewRequest(http.MethodGet, reqURL, http.NoBody) - if err != nil { - return nil, nil, err - } - - if len(extraHeaders) > 0 { - for key := range extraHeaders { - req.Header.Add(key, strings.Join(extraHeaders[key], ",")) - } - } - resp, err := client.Do(req) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - - body, err := ioutil.ReadAll(resp.Body) - return resp, body, err -} - -func downloadRequest(clientConfig MalHTTPConfig, reqURL string) ([]byte, error) { - downloadHdr := http.Header{ - "Accept": {"application/octet-stream"}, - } - resp, body, err := httpRequest(clientConfig, reqURL, downloadHdr) - if resp == nil { - return nil, err - } - if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusFound { - return nil, fmt.Errorf("Error downloading asset: http %d", resp.StatusCode) - } - - return body, err -} - -func parsePkgMinsig(data []byte) (*minisign.Signature, error) { - var sig minisign.Signature - err := sig.UnmarshalText(data) - if err != nil { - return nil, err - } - if len(sig.TrustedComment) < 1 { - return nil, errors.New("missing trusted comment") - } - return &sig, nil -} - -// Intercepts 302 redirect to determine the latest version tag -func githubTagParser(repoUrl string, version string, clientConfig MalHTTPConfig) (string, error) { - client := httpClient(clientConfig) - client.CheckRedirect = func(req *http.Request, via []*http.Request) error { - return http.ErrUseLastResponse - } - latestURL, err := url.Parse(repoUrl) - if err != nil { - return "", fmt.Errorf("failed to parse mal pkg url '%s': %s", repoUrl, err) - } - latestURL.Path = path.Join(latestURL.Path, "releases", version) - latestRedirect, err := client.Get(latestURL.String()) - if err != nil { - return "", fmt.Errorf("http get failed mal pkg url '%s': %s", repoUrl, err) - } - defer latestRedirect.Body.Close() - if latestRedirect.StatusCode != http.StatusFound && latestRedirect.StatusCode != http.StatusOK { - return "", fmt.Errorf("unexpected response status (wanted 302) '%s': %s", repoUrl, latestRedirect.Status) - } - if latestRedirect.Header.Get("Location") == "" { - return "", fmt.Errorf("no location header in response '%s'", repoUrl) - } - latestLocationURL, err := url.Parse(latestRedirect.Header.Get("Location")) - if err != nil { - return "", fmt.Errorf("failed to parse location header '%s'->'%s': %s", - repoUrl, latestRedirect.Header.Get("Location"), err) - } - pathSegments := strings.Split(latestLocationURL.Path, "/") - for index, segment := range pathSegments { - if segment == "tag" && index+1 < len(pathSegments) { - return pathSegments[index+1], nil - } - } - return "", errors.New("tag not found in location header") -} - -func parserMalYaml(clientConfig MalHTTPConfig) (MalsYaml, error) { - var malData MalsYaml - resp, body, err := httpRequest(clientConfig, assets.DefaultMalRepoURL, http.Header{}) - if err != nil { - return malData, err - } - if resp.StatusCode != http.StatusOK { - if resp.StatusCode == http.StatusForbidden { - return malData, errors.New("GitHub API rate limit reached (60 req/hr), try again later") - } - return malData, errors.New(fmt.Sprintf("API returned non-200 status code: %d", resp.StatusCode)) - } - - releases := []GithubRelease{} - err = json.Unmarshal(body, &releases) - if err != nil { - return malData, err - } - release := releases[0] - - var malsYaml []byte - for _, asset := range release.Assets { - if asset.Name == malIndexFileName { - malsYaml, err = downloadRequest(clientConfig, asset.URL) - if err != nil { - break - } - } - } - - err = yaml.Unmarshal(malsYaml, &malData) - if err != nil { - return malData, err - } - - fileData, err := yaml.Marshal(&malData) - if err != nil { - return malData, fmt.Errorf("failed to marshal malData to YAML: %v", err) - } - - filePath := filepath.Join(assets.GetConfigDir(), malIndexFileName) - err = os.WriteFile(filePath, fileData, 0644) - if err != nil { - return malData, fmt.Errorf("failed to write YAML data to file: %v", err) - } - - return malData, nil - -} - -// GithubMalPackageParser - Uses github.com instead of api.github.com to download packages -func GithubMalPackageParser(repoURL string, pkgName string, version string, clientConfig MalHTTPConfig) error { - var tarGz []byte - - tarGzURL, err := url.Parse(repoURL) - if err != nil { - return fmt.Errorf("failed to parse mal pkg url '%s': %s", repoURL, err) - } - tarGzURL.Path = path.Join(tarGzURL.Path, "releases", "download", version, fmt.Sprintf("%s.tar.gz", pkgName)) - tarGz, err = downloadRequest(clientConfig, tarGzURL.String()) - if err != nil { - return err - } - - err = os.WriteFile(filepath.Join(assets.GetMalsDir(), fmt.Sprintf("%s.tar.gz", pkgName)), tarGz, 0644) - if err != nil { - return err - } - return nil -} diff --git a/client/command/mal/remove.go b/client/command/mal/remove.go index ec18d411..e5c097b0 100644 --- a/client/command/mal/remove.go +++ b/client/command/mal/remove.go @@ -38,7 +38,7 @@ func RemoveMal(name string, con *repl.Console) error { return errors.New("command name is required") } if plug, ok := loadedMals[name]; !ok { - return errors.New("extension not loaded") + return errors.New("mal not loaded") } else { implantMenu := con.ImplantMenu() for _, cmd := range plug.CMDs { diff --git a/go.mod b/go.mod index 3d72125f..73a8e14d 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( filippo.io/age v1.1.1 github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 - github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05 + github.com/chainreactors/mals v0.0.0-20250120080617-bb7c638c6f78 github.com/chainreactors/tui v0.0.0-20250117083346-8eff1b67016e github.com/chainreactors/utils v0.0.0-20241209140746-65867d2f78b2 github.com/charmbracelet/bubbletea v0.27.1 @@ -138,9 +138,9 @@ require ( ) replace ( - //github.com/docker/distribution => github.com/docker/distribution v2.6.2+incompatible github.com/reeflective/console => ./external/console github.com/reeflective/readline => ./external/readline github.com/rsteube/carapace => ./external/carapace github.com/wabzsy/gonut => ./external/gonut +//github.com/chainreactors/mals => ./external/mals ) diff --git a/go.sum b/go.sum index 8a16257e..bdefdbc1 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,8 @@ github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261 h1:gcRLCAF4ANvl github.com/chainreactors/logs v0.0.0-20241115105204-6132e39f5261/go.mod h1:6Mv6W70JrtL6VClulZhmMRZnoYpcTahcDTKLMNEjK0o= github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05 h1:E8352+uYbWT3ycyI1LJ8UAtT30XZtVwC8Ubjg4dTOzA= github.com/chainreactors/mals v0.0.0-20250114113936-83ce11c2ca05/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= +github.com/chainreactors/mals v0.0.0-20250120080617-bb7c638c6f78 h1:osERTPXp4L6+2Syusz8VZLg7Fr853G8IxG/jxKEOFPY= +github.com/chainreactors/mals v0.0.0-20250120080617-bb7c638c6f78/go.mod h1:r/dAAqtQJZTo47CgWtdDvpSjPQHg881rcwBY2p9BEOY= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4 h1:TbIyZG5p55WfskSXt5Te4oibuXhWbrQ94+CB5hC9D7U= github.com/chainreactors/tui v0.0.0-20241231072248-d5b3664065c4/go.mod h1:+J5acoMNk5wLy6hhBYQMAchOS11wIhoEU9cVDV629eo= github.com/chainreactors/tui v0.0.0-20250117081300-8a86f2afd450 h1:uEigV9P9wj35jdaLoFk/bwpwYNMwdrv9GLsgvKoiT+0= From 16411f89c2f46b250a6692cc7f1a3325504cd4ab Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 20 Jan 2025 16:16:37 +0800 Subject: [PATCH 39/40] fix: lua: add cmd reserve check --- client/core/plugin/lua.go | 11 +++++------ client/core/plugin/mal.go | 16 ---------------- client/core/plugin/plugin.go | 11 +++++++++++ 3 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 client/core/plugin/mal.go diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index 5629b3a3..3afe7326 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -30,9 +30,8 @@ import ( var ( ReservedARGS = "args" ReservedCMDLINE = "cmdline" - ReservedWords = []string{ReservedCMDLINE, ReservedARGS} - - LuaPackages = map[string]*lua.LTable{} + ReservedCMD = "cmd" + ReservedWords = []string{ReservedCMDLINE, ReservedARGS, ReservedCMD} ProtoPackage = []string{"implantpb", "clientpb", "modulepb"} GlobalPlugins []*DefaultPlugin @@ -354,11 +353,11 @@ func (plug *LuaPlugin) RegisterLuaBuiltin(vm *lua.LState) error { for _, paramName := range paramNames { switch paramName { - case "cmdline": + case ReservedCMDLINE: wrapper.Push(lua.LString(shellquote.Join(args...))) - case "args": + case ReservedARGS: wrapper.Push(mals.ConvertGoValueToLua(wrapper.LState, args)) - case "cmd": + case ReservedCMD: wrapper.Push(mals.ConvertGoValueToLua(wrapper.LState, cmd)) default: val, err := cmd.Flags().GetString(paramName) diff --git a/client/core/plugin/mal.go b/client/core/plugin/mal.go deleted file mode 100644 index 0e7b26b5..00000000 --- a/client/core/plugin/mal.go +++ /dev/null @@ -1,16 +0,0 @@ -package plugin - -var ( - MalType = "lua" -) - -type MalManiFest struct { - Name string `json:"name" yaml:"name"` - Type string `json:"type" yaml:"type"` // lua, tcl - Author string `json:"author" yaml:"author"` - Version string `json:"version" yaml:"version"` - EntryFile string `json:"entry" yaml:"entry"` - Lib bool `json:"lib" yaml:"lib"` - DependModule []string `json:"depend_module" yaml:"depend_modules"` - DependArmory []string `json:"depend_armory" yaml:"depend_armory"` -} diff --git a/client/core/plugin/plugin.go b/client/core/plugin/plugin.go index 3051d3c5..1390c749 100644 --- a/client/core/plugin/plugin.go +++ b/client/core/plugin/plugin.go @@ -15,6 +15,17 @@ const ( GoPlugin = "go" ) +type MalManiFest struct { + Name string `json:"name" yaml:"name"` + Type string `json:"type" yaml:"type"` // lua, tcl + Author string `json:"author" yaml:"author"` + Version string `json:"version" yaml:"version"` + EntryFile string `json:"entry" yaml:"entry"` + Lib bool `json:"lib" yaml:"lib"` + DependModule []string `json:"depend_module" yaml:"depend_modules"` + DependArmory []string `json:"depend_armory" yaml:"depend_armory"` +} + type Plugin interface { Run() error Manifest() *MalManiFest From 584b1be735f9ce69c88393473c62ec50471e289b Mon Sep 17 00:00:00 2001 From: M09Ic Date: Mon, 20 Jan 2025 18:17:48 +0800 Subject: [PATCH 40/40] feat: lua `command` func return cmd and support cmd reserved word --- client/core/plugin/lua.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/core/plugin/lua.go b/client/core/plugin/lua.go index 3afe7326..da979c3a 100644 --- a/client/core/plugin/lua.go +++ b/client/core/plugin/lua.go @@ -328,10 +328,9 @@ func (plug *LuaPlugin) RegisterLuaBuiltin(vm *lua.LState) error { var paramNames []string for _, param := range fn.Proto.DbgLocals { - if !strings.HasPrefix(param.Name, "flag_") && param.Name != "args" { - continue + if strings.HasPrefix(param.Name, "flag_") || slices.Contains(ReservedWords, param.Name) { + paramNames = append(paramNames, param.Name) } - paramNames = append(paramNames, param.Name) } // 创建新的 Cobra 命令