mirror of
https://github.com/dongdongunique/EvoSynth.git
synced 2026-08-25 04:12:52 +02:00
first commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from ..base_attack import BaseAttack
|
||||
from abc import ABC, abstractmethod
|
||||
class BaseBlackBoxAttack(BaseAttack):
|
||||
"""黑盒攻击的基类,可以提供通用工具。"""
|
||||
@abstractmethod
|
||||
def attack(self, target: str):
|
||||
"""
|
||||
执行攻击,返回攻击结果。
|
||||
|
||||
Args:
|
||||
target: 攻击目标
|
||||
|
||||
Returns:
|
||||
AttackResult: 攻击结果对象
|
||||
"""
|
||||
raise NotImplementedError("Subclasses must implement the attack method.")
|
||||
Reference in New Issue
Block a user