diff --git a/implants/Cargo.toml b/implants/Cargo.toml index e2a471023..bb8097644 100644 --- a/implants/Cargo.toml +++ b/implants/Cargo.toml @@ -47,6 +47,8 @@ network-interface = "1.0.1" nix = "0.26.1" notify = "6.1.1" object = "0.31.1" +openssl = "0.10.55" +os_info = "3.10.0" pnet = "0.34.0" portable-pty = "0.8.1" predicates = { version = "2.1", default-features = false } diff --git a/implants/imix/Cargo.toml b/implants/imix/Cargo.toml index 0dba83ba5..4b383d0e9 100644 --- a/implants/imix/Cargo.toml +++ b/implants/imix/Cargo.toml @@ -20,10 +20,11 @@ anyhow = { workspace = true } clap = { workspace = true } netdev = { workspace = true } log = { workspace = true } +os_info = { workspace = true } +pretty_env_logger = { workspace = true } tokio = { workspace = true, features = ["full"] } uuid = { workspace = true, features = ["v4", "fast-rng"] } whoami = { workspace = true } -pretty_env_logger = { workspace = true } [target.'cfg(target_os = "windows")'.dependencies] diff --git a/implants/imix/src/config.rs b/implants/imix/src/config.rs index 82d5c9771..e41bda79a 100644 --- a/implants/imix/src/config.rs +++ b/implants/imix/src/config.rs @@ -1,4 +1,5 @@ use crate::version::VERSION; +use os_info::{self, Version}; use pb::c2::host::Platform; use uuid::Uuid; @@ -79,6 +80,7 @@ impl Default for Config { name: whoami::fallible::hostname().unwrap_or(String::from("")), identifier: host_unique::get_id_with_selectors(selectors).to_string(), platform: get_host_platform() as i32, + version: get_system_version(), primary_ip: get_primary_ip(), }; @@ -223,3 +225,21 @@ fn get_primary_ip() -> String { } } } + +fn get_system_version() -> String { + let info = os_info::get(); + let version = match info.version() { + Version::Unknown => "Unknown".to_string(), + Version::Semantic(a, b, c) => format!("{}.{}.{}", a, b, c), + Version::Rolling(Some(val)) => val.to_string(), + Version::Rolling(None) => "Unknown".to_string(), + Version::Custom(val) => val.to_string(), + }; + match get_host_platform() { + Platform::Linux => format!("{} {}", info.os_type(), version), + Platform::Macos => version, + Platform::Bsd => format!("{} {}", info.os_type(), version), + Platform::Windows => version, + Platform::Unspecified => format!("{} {}", info.os_type(), version), + } +} diff --git a/implants/lib/pb/src/generated/c2.rs b/implants/lib/pb/src/generated/c2.rs index c388d9b63..cb729bfae 100644 --- a/implants/lib/pb/src/generated/c2.rs +++ b/implants/lib/pb/src/generated/c2.rs @@ -34,6 +34,8 @@ pub struct Host { pub platform: i32, #[prost(string, tag = "4")] pub primary_ip: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub version: ::prost::alloc::string::String, } /// Nested message and enum types in `Host`. pub mod host { diff --git a/tavern/internal/c2/api_claim_tasks.go b/tavern/internal/c2/api_claim_tasks.go index 4537ba386..b9881a7bc 100644 --- a/tavern/internal/c2/api_claim_tasks.go +++ b/tavern/internal/c2/api_claim_tasks.go @@ -97,6 +97,7 @@ func (srv *Server) ClaimTasks(ctx context.Context, req *c2pb.ClaimTasksRequest) SetIdentifier(req.Beacon.Host.Identifier). SetName(req.Beacon.Host.Name). SetPlatform(req.Beacon.Host.Platform). + SetVersion(req.Beacon.Host.Version). SetPrimaryIP(req.Beacon.Host.PrimaryIp). SetExternalIP(clientIP). SetLastSeenAt(now). diff --git a/tavern/internal/c2/api_claim_tasks_test.go b/tavern/internal/c2/api_claim_tasks_test.go index 59adf6c1d..86613703c 100644 --- a/tavern/internal/c2/api_claim_tasks_test.go +++ b/tavern/internal/c2/api_claim_tasks_test.go @@ -54,6 +54,7 @@ func TestClaimTasks(t *testing.T) { Identifier: "test-host", Name: "host-for-test", Platform: c2pb.Host_PLATFORM_LINUX, + Version: "40.0.0", PrimaryIp: "127.0.0.1", }, Interval: uint64(60), @@ -79,6 +80,7 @@ func TestClaimTasks(t *testing.T) { Identifier: "test-host", Name: "host-for-test", Platform: c2pb.Host_PLATFORM_LINUX, + Version: "40.0.0", PrimaryIp: "127.0.0.1", }, Interval: uint64(100), @@ -104,6 +106,7 @@ func TestClaimTasks(t *testing.T) { Identifier: "test-host", Name: "host-for-test", Platform: c2pb.Host_PLATFORM_LINUX, + Version: "40.0.0", PrimaryIp: "127.0.0.1", }, Interval: uint64(100), diff --git a/tavern/internal/c2/c2pb/c2.pb.go b/tavern/internal/c2/c2pb/c2.pb.go index 80f17afb2..eed56eddf 100644 --- a/tavern/internal/c2/c2pb/c2.pb.go +++ b/tavern/internal/c2/c2pb/c2.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.36.6 // protoc v3.21.12 // source: c2.proto @@ -13,6 +13,7 @@ import ( epb "realm.pub/tavern/internal/c2/epb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -128,20 +129,17 @@ func (Host_Platform) EnumDescriptor() ([]byte, []int) { // Agent information to identify the type of beacon. type Agent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` unknownFields protoimpl.UnknownFields - - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Agent) Reset() { *x = Agent{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent) String() string { @@ -152,7 +150,7 @@ func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,24 +174,21 @@ func (x *Agent) GetIdentifier() string { // Beacon information that is unique to the current running beacon. type Beacon struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Principal string `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` + Host *Host `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` + Agent *Agent `protobuf:"bytes,4,opt,name=agent,proto3" json:"agent,omitempty"` + Interval uint64 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval,omitempty"` // Duration until next callback, in seconds. unknownFields protoimpl.UnknownFields - - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - Principal string `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` - Host *Host `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` - Agent *Agent `protobuf:"bytes,4,opt,name=agent,proto3" json:"agent,omitempty"` - Interval uint64 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval,omitempty"` // Duration until next callback, in seconds. + sizeCache protoimpl.SizeCache } func (x *Beacon) Reset() { *x = Beacon{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Beacon) String() string { @@ -204,7 +199,7 @@ func (*Beacon) ProtoMessage() {} func (x *Beacon) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,23 +251,21 @@ func (x *Beacon) GetInterval() uint64 { // Host information for the system a beacon is running on. type Host struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Platform Host_Platform `protobuf:"varint,3,opt,name=platform,proto3,enum=c2.Host_Platform" json:"platform,omitempty"` + PrimaryIp string `protobuf:"bytes,4,opt,name=primary_ip,json=primaryIp,proto3" json:"primary_ip,omitempty"` + Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` unknownFields protoimpl.UnknownFields - - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Platform Host_Platform `protobuf:"varint,3,opt,name=platform,proto3,enum=c2.Host_Platform" json:"platform,omitempty"` - PrimaryIp string `protobuf:"bytes,4,opt,name=primary_ip,json=primaryIp,proto3" json:"primary_ip,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Host) Reset() { *x = Host{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Host) String() string { @@ -283,7 +276,7 @@ func (*Host) ProtoMessage() {} func (x *Host) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,24 +319,28 @@ func (x *Host) GetPrimaryIp() string { return "" } +func (x *Host) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + // Task instructions for the beacon to execute. type Task struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Tome *epb.Tome `protobuf:"bytes,2,opt,name=tome,proto3" json:"tome,omitempty"` + QuestName string `protobuf:"bytes,3,opt,name=quest_name,json=questName,proto3" json:"quest_name,omitempty"` unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Tome *epb.Tome `protobuf:"bytes,2,opt,name=tome,proto3" json:"tome,omitempty"` - QuestName string `protobuf:"bytes,3,opt,name=quest_name,json=questName,proto3" json:"quest_name,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -354,7 +351,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,20 +389,17 @@ func (x *Task) GetQuestName() string { // TaskError provides information when task execution fails. type TaskError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` unknownFields protoimpl.UnknownFields - - Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TaskError) Reset() { *x = TaskError{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskError) String() string { @@ -416,7 +410,7 @@ func (*TaskError) ProtoMessage() {} func (x *TaskError) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,26 +434,23 @@ func (x *TaskError) GetMsg() string { // TaskOutput provides information about a running task. type TaskOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` - Error *TaskError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + Error *TaskError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // Indicates the UTC timestamp task execution began, set only in the first message for reporting. ExecStartedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=exec_started_at,json=execStartedAt,proto3" json:"exec_started_at,omitempty"` // Indicates the UTC timestamp task execution completed, set only in last message for reporting. ExecFinishedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=exec_finished_at,json=execFinishedAt,proto3" json:"exec_finished_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskOutput) Reset() { *x = TaskOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskOutput) String() string { @@ -470,7 +461,7 @@ func (*TaskOutput) ProtoMessage() {} func (x *TaskOutput) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,20 +513,17 @@ func (x *TaskOutput) GetExecFinishedAt() *timestamppb.Timestamp { // RPC Messages type ClaimTasksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Beacon *Beacon `protobuf:"bytes,1,opt,name=beacon,proto3" json:"beacon,omitempty"` unknownFields protoimpl.UnknownFields - - Beacon *Beacon `protobuf:"bytes,1,opt,name=beacon,proto3" json:"beacon,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClaimTasksRequest) Reset() { *x = ClaimTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClaimTasksRequest) String() string { @@ -546,7 +534,7 @@ func (*ClaimTasksRequest) ProtoMessage() {} func (x *ClaimTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,20 +557,17 @@ func (x *ClaimTasksRequest) GetBeacon() *Beacon { } type ClaimTasksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` unknownFields protoimpl.UnknownFields - - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClaimTasksResponse) Reset() { *x = ClaimTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClaimTasksResponse) String() string { @@ -593,7 +578,7 @@ func (*ClaimTasksResponse) ProtoMessage() {} func (x *ClaimTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,20 +601,17 @@ func (x *ClaimTasksResponse) GetTasks() []*Task { } type FetchAssetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FetchAssetRequest) Reset() { *x = FetchAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchAssetRequest) String() string { @@ -640,7 +622,7 @@ func (*FetchAssetRequest) ProtoMessage() {} func (x *FetchAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,20 +645,17 @@ func (x *FetchAssetRequest) GetName() string { } type FetchAssetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FetchAssetResponse) Reset() { *x = FetchAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchAssetResponse) String() string { @@ -687,7 +666,7 @@ func (*FetchAssetResponse) ProtoMessage() {} func (x *FetchAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -710,21 +689,18 @@ func (x *FetchAssetResponse) GetChunk() []byte { } type ReportCredentialRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Credential *epb.Credential `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` unknownFields protoimpl.UnknownFields - - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Credential *epb.Credential `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReportCredentialRequest) Reset() { *x = ReportCredentialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportCredentialRequest) String() string { @@ -735,7 +711,7 @@ func (*ReportCredentialRequest) ProtoMessage() {} func (x *ReportCredentialRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,18 +741,16 @@ func (x *ReportCredentialRequest) GetCredential() *epb.Credential { } type ReportCredentialResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportCredentialResponse) Reset() { *x = ReportCredentialResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportCredentialResponse) String() string { @@ -787,7 +761,7 @@ func (*ReportCredentialResponse) ProtoMessage() {} func (x *ReportCredentialResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,21 +777,18 @@ func (*ReportCredentialResponse) Descriptor() ([]byte, []int) { } type ReportFileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Chunk *epb.File `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Chunk *epb.File `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReportFileRequest) Reset() { *x = ReportFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportFileRequest) String() string { @@ -828,7 +799,7 @@ func (*ReportFileRequest) ProtoMessage() {} func (x *ReportFileRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -858,18 +829,16 @@ func (x *ReportFileRequest) GetChunk() *epb.File { } type ReportFileResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportFileResponse) Reset() { *x = ReportFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportFileResponse) String() string { @@ -880,7 +849,7 @@ func (*ReportFileResponse) ProtoMessage() {} func (x *ReportFileResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,21 +865,18 @@ func (*ReportFileResponse) Descriptor() ([]byte, []int) { } type ReportProcessListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + List *epb.ProcessList `protobuf:"bytes,2,opt,name=list,proto3" json:"list,omitempty"` unknownFields protoimpl.UnknownFields - - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - List *epb.ProcessList `protobuf:"bytes,2,opt,name=list,proto3" json:"list,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReportProcessListRequest) Reset() { *x = ReportProcessListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportProcessListRequest) String() string { @@ -921,7 +887,7 @@ func (*ReportProcessListRequest) ProtoMessage() {} func (x *ReportProcessListRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,18 +917,16 @@ func (x *ReportProcessListRequest) GetList() *epb.ProcessList { } type ReportProcessListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportProcessListResponse) Reset() { *x = ReportProcessListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportProcessListResponse) String() string { @@ -973,7 +937,7 @@ func (*ReportProcessListResponse) ProtoMessage() {} func (x *ReportProcessListResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,20 +953,17 @@ func (*ReportProcessListResponse) Descriptor() ([]byte, []int) { } type ReportTaskOutputRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Output *TaskOutput `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` unknownFields protoimpl.UnknownFields - - Output *TaskOutput `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReportTaskOutputRequest) Reset() { *x = ReportTaskOutputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskOutputRequest) String() string { @@ -1013,7 +974,7 @@ func (*ReportTaskOutputRequest) ProtoMessage() {} func (x *ReportTaskOutputRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1036,18 +997,16 @@ func (x *ReportTaskOutputRequest) GetOutput() *TaskOutput { } type ReportTaskOutputResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportTaskOutputResponse) Reset() { *x = ReportTaskOutputResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskOutputResponse) String() string { @@ -1058,7 +1017,7 @@ func (*ReportTaskOutputResponse) ProtoMessage() {} func (x *ReportTaskOutputResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,22 +1033,19 @@ func (*ReportTaskOutputResponse) Descriptor() ([]byte, []int) { } type ReverseShellRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Kind ReverseShellMessageKind `protobuf:"varint,1,opt,name=kind,proto3,enum=c2.ReverseShellMessageKind" json:"kind,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + TaskId int64 `protobuf:"varint,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` unknownFields protoimpl.UnknownFields - - Kind ReverseShellMessageKind `protobuf:"varint,1,opt,name=kind,proto3,enum=c2.ReverseShellMessageKind" json:"kind,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - TaskId int64 `protobuf:"varint,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReverseShellRequest) Reset() { *x = ReverseShellRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReverseShellRequest) String() string { @@ -1100,7 +1056,7 @@ func (*ReverseShellRequest) ProtoMessage() {} func (x *ReverseShellRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1137,21 +1093,18 @@ func (x *ReverseShellRequest) GetTaskId() int64 { } type ReverseShellResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Kind ReverseShellMessageKind `protobuf:"varint,1,opt,name=kind,proto3,enum=c2.ReverseShellMessageKind" json:"kind,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields - - Kind ReverseShellMessageKind `protobuf:"varint,1,opt,name=kind,proto3,enum=c2.ReverseShellMessageKind" json:"kind,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReverseShellResponse) Reset() { *x = ReverseShellResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReverseShellResponse) String() string { @@ -1162,7 +1115,7 @@ func (*ReverseShellResponse) ProtoMessage() {} func (x *ReverseShellResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,177 +1146,114 @@ func (x *ReverseShellResponse) GetData() []byte { var File_c2_proto protoreflect.FileDescriptor -var file_c2_proto_rawDesc = []byte{ - 0x0a, 0x08, 0x63, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x63, 0x32, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x0e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x27, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x06, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, - 0x6c, 0x12, 0x1c, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x63, 0x32, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, - 0x2e, 0x63, 0x32, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xfe, 0x01, 0x0a, - 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x63, 0x32, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, - 0x69, 0x6d, 0x61, 0x72, 0x79, 0x49, 0x70, 0x22, 0x74, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, - 0x10, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, - 0x53, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, - 0x4c, 0x49, 0x4e, 0x55, 0x58, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4c, 0x41, 0x54, 0x46, - 0x4f, 0x52, 0x4d, 0x5f, 0x4d, 0x41, 0x43, 0x4f, 0x53, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x50, - 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x42, 0x53, 0x44, 0x10, 0x04, 0x22, 0x59, 0x0a, - 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x6f, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x54, - 0x6f, 0x6d, 0x65, 0x52, 0x04, 0x74, 0x6f, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xe3, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x23, - 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x44, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x5f, - 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x65, - 0x78, 0x65, 0x63, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0x37, 0x0a, - 0x11, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x52, 0x06, - 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x12, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, - 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x63, 0x32, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x27, 0x0a, 0x11, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, - 0x6b, 0x22, 0x68, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x64, 0x72, - 0x69, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, - 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x14, 0x0a, 0x12, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x5e, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, - 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, - 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x32, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x0a, - 0x13, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, - 0x68, 0x65, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, - 0x49, 0x64, 0x22, 0x5b, 0x0a, 0x14, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, - 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, - 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, - 0x8f, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, 0x6c, 0x6c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x26, 0x52, - 0x45, 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x53, 0x48, 0x45, 0x4c, 0x4c, 0x5f, 0x4d, 0x45, 0x53, - 0x53, 0x41, 0x47, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x56, 0x45, 0x52, - 0x53, 0x45, 0x5f, 0x53, 0x48, 0x45, 0x4c, 0x4c, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, - 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, - 0x52, 0x45, 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x53, 0x48, 0x45, 0x4c, 0x4c, 0x5f, 0x4d, 0x45, - 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x49, 0x4e, 0x47, 0x10, - 0x02, 0x32, 0xfc, 0x03, 0x0a, 0x02, 0x43, 0x32, 0x12, 0x3d, 0x0a, 0x0a, 0x43, 0x6c, 0x61, 0x69, - 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x15, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, 0x69, - 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x63, 0x32, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x63, 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, - 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x1b, 0x2e, 0x63, 0x32, 0x2e, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, - 0x69, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x32, 0x2e, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x28, 0x01, 0x12, 0x50, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x63, 0x32, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x32, 0x2e, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x12, 0x17, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, - 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x42, 0x23, 0x5a, 0x21, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x2e, 0x70, 0x75, 0x62, 0x2f, 0x74, 0x61, - 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x32, - 0x2f, 0x63, 0x32, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_c2_proto_rawDesc = "" + + "\n" + + "\bc2.proto\x12\x02c2\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x0eeldritch.proto\"'\n" + + "\x05Agent\x12\x1e\n" + + "\n" + + "identifier\x18\x01 \x01(\tR\n" + + "identifier\"\xa1\x01\n" + + "\x06Beacon\x12\x1e\n" + + "\n" + + "identifier\x18\x01 \x01(\tR\n" + + "identifier\x12\x1c\n" + + "\tprincipal\x18\x02 \x01(\tR\tprincipal\x12\x1c\n" + + "\x04host\x18\x03 \x01(\v2\b.c2.HostR\x04host\x12\x1f\n" + + "\x05agent\x18\x04 \x01(\v2\t.c2.AgentR\x05agent\x12\x1a\n" + + "\binterval\x18\x05 \x01(\x04R\binterval\"\x98\x02\n" + + "\x04Host\x12\x1e\n" + + "\n" + + "identifier\x18\x01 \x01(\tR\n" + + "identifier\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12-\n" + + "\bplatform\x18\x03 \x01(\x0e2\x11.c2.Host.PlatformR\bplatform\x12\x1d\n" + + "\n" + + "primary_ip\x18\x04 \x01(\tR\tprimaryIp\x12\x18\n" + + "\aversion\x18\x05 \x01(\tR\aversion\"t\n" + + "\bPlatform\x12\x18\n" + + "\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x14\n" + + "\x10PLATFORM_WINDOWS\x10\x01\x12\x12\n" + + "\x0ePLATFORM_LINUX\x10\x02\x12\x12\n" + + "\x0ePLATFORM_MACOS\x10\x03\x12\x10\n" + + "\fPLATFORM_BSD\x10\x04\"Y\n" + + "\x04Task\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\"\n" + + "\x04tome\x18\x02 \x01(\v2\x0e.eldritch.TomeR\x04tome\x12\x1d\n" + + "\n" + + "quest_name\x18\x03 \x01(\tR\tquestName\"\x1d\n" + + "\tTaskError\x12\x10\n" + + "\x03msg\x18\x01 \x01(\tR\x03msg\"\xe3\x01\n" + + "\n" + + "TaskOutput\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" + + "\x06output\x18\x02 \x01(\tR\x06output\x12#\n" + + "\x05error\x18\x03 \x01(\v2\r.c2.TaskErrorR\x05error\x12B\n" + + "\x0fexec_started_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\rexecStartedAt\x12D\n" + + "\x10exec_finished_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x0eexecFinishedAt\"7\n" + + "\x11ClaimTasksRequest\x12\"\n" + + "\x06beacon\x18\x01 \x01(\v2\n" + + ".c2.BeaconR\x06beacon\"4\n" + + "\x12ClaimTasksResponse\x12\x1e\n" + + "\x05tasks\x18\x01 \x03(\v2\b.c2.TaskR\x05tasks\"'\n" + + "\x11FetchAssetRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"*\n" + + "\x12FetchAssetResponse\x12\x14\n" + + "\x05chunk\x18\x01 \x01(\fR\x05chunk\"h\n" + + "\x17ReportCredentialRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x124\n" + + "\n" + + "credential\x18\x02 \x01(\v2\x14.eldritch.CredentialR\n" + + "credential\"\x1a\n" + + "\x18ReportCredentialResponse\"R\n" + + "\x11ReportFileRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12$\n" + + "\x05chunk\x18\x02 \x01(\v2\x0e.eldritch.FileR\x05chunk\"\x14\n" + + "\x12ReportFileResponse\"^\n" + + "\x18ReportProcessListRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12)\n" + + "\x04list\x18\x02 \x01(\v2\x15.eldritch.ProcessListR\x04list\"\x1b\n" + + "\x19ReportProcessListResponse\"A\n" + + "\x17ReportTaskOutputRequest\x12&\n" + + "\x06output\x18\x01 \x01(\v2\x0e.c2.TaskOutputR\x06output\"\x1a\n" + + "\x18ReportTaskOutputResponse\"s\n" + + "\x13ReverseShellRequest\x12/\n" + + "\x04kind\x18\x01 \x01(\x0e2\x1b.c2.ReverseShellMessageKindR\x04kind\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x12\x17\n" + + "\atask_id\x18\x03 \x01(\x03R\x06taskId\"[\n" + + "\x14ReverseShellResponse\x12/\n" + + "\x04kind\x18\x01 \x01(\x0e2\x1b.c2.ReverseShellMessageKindR\x04kind\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data*\x8f\x01\n" + + "\x17ReverseShellMessageKind\x12*\n" + + "&REVERSE_SHELL_MESSAGE_KIND_UNSPECIFIED\x10\x00\x12#\n" + + "\x1fREVERSE_SHELL_MESSAGE_KIND_DATA\x10\x01\x12#\n" + + "\x1fREVERSE_SHELL_MESSAGE_KIND_PING\x10\x022\xfc\x03\n" + + "\x02C2\x12=\n" + + "\n" + + "ClaimTasks\x12\x15.c2.ClaimTasksRequest\x1a\x16.c2.ClaimTasksResponse\"\x00\x12=\n" + + "\n" + + "FetchAsset\x12\x15.c2.FetchAssetRequest\x1a\x16.c2.FetchAssetResponse0\x01\x12M\n" + + "\x10ReportCredential\x12\x1b.c2.ReportCredentialRequest\x1a\x1c.c2.ReportCredentialResponse\x12=\n" + + "\n" + + "ReportFile\x12\x15.c2.ReportFileRequest\x1a\x16.c2.ReportFileResponse(\x01\x12P\n" + + "\x11ReportProcessList\x12\x1c.c2.ReportProcessListRequest\x1a\x1d.c2.ReportProcessListResponse\x12O\n" + + "\x10ReportTaskOutput\x12\x1b.c2.ReportTaskOutputRequest\x1a\x1c.c2.ReportTaskOutputResponse\"\x00\x12G\n" + + "\fReverseShell\x12\x17.c2.ReverseShellRequest\x1a\x18.c2.ReverseShellResponse\"\x00(\x010\x01B#Z!realm.pub/tavern/internal/c2/c2pbb\x06proto3" var ( file_c2_proto_rawDescOnce sync.Once - file_c2_proto_rawDescData = file_c2_proto_rawDesc + file_c2_proto_rawDescData []byte ) func file_c2_proto_rawDescGZIP() []byte { file_c2_proto_rawDescOnce.Do(func() { - file_c2_proto_rawDescData = protoimpl.X.CompressGZIP(file_c2_proto_rawDescData) + file_c2_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c2_proto_rawDesc), len(file_c2_proto_rawDesc))) }) return file_c2_proto_rawDescData } var file_c2_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_c2_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_c2_proto_goTypes = []interface{}{ +var file_c2_proto_goTypes = []any{ (ReverseShellMessageKind)(0), // 0: c2.ReverseShellMessageKind (Host_Platform)(0), // 1: c2.Host.Platform (*Agent)(nil), // 2: c2.Agent @@ -1434,253 +1324,11 @@ func file_c2_proto_init() { if File_c2_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_c2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Agent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Beacon); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Host); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[3].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_c2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchAssetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportCredentialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportCredentialResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportProcessListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportProcessListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportTaskOutputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportTaskOutputResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReverseShellRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReverseShellResponse); 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{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_c2_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c2_proto_rawDesc), len(file_c2_proto_rawDesc)), NumEnums: 2, NumMessages: 20, NumExtensions: 0, @@ -1692,7 +1340,6 @@ func file_c2_proto_init() { MessageInfos: file_c2_proto_msgTypes, }.Build() File_c2_proto = out.File - file_c2_proto_rawDesc = nil file_c2_proto_goTypes = nil file_c2_proto_depIdxs = nil } diff --git a/tavern/internal/c2/epb/eldritch.pb.go b/tavern/internal/c2/epb/eldritch.pb.go index d6fae90b5..48da0200a 100644 --- a/tavern/internal/c2/epb/eldritch.pb.go +++ b/tavern/internal/c2/epb/eldritch.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.36.6 // protoc v3.21.12 // source: eldritch.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -153,22 +154,19 @@ func (Process_Status) EnumDescriptor() ([]byte, []int) { // Tome for eldritch to execute. type Tome struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Eldritch string `protobuf:"bytes,1,opt,name=eldritch,proto3" json:"eldritch,omitempty"` + Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + FileNames []string `protobuf:"bytes,3,rep,name=file_names,json=fileNames,proto3" json:"file_names,omitempty"` unknownFields protoimpl.UnknownFields - - Eldritch string `protobuf:"bytes,1,opt,name=eldritch,proto3" json:"eldritch,omitempty"` - Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - FileNames []string `protobuf:"bytes,3,rep,name=file_names,json=fileNames,proto3" json:"file_names,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Tome) Reset() { *x = Tome{} - if protoimpl.UnsafeEnabled { - mi := &file_eldritch_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_eldritch_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tome) String() string { @@ -179,7 +177,7 @@ func (*Tome) ProtoMessage() {} func (x *Tome) ProtoReflect() protoreflect.Message { mi := &file_eldritch_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,22 +215,19 @@ func (x *Tome) GetFileNames() []string { // Credential reported on the host system. type Credential struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Principal string `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + Kind Credential_Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=eldritch.Credential_Kind" json:"kind,omitempty"` unknownFields protoimpl.UnknownFields - - Principal string `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"` - Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` - Kind Credential_Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=eldritch.Credential_Kind" json:"kind,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Credential) Reset() { *x = Credential{} - if protoimpl.UnsafeEnabled { - mi := &file_eldritch_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_eldritch_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Credential) String() string { @@ -243,7 +238,7 @@ func (*Credential) ProtoMessage() {} func (x *Credential) ProtoReflect() protoreflect.Message { mi := &file_eldritch_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,28 +276,25 @@ func (x *Credential) GetKind() Credential_Kind { // Process running on the host system. type Process struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Pid uint64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` + Ppid uint64 `protobuf:"varint,2,opt,name=ppid,proto3" json:"ppid,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Principal string `protobuf:"bytes,4,opt,name=principal,proto3" json:"principal,omitempty"` + Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` + Cmd string `protobuf:"bytes,6,opt,name=cmd,proto3" json:"cmd,omitempty"` + Env string `protobuf:"bytes,7,opt,name=env,proto3" json:"env,omitempty"` + Cwd string `protobuf:"bytes,8,opt,name=cwd,proto3" json:"cwd,omitempty"` + Status Process_Status `protobuf:"varint,9,opt,name=status,proto3,enum=eldritch.Process_Status" json:"status,omitempty"` unknownFields protoimpl.UnknownFields - - Pid uint64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` - Ppid uint64 `protobuf:"varint,2,opt,name=ppid,proto3" json:"ppid,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Principal string `protobuf:"bytes,4,opt,name=principal,proto3" json:"principal,omitempty"` - Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` - Cmd string `protobuf:"bytes,6,opt,name=cmd,proto3" json:"cmd,omitempty"` - Env string `protobuf:"bytes,7,opt,name=env,proto3" json:"env,omitempty"` - Cwd string `protobuf:"bytes,8,opt,name=cwd,proto3" json:"cwd,omitempty"` - Status Process_Status `protobuf:"varint,9,opt,name=status,proto3,enum=eldritch.Process_Status" json:"status,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Process) Reset() { *x = Process{} - if protoimpl.UnsafeEnabled { - mi := &file_eldritch_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_eldritch_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Process) String() string { @@ -313,7 +305,7 @@ func (*Process) ProtoMessage() {} func (x *Process) ProtoReflect() protoreflect.Message { mi := &file_eldritch_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,20 +385,17 @@ func (x *Process) GetStatus() Process_Status { // ProcessList of running processes on the host system. type ProcessList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + List []*Process `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` unknownFields protoimpl.UnknownFields - - List []*Process `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ProcessList) Reset() { *x = ProcessList{} - if protoimpl.UnsafeEnabled { - mi := &file_eldritch_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_eldritch_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessList) String() string { @@ -417,7 +406,7 @@ func (*ProcessList) ProtoMessage() {} func (x *ProcessList) ProtoReflect() protoreflect.Message { mi := &file_eldritch_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,25 +430,22 @@ func (x *ProcessList) GetList() []*Process { // FileMetadata about a file on the host system. type FileMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` + Permissions string `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` + Size uint64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` + Sha3_256Hash string `protobuf:"bytes,6,opt,name=sha3_256_hash,json=sha3256Hash,proto3" json:"sha3_256_hash,omitempty"` unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` - Permissions string `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` - Size uint64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` - Sha3_256Hash string `protobuf:"bytes,6,opt,name=sha3_256_hash,json=sha3256Hash,proto3" json:"sha3_256_hash,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FileMetadata) Reset() { *x = FileMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_eldritch_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_eldritch_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileMetadata) String() string { @@ -470,7 +456,7 @@ func (*FileMetadata) ProtoMessage() {} func (x *FileMetadata) ProtoReflect() protoreflect.Message { mi := &file_eldritch_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,21 +515,18 @@ func (x *FileMetadata) GetSha3_256Hash() string { // File on the host system. type File struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *FileMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Metadata *FileMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *File) Reset() { *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_eldritch_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_eldritch_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File) String() string { @@ -554,7 +537,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_eldritch_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,105 +568,83 @@ func (x *File) GetChunk() []byte { var File_eldritch_proto protoreflect.FileDescriptor -var file_eldritch_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x08, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x22, 0xc0, 0x01, 0x0a, 0x04, 0x54, - 0x6f, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x12, - 0x3e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x54, - 0x6f, 0x6d, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x3d, - 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0xb4, 0x01, - 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, - 0x64, 0x22, 0x41, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x49, 0x4e, - 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x11, 0x0a, 0x0d, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, - 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x53, 0x53, 0x48, 0x5f, 0x4b, - 0x45, 0x59, 0x10, 0x02, 0x22, 0x8b, 0x04, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x70, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x70, 0x70, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, - 0x63, 0x6d, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x76, - 0x12, 0x10, 0x0a, 0x03, 0x63, 0x77, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, - 0x77, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0xab, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x4c, 0x45, 0x45, 0x50, 0x10, 0x04, 0x12, 0x0f, - 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x10, 0x05, 0x12, - 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x5a, 0x4f, 0x4d, 0x42, 0x49, 0x45, - 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x41, - 0x43, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x44, 0x45, 0x41, 0x44, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x57, 0x41, 0x4b, 0x45, 0x5f, 0x4b, 0x49, 0x4c, 0x4c, 0x10, 0x09, 0x12, 0x11, 0x0a, - 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x0a, - 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x4b, 0x45, - 0x44, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4c, 0x4f, - 0x43, 0x4b, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x55, 0x50, - 0x54, 0x49, 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x4b, 0x5f, 0x53, 0x4c, 0x45, 0x45, 0x50, - 0x10, 0x0d, 0x22, 0x34, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xa8, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, - 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, - 0x22, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x33, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x68, 0x61, 0x33, 0x32, 0x35, 0x36, 0x48, - 0x61, 0x73, 0x68, 0x22, 0x50, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x65, 0x6c, 0x64, 0x72, 0x69, 0x74, 0x63, 0x68, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x42, 0x22, 0x5a, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x2e, 0x70, - 0x75, 0x62, 0x2f, 0x74, 0x61, 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2f, 0x63, 0x32, 0x2f, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} +const file_eldritch_proto_rawDesc = "" + + "\n" + + "\x0eeldritch.proto\x12\beldritch\"\xc0\x01\n" + + "\x04Tome\x12\x1a\n" + + "\beldritch\x18\x01 \x01(\tR\beldritch\x12>\n" + + "\n" + + "parameters\x18\x02 \x03(\v2\x1e.eldritch.Tome.ParametersEntryR\n" + + "parameters\x12\x1d\n" + + "\n" + + "file_names\x18\x03 \x03(\tR\tfileNames\x1a=\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb4\x01\n" + + "\n" + + "Credential\x12\x1c\n" + + "\tprincipal\x18\x01 \x01(\tR\tprincipal\x12\x16\n" + + "\x06secret\x18\x02 \x01(\tR\x06secret\x12-\n" + + "\x04kind\x18\x03 \x01(\x0e2\x19.eldritch.Credential.KindR\x04kind\"A\n" + + "\x04Kind\x12\x14\n" + + "\x10KIND_UNSPECIFIED\x10\x00\x12\x11\n" + + "\rKIND_PASSWORD\x10\x01\x12\x10\n" + + "\fKIND_SSH_KEY\x10\x02\"\x8b\x04\n" + + "\aProcess\x12\x10\n" + + "\x03pid\x18\x01 \x01(\x04R\x03pid\x12\x12\n" + + "\x04ppid\x18\x02 \x01(\x04R\x04ppid\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12\x1c\n" + + "\tprincipal\x18\x04 \x01(\tR\tprincipal\x12\x12\n" + + "\x04path\x18\x05 \x01(\tR\x04path\x12\x10\n" + + "\x03cmd\x18\x06 \x01(\tR\x03cmd\x12\x10\n" + + "\x03env\x18\a \x01(\tR\x03env\x12\x10\n" + + "\x03cwd\x18\b \x01(\tR\x03cwd\x120\n" + + "\x06status\x18\t \x01(\x0e2\x18.eldritch.Process.StatusR\x06status\"\xab\x02\n" + + "\x06Status\x12\x16\n" + + "\x12STATUS_UNSPECIFIED\x10\x00\x12\x12\n" + + "\x0eSTATUS_UNKNOWN\x10\x01\x12\x0f\n" + + "\vSTATUS_IDLE\x10\x02\x12\x0e\n" + + "\n" + + "STATUS_RUN\x10\x03\x12\x10\n" + + "\fSTATUS_SLEEP\x10\x04\x12\x0f\n" + + "\vSTATUS_STOP\x10\x05\x12\x11\n" + + "\rSTATUS_ZOMBIE\x10\x06\x12\x12\n" + + "\x0eSTATUS_TRACING\x10\a\x12\x0f\n" + + "\vSTATUS_DEAD\x10\b\x12\x14\n" + + "\x10STATUS_WAKE_KILL\x10\t\x12\x11\n" + + "\rSTATUS_WAKING\x10\n" + + "\x12\x11\n" + + "\rSTATUS_PARKED\x10\v\x12\x17\n" + + "\x13STATUS_LOCK_BLOCKED\x10\f\x12$\n" + + " STATUS_UNINTERUPTIBLE_DISK_SLEEP\x10\r\"4\n" + + "\vProcessList\x12%\n" + + "\x04list\x18\x01 \x03(\v2\x11.eldritch.ProcessR\x04list\"\xa8\x01\n" + + "\fFileMetadata\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x14\n" + + "\x05owner\x18\x02 \x01(\tR\x05owner\x12\x14\n" + + "\x05group\x18\x03 \x01(\tR\x05group\x12 \n" + + "\vpermissions\x18\x04 \x01(\tR\vpermissions\x12\x12\n" + + "\x04size\x18\x05 \x01(\x04R\x04size\x12\"\n" + + "\rsha3_256_hash\x18\x06 \x01(\tR\vsha3256Hash\"P\n" + + "\x04File\x122\n" + + "\bmetadata\x18\x01 \x01(\v2\x16.eldritch.FileMetadataR\bmetadata\x12\x14\n" + + "\x05chunk\x18\x02 \x01(\fR\x05chunkB\"Z realm.pub/tavern/internal/c2/epbb\x06proto3" var ( file_eldritch_proto_rawDescOnce sync.Once - file_eldritch_proto_rawDescData = file_eldritch_proto_rawDesc + file_eldritch_proto_rawDescData []byte ) func file_eldritch_proto_rawDescGZIP() []byte { file_eldritch_proto_rawDescOnce.Do(func() { - file_eldritch_proto_rawDescData = protoimpl.X.CompressGZIP(file_eldritch_proto_rawDescData) + file_eldritch_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_eldritch_proto_rawDesc), len(file_eldritch_proto_rawDesc))) }) return file_eldritch_proto_rawDescData } var file_eldritch_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_eldritch_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_eldritch_proto_goTypes = []interface{}{ +var file_eldritch_proto_goTypes = []any{ (Credential_Kind)(0), // 0: eldritch.Credential.Kind (Process_Status)(0), // 1: eldritch.Process.Status (*Tome)(nil), // 2: eldritch.Tome @@ -712,85 +673,11 @@ func file_eldritch_proto_init() { if File_eldritch_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_eldritch_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tome); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eldritch_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Credential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eldritch_proto_msgTypes[2].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_eldritch_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eldritch_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eldritch_proto_msgTypes[5].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 - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_eldritch_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_eldritch_proto_rawDesc), len(file_eldritch_proto_rawDesc)), NumEnums: 2, NumMessages: 7, NumExtensions: 0, @@ -802,7 +689,6 @@ func file_eldritch_proto_init() { MessageInfos: file_eldritch_proto_msgTypes, }.Build() File_eldritch_proto = out.File - file_eldritch_proto_rawDesc = nil file_eldritch_proto_goTypes = nil file_eldritch_proto_depIdxs = nil } diff --git a/tavern/internal/c2/proto/c2.proto b/tavern/internal/c2/proto/c2.proto index ae65623ee..3e065c241 100644 --- a/tavern/internal/c2/proto/c2.proto +++ b/tavern/internal/c2/proto/c2.proto @@ -41,6 +41,7 @@ message Host { Platform platform = 3; string primary_ip = 4; + string version = 5; } diff --git a/tavern/internal/ent/gql_collection.go b/tavern/internal/ent/gql_collection.go index a7fb4e0fe..58bca5ec7 100644 --- a/tavern/internal/ent/gql_collection.go +++ b/tavern/internal/ent/gql_collection.go @@ -505,6 +505,11 @@ func (h *HostQuery) collectField(ctx context.Context, oneNode bool, opCtx *graph selectedFields = append(selectedFields, host.FieldPlatform) fieldSeen[host.FieldPlatform] = struct{}{} } + case "version": + if _, ok := fieldSeen[host.FieldVersion]; !ok { + selectedFields = append(selectedFields, host.FieldVersion) + fieldSeen[host.FieldVersion] = struct{}{} + } case "lastSeenAt": if _, ok := fieldSeen[host.FieldLastSeenAt]; !ok { selectedFields = append(selectedFields, host.FieldLastSeenAt) diff --git a/tavern/internal/ent/gql_where_input.go b/tavern/internal/ent/gql_where_input.go index 68dceb96f..06b89f730 100644 --- a/tavern/internal/ent/gql_where_input.go +++ b/tavern/internal/ent/gql_where_input.go @@ -1064,6 +1064,23 @@ type HostWhereInput struct { PlatformIn []c2pb.Host_Platform `json:"platformIn,omitempty"` PlatformNotIn []c2pb.Host_Platform `json:"platformNotIn,omitempty"` + // "version" field predicates. + Version *string `json:"version,omitempty"` + VersionNEQ *string `json:"versionNEQ,omitempty"` + VersionIn []string `json:"versionIn,omitempty"` + VersionNotIn []string `json:"versionNotIn,omitempty"` + VersionGT *string `json:"versionGT,omitempty"` + VersionGTE *string `json:"versionGTE,omitempty"` + VersionLT *string `json:"versionLT,omitempty"` + VersionLTE *string `json:"versionLTE,omitempty"` + VersionContains *string `json:"versionContains,omitempty"` + VersionHasPrefix *string `json:"versionHasPrefix,omitempty"` + VersionHasSuffix *string `json:"versionHasSuffix,omitempty"` + VersionIsNil bool `json:"versionIsNil,omitempty"` + VersionNotNil bool `json:"versionNotNil,omitempty"` + VersionEqualFold *string `json:"versionEqualFold,omitempty"` + VersionContainsFold *string `json:"versionContainsFold,omitempty"` + // "last_seen_at" field predicates. LastSeenAt *time.Time `json:"lastSeenAt,omitempty"` LastSeenAtNEQ *time.Time `json:"lastSeenAtNEQ,omitempty"` @@ -1426,6 +1443,51 @@ func (i *HostWhereInput) P() (predicate.Host, error) { if len(i.PlatformNotIn) > 0 { predicates = append(predicates, host.PlatformNotIn(i.PlatformNotIn...)) } + if i.Version != nil { + predicates = append(predicates, host.VersionEQ(*i.Version)) + } + if i.VersionNEQ != nil { + predicates = append(predicates, host.VersionNEQ(*i.VersionNEQ)) + } + if len(i.VersionIn) > 0 { + predicates = append(predicates, host.VersionIn(i.VersionIn...)) + } + if len(i.VersionNotIn) > 0 { + predicates = append(predicates, host.VersionNotIn(i.VersionNotIn...)) + } + if i.VersionGT != nil { + predicates = append(predicates, host.VersionGT(*i.VersionGT)) + } + if i.VersionGTE != nil { + predicates = append(predicates, host.VersionGTE(*i.VersionGTE)) + } + if i.VersionLT != nil { + predicates = append(predicates, host.VersionLT(*i.VersionLT)) + } + if i.VersionLTE != nil { + predicates = append(predicates, host.VersionLTE(*i.VersionLTE)) + } + if i.VersionContains != nil { + predicates = append(predicates, host.VersionContains(*i.VersionContains)) + } + if i.VersionHasPrefix != nil { + predicates = append(predicates, host.VersionHasPrefix(*i.VersionHasPrefix)) + } + if i.VersionHasSuffix != nil { + predicates = append(predicates, host.VersionHasSuffix(*i.VersionHasSuffix)) + } + if i.VersionIsNil { + predicates = append(predicates, host.VersionIsNil()) + } + if i.VersionNotNil { + predicates = append(predicates, host.VersionNotNil()) + } + if i.VersionEqualFold != nil { + predicates = append(predicates, host.VersionEqualFold(*i.VersionEqualFold)) + } + if i.VersionContainsFold != nil { + predicates = append(predicates, host.VersionContainsFold(*i.VersionContainsFold)) + } if i.LastSeenAt != nil { predicates = append(predicates, host.LastSeenAtEQ(*i.LastSeenAt)) } diff --git a/tavern/internal/ent/host.go b/tavern/internal/ent/host.go index 9158ead8c..e8b92b836 100644 --- a/tavern/internal/ent/host.go +++ b/tavern/internal/ent/host.go @@ -32,6 +32,8 @@ type Host struct { ExternalIP string `json:"external_ip,omitempty"` // Platform the agent is operating on. Platform c2pb.Host_Platform `json:"platform,omitempty"` + // Operating System Version/Distribution the agent is operating on. + Version string `json:"version,omitempty"` // Timestamp of when a task was last claimed or updated for the host. LastSeenAt time.Time `json:"last_seen_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. @@ -119,7 +121,7 @@ func (*Host) scanValues(columns []string) ([]any, error) { values[i] = new(c2pb.Host_Platform) case host.FieldID: values[i] = new(sql.NullInt64) - case host.FieldIdentifier, host.FieldName, host.FieldPrimaryIP, host.FieldExternalIP: + case host.FieldIdentifier, host.FieldName, host.FieldPrimaryIP, host.FieldExternalIP, host.FieldVersion: values[i] = new(sql.NullString) case host.FieldCreatedAt, host.FieldLastModifiedAt, host.FieldLastSeenAt: values[i] = new(sql.NullTime) @@ -186,6 +188,12 @@ func (h *Host) assignValues(columns []string, values []any) error { } else if value != nil { h.Platform = *value } + case host.FieldVersion: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field version", values[i]) + } else if value.Valid { + h.Version = value.String + } case host.FieldLastSeenAt: if value, ok := values[i].(*sql.NullTime); !ok { return fmt.Errorf("unexpected type %T for field last_seen_at", values[i]) @@ -274,6 +282,9 @@ func (h *Host) String() string { builder.WriteString("platform=") builder.WriteString(fmt.Sprintf("%v", h.Platform)) builder.WriteString(", ") + builder.WriteString("version=") + builder.WriteString(h.Version) + builder.WriteString(", ") builder.WriteString("last_seen_at=") builder.WriteString(h.LastSeenAt.Format(time.ANSIC)) builder.WriteByte(')') diff --git a/tavern/internal/ent/host/host.go b/tavern/internal/ent/host/host.go index 3d4576f47..89c16dd78 100644 --- a/tavern/internal/ent/host/host.go +++ b/tavern/internal/ent/host/host.go @@ -31,6 +31,8 @@ const ( FieldExternalIP = "external_ip" // FieldPlatform holds the string denoting the platform field in the database. FieldPlatform = "platform" + // FieldVersion holds the string denoting the version field in the database. + FieldVersion = "version" // FieldLastSeenAt holds the string denoting the last_seen_at field in the database. FieldLastSeenAt = "last_seen_at" // EdgeTags holds the string denoting the tags edge name in mutations. @@ -90,6 +92,7 @@ var Columns = []string{ FieldPrimaryIP, FieldExternalIP, FieldPlatform, + FieldVersion, FieldLastSeenAt, } @@ -120,6 +123,8 @@ var ( IdentifierValidator func(string) error // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error + // VersionValidator is a validator for the "version" field. It is called by the builders before save. + VersionValidator func(string) error ) // PlatformValidator is a validator for the "platform" field enum values. It is called by the builders before save. @@ -175,6 +180,11 @@ func ByPlatform(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPlatform, opts...).ToFunc() } +// ByVersion orders the results by the version field. +func ByVersion(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldVersion, opts...).ToFunc() +} + // ByLastSeenAt orders the results by the last_seen_at field. func ByLastSeenAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLastSeenAt, opts...).ToFunc() diff --git a/tavern/internal/ent/host/where.go b/tavern/internal/ent/host/where.go index 07d58dace..43a3c1a16 100644 --- a/tavern/internal/ent/host/where.go +++ b/tavern/internal/ent/host/where.go @@ -86,6 +86,11 @@ func ExternalIP(v string) predicate.Host { return predicate.Host(sql.FieldEQ(FieldExternalIP, v)) } +// Version applies equality check predicate on the "version" field. It's identical to VersionEQ. +func Version(v string) predicate.Host { + return predicate.Host(sql.FieldEQ(FieldVersion, v)) +} + // LastSeenAt applies equality check predicate on the "last_seen_at" field. It's identical to LastSeenAtEQ. func LastSeenAt(v time.Time) predicate.Host { return predicate.Host(sql.FieldEQ(FieldLastSeenAt, v)) @@ -481,6 +486,81 @@ func PlatformNotIn(vs ...c2pb.Host_Platform) predicate.Host { return predicate.Host(sql.FieldNotIn(FieldPlatform, vs...)) } +// VersionEQ applies the EQ predicate on the "version" field. +func VersionEQ(v string) predicate.Host { + return predicate.Host(sql.FieldEQ(FieldVersion, v)) +} + +// VersionNEQ applies the NEQ predicate on the "version" field. +func VersionNEQ(v string) predicate.Host { + return predicate.Host(sql.FieldNEQ(FieldVersion, v)) +} + +// VersionIn applies the In predicate on the "version" field. +func VersionIn(vs ...string) predicate.Host { + return predicate.Host(sql.FieldIn(FieldVersion, vs...)) +} + +// VersionNotIn applies the NotIn predicate on the "version" field. +func VersionNotIn(vs ...string) predicate.Host { + return predicate.Host(sql.FieldNotIn(FieldVersion, vs...)) +} + +// VersionGT applies the GT predicate on the "version" field. +func VersionGT(v string) predicate.Host { + return predicate.Host(sql.FieldGT(FieldVersion, v)) +} + +// VersionGTE applies the GTE predicate on the "version" field. +func VersionGTE(v string) predicate.Host { + return predicate.Host(sql.FieldGTE(FieldVersion, v)) +} + +// VersionLT applies the LT predicate on the "version" field. +func VersionLT(v string) predicate.Host { + return predicate.Host(sql.FieldLT(FieldVersion, v)) +} + +// VersionLTE applies the LTE predicate on the "version" field. +func VersionLTE(v string) predicate.Host { + return predicate.Host(sql.FieldLTE(FieldVersion, v)) +} + +// VersionContains applies the Contains predicate on the "version" field. +func VersionContains(v string) predicate.Host { + return predicate.Host(sql.FieldContains(FieldVersion, v)) +} + +// VersionHasPrefix applies the HasPrefix predicate on the "version" field. +func VersionHasPrefix(v string) predicate.Host { + return predicate.Host(sql.FieldHasPrefix(FieldVersion, v)) +} + +// VersionHasSuffix applies the HasSuffix predicate on the "version" field. +func VersionHasSuffix(v string) predicate.Host { + return predicate.Host(sql.FieldHasSuffix(FieldVersion, v)) +} + +// VersionIsNil applies the IsNil predicate on the "version" field. +func VersionIsNil() predicate.Host { + return predicate.Host(sql.FieldIsNull(FieldVersion)) +} + +// VersionNotNil applies the NotNil predicate on the "version" field. +func VersionNotNil() predicate.Host { + return predicate.Host(sql.FieldNotNull(FieldVersion)) +} + +// VersionEqualFold applies the EqualFold predicate on the "version" field. +func VersionEqualFold(v string) predicate.Host { + return predicate.Host(sql.FieldEqualFold(FieldVersion, v)) +} + +// VersionContainsFold applies the ContainsFold predicate on the "version" field. +func VersionContainsFold(v string) predicate.Host { + return predicate.Host(sql.FieldContainsFold(FieldVersion, v)) +} + // LastSeenAtEQ applies the EQ predicate on the "last_seen_at" field. func LastSeenAtEQ(v time.Time) predicate.Host { return predicate.Host(sql.FieldEQ(FieldLastSeenAt, v)) diff --git a/tavern/internal/ent/host_create.go b/tavern/internal/ent/host_create.go index b0dcf44b3..d69c85435 100644 --- a/tavern/internal/ent/host_create.go +++ b/tavern/internal/ent/host_create.go @@ -110,6 +110,20 @@ func (hc *HostCreate) SetPlatform(cp c2pb.Host_Platform) *HostCreate { return hc } +// SetVersion sets the "version" field. +func (hc *HostCreate) SetVersion(s string) *HostCreate { + hc.mutation.SetVersion(s) + return hc +} + +// SetNillableVersion sets the "version" field if the given value is not nil. +func (hc *HostCreate) SetNillableVersion(s *string) *HostCreate { + if s != nil { + hc.SetVersion(*s) + } + return hc +} + // SetLastSeenAt sets the "last_seen_at" field. func (hc *HostCreate) SetLastSeenAt(t time.Time) *HostCreate { hc.mutation.SetLastSeenAt(t) @@ -273,6 +287,11 @@ func (hc *HostCreate) check() error { return &ValidationError{Name: "platform", err: fmt.Errorf(`ent: validator failed for field "Host.platform": %w`, err)} } } + if v, ok := hc.mutation.Version(); ok { + if err := host.VersionValidator(v); err != nil { + return &ValidationError{Name: "version", err: fmt.Errorf(`ent: validator failed for field "Host.version": %w`, err)} + } + } return nil } @@ -328,6 +347,10 @@ func (hc *HostCreate) createSpec() (*Host, *sqlgraph.CreateSpec) { _spec.SetField(host.FieldPlatform, field.TypeEnum, value) _node.Platform = value } + if value, ok := hc.mutation.Version(); ok { + _spec.SetField(host.FieldVersion, field.TypeString, value) + _node.Version = value + } if value, ok := hc.mutation.LastSeenAt(); ok { _spec.SetField(host.FieldLastSeenAt, field.TypeTime, value) _node.LastSeenAt = value @@ -554,6 +577,24 @@ func (u *HostUpsert) UpdatePlatform() *HostUpsert { return u } +// SetVersion sets the "version" field. +func (u *HostUpsert) SetVersion(v string) *HostUpsert { + u.Set(host.FieldVersion, v) + return u +} + +// UpdateVersion sets the "version" field to the value that was provided on create. +func (u *HostUpsert) UpdateVersion() *HostUpsert { + u.SetExcluded(host.FieldVersion) + return u +} + +// ClearVersion clears the value of the "version" field. +func (u *HostUpsert) ClearVersion() *HostUpsert { + u.SetNull(host.FieldVersion) + return u +} + // SetLastSeenAt sets the "last_seen_at" field. func (u *HostUpsert) SetLastSeenAt(v time.Time) *HostUpsert { u.Set(host.FieldLastSeenAt, v) @@ -722,6 +763,27 @@ func (u *HostUpsertOne) UpdatePlatform() *HostUpsertOne { }) } +// SetVersion sets the "version" field. +func (u *HostUpsertOne) SetVersion(v string) *HostUpsertOne { + return u.Update(func(s *HostUpsert) { + s.SetVersion(v) + }) +} + +// UpdateVersion sets the "version" field to the value that was provided on create. +func (u *HostUpsertOne) UpdateVersion() *HostUpsertOne { + return u.Update(func(s *HostUpsert) { + s.UpdateVersion() + }) +} + +// ClearVersion clears the value of the "version" field. +func (u *HostUpsertOne) ClearVersion() *HostUpsertOne { + return u.Update(func(s *HostUpsert) { + s.ClearVersion() + }) +} + // SetLastSeenAt sets the "last_seen_at" field. func (u *HostUpsertOne) SetLastSeenAt(v time.Time) *HostUpsertOne { return u.Update(func(s *HostUpsert) { @@ -1059,6 +1121,27 @@ func (u *HostUpsertBulk) UpdatePlatform() *HostUpsertBulk { }) } +// SetVersion sets the "version" field. +func (u *HostUpsertBulk) SetVersion(v string) *HostUpsertBulk { + return u.Update(func(s *HostUpsert) { + s.SetVersion(v) + }) +} + +// UpdateVersion sets the "version" field to the value that was provided on create. +func (u *HostUpsertBulk) UpdateVersion() *HostUpsertBulk { + return u.Update(func(s *HostUpsert) { + s.UpdateVersion() + }) +} + +// ClearVersion clears the value of the "version" field. +func (u *HostUpsertBulk) ClearVersion() *HostUpsertBulk { + return u.Update(func(s *HostUpsert) { + s.ClearVersion() + }) +} + // SetLastSeenAt sets the "last_seen_at" field. func (u *HostUpsertBulk) SetLastSeenAt(v time.Time) *HostUpsertBulk { return u.Update(func(s *HostUpsert) { diff --git a/tavern/internal/ent/host_update.go b/tavern/internal/ent/host_update.go index 1dd47c46e..6c1bf27db 100644 --- a/tavern/internal/ent/host_update.go +++ b/tavern/internal/ent/host_update.go @@ -128,6 +128,26 @@ func (hu *HostUpdate) SetNillablePlatform(cp *c2pb.Host_Platform) *HostUpdate { return hu } +// SetVersion sets the "version" field. +func (hu *HostUpdate) SetVersion(s string) *HostUpdate { + hu.mutation.SetVersion(s) + return hu +} + +// SetNillableVersion sets the "version" field if the given value is not nil. +func (hu *HostUpdate) SetNillableVersion(s *string) *HostUpdate { + if s != nil { + hu.SetVersion(*s) + } + return hu +} + +// ClearVersion clears the value of the "version" field. +func (hu *HostUpdate) ClearVersion() *HostUpdate { + hu.mutation.ClearVersion() + return hu +} + // SetLastSeenAt sets the "last_seen_at" field. func (hu *HostUpdate) SetLastSeenAt(t time.Time) *HostUpdate { hu.mutation.SetLastSeenAt(t) @@ -386,6 +406,11 @@ func (hu *HostUpdate) check() error { return &ValidationError{Name: "platform", err: fmt.Errorf(`ent: validator failed for field "Host.platform": %w`, err)} } } + if v, ok := hu.mutation.Version(); ok { + if err := host.VersionValidator(v); err != nil { + return &ValidationError{Name: "version", err: fmt.Errorf(`ent: validator failed for field "Host.version": %w`, err)} + } + } return nil } @@ -428,6 +453,12 @@ func (hu *HostUpdate) sqlSave(ctx context.Context) (n int, err error) { if value, ok := hu.mutation.Platform(); ok { _spec.SetField(host.FieldPlatform, field.TypeEnum, value) } + if value, ok := hu.mutation.Version(); ok { + _spec.SetField(host.FieldVersion, field.TypeString, value) + } + if hu.mutation.VersionCleared() { + _spec.ClearField(host.FieldVersion, field.TypeString) + } if value, ok := hu.mutation.LastSeenAt(); ok { _spec.SetField(host.FieldLastSeenAt, field.TypeTime, value) } @@ -773,6 +804,26 @@ func (huo *HostUpdateOne) SetNillablePlatform(cp *c2pb.Host_Platform) *HostUpdat return huo } +// SetVersion sets the "version" field. +func (huo *HostUpdateOne) SetVersion(s string) *HostUpdateOne { + huo.mutation.SetVersion(s) + return huo +} + +// SetNillableVersion sets the "version" field if the given value is not nil. +func (huo *HostUpdateOne) SetNillableVersion(s *string) *HostUpdateOne { + if s != nil { + huo.SetVersion(*s) + } + return huo +} + +// ClearVersion clears the value of the "version" field. +func (huo *HostUpdateOne) ClearVersion() *HostUpdateOne { + huo.mutation.ClearVersion() + return huo +} + // SetLastSeenAt sets the "last_seen_at" field. func (huo *HostUpdateOne) SetLastSeenAt(t time.Time) *HostUpdateOne { huo.mutation.SetLastSeenAt(t) @@ -1044,6 +1095,11 @@ func (huo *HostUpdateOne) check() error { return &ValidationError{Name: "platform", err: fmt.Errorf(`ent: validator failed for field "Host.platform": %w`, err)} } } + if v, ok := huo.mutation.Version(); ok { + if err := host.VersionValidator(v); err != nil { + return &ValidationError{Name: "version", err: fmt.Errorf(`ent: validator failed for field "Host.version": %w`, err)} + } + } return nil } @@ -1103,6 +1159,12 @@ func (huo *HostUpdateOne) sqlSave(ctx context.Context) (_node *Host, err error) if value, ok := huo.mutation.Platform(); ok { _spec.SetField(host.FieldPlatform, field.TypeEnum, value) } + if value, ok := huo.mutation.Version(); ok { + _spec.SetField(host.FieldVersion, field.TypeString, value) + } + if huo.mutation.VersionCleared() { + _spec.ClearField(host.FieldVersion, field.TypeString) + } if value, ok := huo.mutation.LastSeenAt(); ok { _spec.SetField(host.FieldLastSeenAt, field.TypeTime, value) } diff --git a/tavern/internal/ent/migrate/schema.go b/tavern/internal/ent/migrate/schema.go index 728120dfe..6052a0692 100644 --- a/tavern/internal/ent/migrate/schema.go +++ b/tavern/internal/ent/migrate/schema.go @@ -62,6 +62,7 @@ var ( {Name: "primary_ip", Type: field.TypeString, Nullable: true}, {Name: "external_ip", Type: field.TypeString, Nullable: true}, {Name: "platform", Type: field.TypeEnum, Enums: []string{"PLATFORM_BSD", "PLATFORM_LINUX", "PLATFORM_MACOS", "PLATFORM_UNSPECIFIED", "PLATFORM_WINDOWS"}}, + {Name: "version", Type: field.TypeString, Nullable: true}, {Name: "last_seen_at", Type: field.TypeTime, Nullable: true}, } // HostsTable holds the schema information for the "hosts" table. diff --git a/tavern/internal/ent/mutation.go b/tavern/internal/ent/mutation.go index 442ff09d1..e9cbe031e 100644 --- a/tavern/internal/ent/mutation.go +++ b/tavern/internal/ent/mutation.go @@ -1846,6 +1846,7 @@ type HostMutation struct { primary_ip *string external_ip *string platform *c2pb.Host_Platform + version *string last_seen_at *time.Time clearedFields map[string]struct{} tags map[int]struct{} @@ -2257,6 +2258,55 @@ func (m *HostMutation) ResetPlatform() { m.platform = nil } +// SetVersion sets the "version" field. +func (m *HostMutation) SetVersion(s string) { + m.version = &s +} + +// Version returns the value of the "version" field in the mutation. +func (m *HostMutation) Version() (r string, exists bool) { + v := m.version + if v == nil { + return + } + return *v, true +} + +// OldVersion returns the old "version" field's value of the Host entity. +// If the Host object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *HostMutation) OldVersion(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldVersion is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldVersion requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldVersion: %w", err) + } + return oldValue.Version, nil +} + +// ClearVersion clears the value of the "version" field. +func (m *HostMutation) ClearVersion() { + m.version = nil + m.clearedFields[host.FieldVersion] = struct{}{} +} + +// VersionCleared returns if the "version" field was cleared in this mutation. +func (m *HostMutation) VersionCleared() bool { + _, ok := m.clearedFields[host.FieldVersion] + return ok +} + +// ResetVersion resets all changes to the "version" field. +func (m *HostMutation) ResetVersion() { + m.version = nil + delete(m.clearedFields, host.FieldVersion) +} + // SetLastSeenAt sets the "last_seen_at" field. func (m *HostMutation) SetLastSeenAt(t time.Time) { m.last_seen_at = &t @@ -2610,7 +2660,7 @@ func (m *HostMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *HostMutation) Fields() []string { - fields := make([]string, 0, 8) + fields := make([]string, 0, 9) if m.created_at != nil { fields = append(fields, host.FieldCreatedAt) } @@ -2632,6 +2682,9 @@ func (m *HostMutation) Fields() []string { if m.platform != nil { fields = append(fields, host.FieldPlatform) } + if m.version != nil { + fields = append(fields, host.FieldVersion) + } if m.last_seen_at != nil { fields = append(fields, host.FieldLastSeenAt) } @@ -2657,6 +2710,8 @@ func (m *HostMutation) Field(name string) (ent.Value, bool) { return m.ExternalIP() case host.FieldPlatform: return m.Platform() + case host.FieldVersion: + return m.Version() case host.FieldLastSeenAt: return m.LastSeenAt() } @@ -2682,6 +2737,8 @@ func (m *HostMutation) OldField(ctx context.Context, name string) (ent.Value, er return m.OldExternalIP(ctx) case host.FieldPlatform: return m.OldPlatform(ctx) + case host.FieldVersion: + return m.OldVersion(ctx) case host.FieldLastSeenAt: return m.OldLastSeenAt(ctx) } @@ -2742,6 +2799,13 @@ func (m *HostMutation) SetField(name string, value ent.Value) error { } m.SetPlatform(v) return nil + case host.FieldVersion: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetVersion(v) + return nil case host.FieldLastSeenAt: v, ok := value.(time.Time) if !ok { @@ -2788,6 +2852,9 @@ func (m *HostMutation) ClearedFields() []string { if m.FieldCleared(host.FieldExternalIP) { fields = append(fields, host.FieldExternalIP) } + if m.FieldCleared(host.FieldVersion) { + fields = append(fields, host.FieldVersion) + } if m.FieldCleared(host.FieldLastSeenAt) { fields = append(fields, host.FieldLastSeenAt) } @@ -2814,6 +2881,9 @@ func (m *HostMutation) ClearField(name string) error { case host.FieldExternalIP: m.ClearExternalIP() return nil + case host.FieldVersion: + m.ClearVersion() + return nil case host.FieldLastSeenAt: m.ClearLastSeenAt() return nil @@ -2846,6 +2916,9 @@ func (m *HostMutation) ResetField(name string) error { case host.FieldPlatform: m.ResetPlatform() return nil + case host.FieldVersion: + m.ResetVersion() + return nil case host.FieldLastSeenAt: m.ResetLastSeenAt() return nil diff --git a/tavern/internal/ent/runtime/runtime.go b/tavern/internal/ent/runtime/runtime.go index 4b97bdc99..44d46e8ae 100644 --- a/tavern/internal/ent/runtime/runtime.go +++ b/tavern/internal/ent/runtime/runtime.go @@ -114,6 +114,10 @@ func init() { hostDescName := hostFields[1].Descriptor() // host.NameValidator is a validator for the "name" field. It is called by the builders before save. host.NameValidator = hostDescName.Validators[0].(func(string) error) + // hostDescVersion is the schema descriptor for version field. + hostDescVersion := hostFields[5].Descriptor() + // host.VersionValidator is a validator for the "version" field. It is called by the builders before save. + host.VersionValidator = hostDescVersion.Validators[0].(func(string) error) hostcredentialMixin := schema.HostCredential{}.Mixin() hostcredentialMixinFields0 := hostcredentialMixin[0].Fields() _ = hostcredentialMixinFields0 diff --git a/tavern/internal/ent/schema/host.go b/tavern/internal/ent/schema/host.go index f7416d5ce..9f5bf8bc6 100644 --- a/tavern/internal/ent/schema/host.go +++ b/tavern/internal/ent/schema/host.go @@ -47,6 +47,13 @@ func (Host) Fields() []ent.Field { entgql.Skip(entgql.SkipMutationUpdateInput), ). Comment("Platform the agent is operating on."), + field.String("version"). + Optional(). + NotEmpty(). + Annotations( + entgql.Skip(entgql.SkipMutationUpdateInput), + ). + Comment("Operating System Version/Distribution the agent is operating on."), field.Time("last_seen_at"). Optional(). Annotations( diff --git a/tavern/internal/graphql/generated/ent.generated.go b/tavern/internal/graphql/generated/ent.generated.go index 1e10c6a94..d14352ab7 100644 --- a/tavern/internal/graphql/generated/ent.generated.go +++ b/tavern/internal/graphql/generated/ent.generated.go @@ -1601,6 +1601,8 @@ func (ec *executionContext) fieldContext_Beacon_host(_ context.Context, field gr return ec.fieldContext_Host_externalIP(ctx, field) case "platform": return ec.fieldContext_Host_platform(ctx, field) + case "version": + return ec.fieldContext_Host_version(ctx, field) case "lastSeenAt": return ec.fieldContext_Host_lastSeenAt(ctx, field) case "tags": @@ -2432,6 +2434,47 @@ func (ec *executionContext) fieldContext_Host_platform(_ context.Context, field return fc, nil } +func (ec *executionContext) _Host_version(ctx context.Context, field graphql.CollectedField, obj *ent.Host) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Host_version(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Version, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Host_version(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Host", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Host_lastSeenAt(ctx context.Context, field graphql.CollectedField, obj *ent.Host) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Host_lastSeenAt(ctx, field) if err != nil { @@ -3105,6 +3148,8 @@ func (ec *executionContext) fieldContext_HostCredential_host(_ context.Context, return ec.fieldContext_Host_externalIP(ctx, field) case "platform": return ec.fieldContext_Host_platform(ctx, field) + case "version": + return ec.fieldContext_Host_version(ctx, field) case "lastSeenAt": return ec.fieldContext_Host_lastSeenAt(ctx, field) case "tags": @@ -3636,6 +3681,8 @@ func (ec *executionContext) fieldContext_HostFile_host(_ context.Context, field return ec.fieldContext_Host_externalIP(ctx, field) case "platform": return ec.fieldContext_Host_platform(ctx, field) + case "version": + return ec.fieldContext_Host_version(ctx, field) case "lastSeenAt": return ec.fieldContext_Host_lastSeenAt(ctx, field) case "tags": @@ -4302,6 +4349,8 @@ func (ec *executionContext) fieldContext_HostProcess_host(_ context.Context, fie return ec.fieldContext_Host_externalIP(ctx, field) case "platform": return ec.fieldContext_Host_platform(ctx, field) + case "version": + return ec.fieldContext_Host_version(ctx, field) case "lastSeenAt": return ec.fieldContext_Host_lastSeenAt(ctx, field) case "tags": @@ -5232,6 +5281,8 @@ func (ec *executionContext) fieldContext_Query_hosts(ctx context.Context, field return ec.fieldContext_Host_externalIP(ctx, field) case "platform": return ec.fieldContext_Host_platform(ctx, field) + case "version": + return ec.fieldContext_Host_version(ctx, field) case "lastSeenAt": return ec.fieldContext_Host_lastSeenAt(ctx, field) case "tags": @@ -8146,6 +8197,8 @@ func (ec *executionContext) fieldContext_Tag_hosts(_ context.Context, field grap return ec.fieldContext_Host_externalIP(ctx, field) case "platform": return ec.fieldContext_Host_platform(ctx, field) + case "version": + return ec.fieldContext_Host_version(ctx, field) case "lastSeenAt": return ec.fieldContext_Host_lastSeenAt(ctx, field) case "tags": @@ -14111,7 +14164,7 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob asMap[k] = v } - fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "lastModifiedAt", "lastModifiedAtNEQ", "lastModifiedAtIn", "lastModifiedAtNotIn", "lastModifiedAtGT", "lastModifiedAtGTE", "lastModifiedAtLT", "lastModifiedAtLTE", "identifier", "identifierNEQ", "identifierIn", "identifierNotIn", "identifierGT", "identifierGTE", "identifierLT", "identifierLTE", "identifierContains", "identifierHasPrefix", "identifierHasSuffix", "identifierEqualFold", "identifierContainsFold", "name", "nameNEQ", "nameIn", "nameNotIn", "nameGT", "nameGTE", "nameLT", "nameLTE", "nameContains", "nameHasPrefix", "nameHasSuffix", "nameIsNil", "nameNotNil", "nameEqualFold", "nameContainsFold", "primaryIP", "primaryIPNEQ", "primaryIPIn", "primaryIPNotIn", "primaryIPGT", "primaryIPGTE", "primaryIPLT", "primaryIPLTE", "primaryIPContains", "primaryIPHasPrefix", "primaryIPHasSuffix", "primaryIPIsNil", "primaryIPNotNil", "primaryIPEqualFold", "primaryIPContainsFold", "externalIP", "externalIPNEQ", "externalIPIn", "externalIPNotIn", "externalIPGT", "externalIPGTE", "externalIPLT", "externalIPLTE", "externalIPContains", "externalIPHasPrefix", "externalIPHasSuffix", "externalIPIsNil", "externalIPNotNil", "externalIPEqualFold", "externalIPContainsFold", "platform", "platformNEQ", "platformIn", "platformNotIn", "lastSeenAt", "lastSeenAtNEQ", "lastSeenAtIn", "lastSeenAtNotIn", "lastSeenAtGT", "lastSeenAtGTE", "lastSeenAtLT", "lastSeenAtLTE", "lastSeenAtIsNil", "lastSeenAtNotNil", "hasTags", "hasTagsWith", "hasBeacons", "hasBeaconsWith", "hasFiles", "hasFilesWith", "hasProcesses", "hasProcessesWith", "hasCredentials", "hasCredentialsWith"} + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "createdAt", "createdAtNEQ", "createdAtIn", "createdAtNotIn", "createdAtGT", "createdAtGTE", "createdAtLT", "createdAtLTE", "lastModifiedAt", "lastModifiedAtNEQ", "lastModifiedAtIn", "lastModifiedAtNotIn", "lastModifiedAtGT", "lastModifiedAtGTE", "lastModifiedAtLT", "lastModifiedAtLTE", "identifier", "identifierNEQ", "identifierIn", "identifierNotIn", "identifierGT", "identifierGTE", "identifierLT", "identifierLTE", "identifierContains", "identifierHasPrefix", "identifierHasSuffix", "identifierEqualFold", "identifierContainsFold", "name", "nameNEQ", "nameIn", "nameNotIn", "nameGT", "nameGTE", "nameLT", "nameLTE", "nameContains", "nameHasPrefix", "nameHasSuffix", "nameIsNil", "nameNotNil", "nameEqualFold", "nameContainsFold", "primaryIP", "primaryIPNEQ", "primaryIPIn", "primaryIPNotIn", "primaryIPGT", "primaryIPGTE", "primaryIPLT", "primaryIPLTE", "primaryIPContains", "primaryIPHasPrefix", "primaryIPHasSuffix", "primaryIPIsNil", "primaryIPNotNil", "primaryIPEqualFold", "primaryIPContainsFold", "externalIP", "externalIPNEQ", "externalIPIn", "externalIPNotIn", "externalIPGT", "externalIPGTE", "externalIPLT", "externalIPLTE", "externalIPContains", "externalIPHasPrefix", "externalIPHasSuffix", "externalIPIsNil", "externalIPNotNil", "externalIPEqualFold", "externalIPContainsFold", "platform", "platformNEQ", "platformIn", "platformNotIn", "version", "versionNEQ", "versionIn", "versionNotIn", "versionGT", "versionGTE", "versionLT", "versionLTE", "versionContains", "versionHasPrefix", "versionHasSuffix", "versionIsNil", "versionNotNil", "versionEqualFold", "versionContainsFold", "lastSeenAt", "lastSeenAtNEQ", "lastSeenAtIn", "lastSeenAtNotIn", "lastSeenAtGT", "lastSeenAtGTE", "lastSeenAtLT", "lastSeenAtLTE", "lastSeenAtIsNil", "lastSeenAtNotNil", "hasTags", "hasTagsWith", "hasBeacons", "hasBeaconsWith", "hasFiles", "hasFilesWith", "hasProcesses", "hasProcessesWith", "hasCredentials", "hasCredentialsWith"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -14741,6 +14794,111 @@ func (ec *executionContext) unmarshalInputHostWhereInput(ctx context.Context, ob return it, err } it.PlatformNotIn = data + case "version": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("version")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Version = data + case "versionNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionNEQ")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionNEQ = data + case "versionIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.VersionIn = data + case "versionNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionNotIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.VersionNotIn = data + case "versionGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionGT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionGT = data + case "versionGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionGTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionGTE = data + case "versionLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionLT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionLT = data + case "versionLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionLTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionLTE = data + case "versionContains": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionContains")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionContains = data + case "versionHasPrefix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionHasPrefix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionHasPrefix = data + case "versionHasSuffix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionHasSuffix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionHasSuffix = data + case "versionIsNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionIsNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.VersionIsNil = data + case "versionNotNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionNotNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.VersionNotNil = data + case "versionEqualFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionEqualFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionEqualFold = data + case "versionContainsFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("versionContainsFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.VersionContainsFold = data case "lastSeenAt": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastSeenAt")) data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) @@ -19542,6 +19700,8 @@ func (ec *executionContext) _Host(ctx context.Context, sel ast.SelectionSet, obj if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } + case "version": + out.Values[i] = ec._Host_version(ctx, field, obj) case "lastSeenAt": out.Values[i] = ec._Host_lastSeenAt(ctx, field, obj) case "tags": diff --git a/tavern/internal/graphql/generated/mutation.generated.go b/tavern/internal/graphql/generated/mutation.generated.go index 4346b837c..405717f1f 100644 --- a/tavern/internal/graphql/generated/mutation.generated.go +++ b/tavern/internal/graphql/generated/mutation.generated.go @@ -906,6 +906,8 @@ func (ec *executionContext) fieldContext_Mutation_updateHost(ctx context.Context return ec.fieldContext_Host_externalIP(ctx, field) case "platform": return ec.fieldContext_Host_platform(ctx, field) + case "version": + return ec.fieldContext_Host_version(ctx, field) case "lastSeenAt": return ec.fieldContext_Host_lastSeenAt(ctx, field) case "tags": diff --git a/tavern/internal/graphql/generated/root_.generated.go b/tavern/internal/graphql/generated/root_.generated.go index 499c8c34a..4aea14f33 100644 --- a/tavern/internal/graphql/generated/root_.generated.go +++ b/tavern/internal/graphql/generated/root_.generated.go @@ -84,6 +84,7 @@ type ComplexityRoot struct { PrimaryIP func(childComplexity int) int Processes func(childComplexity int) int Tags func(childComplexity int) int + Version func(childComplexity int) int } HostCredential struct { @@ -554,6 +555,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Host.Tags(childComplexity), true + case "Host.version": + if e.complexity.Host.Version == nil { + break + } + + return e.complexity.Host.Version(childComplexity), true + case "HostCredential.createdAt": if e.complexity.HostCredential.CreatedAt == nil { break @@ -2387,6 +2395,10 @@ type Host implements Node { """ platform: HostPlatform! """ + Operating System Version/Distribution the agent is operating on. + """ + version: String + """ Timestamp of when a task was last claimed or updated for the host. """ lastSeenAt: Time @@ -3210,6 +3222,24 @@ input HostWhereInput { platformIn: [HostPlatform!] platformNotIn: [HostPlatform!] """ + version field predicates + """ + version: String + versionNEQ: String + versionIn: [String!] + versionNotIn: [String!] + versionGT: String + versionGTE: String + versionLT: String + versionLTE: String + versionContains: String + versionHasPrefix: String + versionHasSuffix: String + versionIsNil: Boolean + versionNotNil: Boolean + versionEqualFold: String + versionContainsFold: String + """ last_seen_at field predicates """ lastSeenAt: Time diff --git a/tavern/internal/graphql/schema.graphql b/tavern/internal/graphql/schema.graphql index 32de8450c..ec964077d 100644 --- a/tavern/internal/graphql/schema.graphql +++ b/tavern/internal/graphql/schema.graphql @@ -519,6 +519,10 @@ type Host implements Node { """ platform: HostPlatform! """ + Operating System Version/Distribution the agent is operating on. + """ + version: String + """ Timestamp of when a task was last claimed or updated for the host. """ lastSeenAt: Time @@ -1342,6 +1346,24 @@ input HostWhereInput { platformIn: [HostPlatform!] platformNotIn: [HostPlatform!] """ + version field predicates + """ + version: String + versionNEQ: String + versionIn: [String!] + versionNotIn: [String!] + versionGT: String + versionGTE: String + versionLT: String + versionLTE: String + versionContains: String + versionHasPrefix: String + versionHasSuffix: String + versionIsNil: Boolean + versionNotNil: Boolean + versionEqualFold: String + versionContainsFold: String + """ last_seen_at field predicates """ lastSeenAt: Time diff --git a/tavern/internal/graphql/schema/ent.graphql b/tavern/internal/graphql/schema/ent.graphql index f041fe232..70ef6e51b 100644 --- a/tavern/internal/graphql/schema/ent.graphql +++ b/tavern/internal/graphql/schema/ent.graphql @@ -514,6 +514,10 @@ type Host implements Node { """ platform: HostPlatform! """ + Operating System Version/Distribution the agent is operating on. + """ + version: String + """ Timestamp of when a task was last claimed or updated for the host. """ lastSeenAt: Time @@ -1337,6 +1341,24 @@ input HostWhereInput { platformIn: [HostPlatform!] platformNotIn: [HostPlatform!] """ + version field predicates + """ + version: String + versionNEQ: String + versionIn: [String!] + versionNotIn: [String!] + versionGT: String + versionGTE: String + versionLT: String + versionLTE: String + versionContains: String + versionHasPrefix: String + versionHasSuffix: String + versionIsNil: Boolean + versionNotNil: Boolean + versionEqualFold: String + versionContainsFold: String + """ last_seen_at field predicates """ lastSeenAt: Time diff --git a/tavern/internal/www/schema.graphql b/tavern/internal/www/schema.graphql index 32de8450c..ec964077d 100644 --- a/tavern/internal/www/schema.graphql +++ b/tavern/internal/www/schema.graphql @@ -519,6 +519,10 @@ type Host implements Node { """ platform: HostPlatform! """ + Operating System Version/Distribution the agent is operating on. + """ + version: String + """ Timestamp of when a task was last claimed or updated for the host. """ lastSeenAt: Time @@ -1342,6 +1346,24 @@ input HostWhereInput { platformIn: [HostPlatform!] platformNotIn: [HostPlatform!] """ + version field predicates + """ + version: String + versionNEQ: String + versionIn: [String!] + versionNotIn: [String!] + versionGT: String + versionGTE: String + versionLT: String + versionLTE: String + versionContains: String + versionHasPrefix: String + versionHasSuffix: String + versionIsNil: Boolean + versionNotNil: Boolean + versionEqualFold: String + versionContainsFold: String + """ last_seen_at field predicates """ lastSeenAt: Time diff --git a/tavern/tavern b/tavern/tavern new file mode 100755 index 000000000..eaa8fd2cc Binary files /dev/null and b/tavern/tavern differ diff --git a/tavern/tomes/shell_cmd/metadata.yml b/tavern/tomes/shell_cmd/metadata.yml index 44a31efd0..c241e3abb 100644 --- a/tavern/tomes/shell_cmd/metadata.yml +++ b/tavern/tomes/shell_cmd/metadata.yml @@ -1,5 +1,5 @@ name: Shell command -description: Execute a shell command in the systems default shell. +description: Execute a shell command in the systems default shell. Uses bash on Linux/Mac, sh on other Unix, and cmd.exe on Windows. author: hulto support_model: FIRST_PARTY tactic: EXECUTION