Skip to main content

panic_attacker/attack/
mod.rs

1// SPDX-License-Identifier: PMPL-1.0-or-later
2
3//! Attack orchestration module
4
5pub mod executor;
6pub mod strategies;
7
8use crate::types::*;
9use anyhow::Result;
10
11pub use executor::AttackExecutor;
12
13/// Execute an attack against a target program
14pub fn execute_attack(config: AttackConfig) -> Result<Vec<AttackResult>> {
15    let executor = AttackExecutor::new(config);
16    executor.execute()
17}
18
19/// Execute an attack with pattern-aware strategy selection
20pub fn execute_attack_with_patterns(
21    config: AttackConfig,
22    language: Language,
23    frameworks: &[Framework],
24) -> Result<Vec<AttackResult>> {
25    let executor = AttackExecutor::with_patterns(config, language, frameworks);
26    executor.execute()
27}