panic_attacker/attack/
strategies.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6pub enum AttackStrategy {
7 CpuStress,
8 MemoryExhaustion,
9 DiskThrashing,
10 NetworkFlood,
11 ConcurrencyStorm,
12 TimeBomb,
13}
14
15impl AttackStrategy {
16 pub fn description(&self) -> &str {
17 match self {
18 AttackStrategy::CpuStress => "Stress test CPU with high computational load",
19 AttackStrategy::MemoryExhaustion => "Exhaust available memory with large allocations",
20 AttackStrategy::DiskThrashing => "Thrash disk I/O with many file operations",
21 AttackStrategy::NetworkFlood => "Flood network connections",
22 AttackStrategy::ConcurrencyStorm => "Create concurrency storm with many threads/tasks",
23 AttackStrategy::TimeBomb => "Run for extended duration to find time-dependent bugs",
24 }
25 }
26}