aboutsummaryrefslogtreecommitdiff
path: root/src/wire/action.rs
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-03-18 22:13:03 +0100
committerKatharina Fey <kookie@spacekookie.de>2020-03-18 22:13:03 +0100
commit533abc69936996be0cb333f730a9ed531d2d77d9 (patch)
treef9c43453f389e36b391b11c8392579b3a60fcdf1 /src/wire/action.rs
parent389b481607714d7aa69de80ef4849cbdf2d7a26c (diff)
Adding a wire layer
Diffstat (limited to 'src/wire/action.rs')
-rw-r--r--src/wire/action.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/wire/action.rs b/src/wire/action.rs
new file mode 100644
index 000000000000..8b25e58649ba
--- /dev/null
+++ b/src/wire/action.rs
@@ -0,0 +1,33 @@
+use crate::data::{NodeId, Upgrade};
+use serde::{Serialize, Deserialize};
+
+/// All actions that a user can trigger via the UI
+#[derive(Serialize, Deserialize)]
+pub enum Action {
+ /// Cancel the running action
+ Cancel(NodeId),
+ /// Start a capture action
+ Capture { from: NodeId, to: NodeId },
+ /// Set the compute targets
+ Compute { from: NodeId, to: Vec<NodeId> },
+ /// Set to payload analysis mode
+ Payload(NodeId),
+ /// Send an exploit across the network
+ Reset {
+ from: NodeId,
+ to: NodeId,
+ exp: Exploit,
+ },
+ /// Try to upgrade the node to a level
+ Upgrade { node: NodeId, level: Upgrade },
+}
+
+/// A type of exploit a node can start running
+#[derive(Serialize, Deserialize)]
+pub enum Exploit {
+ Reset,
+ CNS,
+ Nitm,
+ Virus,
+ TakeOver,
+}