use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] #[serde(tag = "type", rename_all = "camelCase")] pub enum Operation { Add { value: usize, }, Dereference { times: Option, }, Jmp { offset: Option, length: Option, }, Offset { offset: usize, }, RipRelative { offset: Option, length: Option, }, Subtract { value: usize, }, } #[derive(Debug, Deserialize, Serialize)] pub struct Signature { pub name: String, pub module: String, pub pattern: String, pub operations: Vec, } #[derive(Debug, Deserialize, Serialize)] pub struct Config { pub signatures: Vec, }