You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
816 B
33 lines
816 B
use crate::data::{NodeId, Upgrade};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// 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,
|
|
}
|
|
|