pyrit.scenario.garak.EncodingStrategy#
- class EncodingStrategy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
ScenarioStrategyStrategies for encoding attacks.
Each enum member represents an encoding scheme that will be tested against the target model. The ALL aggregate expands to include all encoding strategies.
Note: EncodingStrategy does not support composition. Each encoding must be applied individually.
- __init__(*args, **kwds)#
Methods
get_aggregate_tags()Get the set of tags that represent aggregate categories.
get_strategies_by_tag(tag)Get all attack strategies that have a specific tag.
get_all_strategies()Get all non-aggregate strategies for this strategy enum.
get_aggregate_strategies()Get all aggregate strategies for this strategy enum.
normalize_strategies(strategies)Normalize a set of attack strategies by expanding aggregate tags.
prepare_scenario_strategies([strategies, ...])Prepare and normalize scenario strategies for use in a scenario.
supports_composition()Indicate whether this strategy type supports composition.
validate_composition(strategies)Validate whether the given strategies can be composed together.
Attributes
tagsGet the tags for this attack strategy.
- ALL = 'all'#
- ASCII85 = 'ascii85'#
- AsciiSmuggler = 'ascii_smuggler'#
- Atbash = 'atbash'#
- Base16 = 'base16'#
- Base2048 = 'base2048'#
- Base32 = 'base32'#
- Base64 = 'base64'#
- Braille = 'braille'#
- Ecoji = 'ecoji'#
- Hex = 'hex'#
- LeetSpeak = 'leet_speak'#
- MorseCode = 'morse_code'#
- NATO = 'nato'#
- QuotedPrintable = 'quoted_printable'#
- ROT13 = 'rot13'#
- UUencode = 'uuencode'#
- Zalgo = 'zalgo'#