Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 77 additions & 73 deletions doc/code/converters/0_converters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,79 +75,83 @@
"31 text text AtbashConverter\n",
"32 text text Base2048Converter\n",
"33 text text Base64Converter\n",
"34 text text BidiConverter\n",
"35 text text BifidConverter\n",
"36 text text BinAsciiConverter\n",
"37 text text BinaryConverter\n",
"38 text text BrailleConverter\n",
"39 text text CaesarConverter\n",
"40 text text CharNoiseConverter\n",
"41 text text CharSwapConverter\n",
"42 text text CharacterSpaceConverter\n",
"43 text text CodeAttackConverter\n",
"44 text text CodeChameleonConverter\n",
"45 text text ColloquialWordswapConverter\n",
"46 text text ColumnarTranspositionConverter\n",
"47 text text DecompositionConverter\n",
"48 text text DenylistConverter\n",
"49 text text DiacriticConverter\n",
"50 text text DigitBijectionConverter\n",
"51 text text EcojiConverter\n",
"52 text text EmojiConverter\n",
"53 text text FirstLetterConverter\n",
"54 text text FlipConverter\n",
"55 text text FullwidthConverter\n",
"56 text text IPAConverter\n",
"57 text text ImagePromptStyleConverter\n",
"58 text text InsertPunctuationConverter\n",
"59 text text JsonStringConverter\n",
"60 text text LLMGenericTextConverter\n",
"61 text text LeetspeakConverter\n",
"62 text text LetterBijectionConverter\n",
"63 text text LogicJailbreakConverter\n",
"64 text text MaliciousQuestionGeneratorConverter\n",
"65 text text MathObfuscationConverter\n",
"66 text text MathPromptConverter\n",
"67 text text MorseConverter\n",
"68 text text NatoConverter\n",
"69 text text NegationTrapConverter\n",
"70 text text NoiseConverter\n",
"71 text text PersuasionConverter\n",
"72 text text PinyinConverter\n",
"73 text text PolicyPuppetryConverter\n",
"74 text text PromptTemplateConverter\n",
"75 text text PuzzledConverter\n",
"76 text text ROT13Converter\n",
"77 text text RandomCapitalLettersConverter\n",
"78 text text RandomTranslationConverter\n",
"79 text text RepeatTokenConverter\n",
"80 text text RolePlayToolCallConverter\n",
"81 text text SATAMaskingConverter\n",
"82 text text ScientificTranslationConverter\n",
"83 text text SearchReplaceConverter\n",
"84 text text SelectiveTextConverter\n",
"85 text text SneakyBitsSmugglerConverter\n",
"86 text text StringJoinConverter\n",
"87 text text SuffixAppendConverter\n",
"88 text text SuperscriptConverter\n",
"89 text text TaskFramingConverter\n",
"90 text text TatweelConverter\n",
"91 text text TemplateSegmentConverter\n",
"92 text text TenseConverter\n",
"93 text text TextJailbreakConverter\n",
"94 text text TokenBijectionConverter\n",
"95 text text ToneConverter\n",
"96 text text ToxicSentenceGeneratorConverter\n",
"97 text text TranslationConverter\n",
"98 text text UnicodeConfusableConverter\n",
"99 text text UnicodeReplacementConverter\n",
"100 text text UnicodeSubstitutionConverter\n",
"101 text text UrlConverter\n",
"102 text text VariationConverter\n",
"103 text text VariationSelectorSmugglerConverter\n",
"104 text text VigenereConverter\n",
"105 text text ZalgoConverter\n",
"106 text text ZeroWidthConverter\n",
"34 text text BeaufortConverter\n",
"35 text text BidiConverter\n",
"36 text text BifidConverter\n",
"37 text text BinAsciiConverter\n",
"38 text text BinaryConverter\n",
"39 text text BrailleConverter\n",
"40 text text CaesarConverter\n",
"41 text text CharNoiseConverter\n",
"42 text text CharSwapConverter\n",
"43 text text CharacterSpaceConverter\n",
"44 text text CodeAttackConverter\n",
"45 text text CodeChameleonConverter\n",
"46 text text ColloquialWordswapConverter\n",
"47 text text ColumnarTranspositionConverter\n",
"48 text text DecompositionConverter\n",
"49 text text DenylistConverter\n",
"50 text text DiacriticConverter\n",
"51 text text DigitBijectionConverter\n",
"52 text text EcojiConverter\n",
"53 text text EmojiConverter\n",
"54 text text FirstLetterConverter\n",
"55 text text FlipConverter\n",
"56 text text FullwidthConverter\n",
"57 text text GronsfeldConverter\n",
"58 text text IPAConverter\n",
"59 text text ImagePromptStyleConverter\n",
"60 text text InsertPunctuationConverter\n",
"61 text text JsonStringConverter\n",
"62 text text LLMGenericTextConverter\n",
"63 text text LeetspeakConverter\n",
"64 text text LetterBijectionConverter\n",
"65 text text LogicJailbreakConverter\n",
"66 text text MaliciousQuestionGeneratorConverter\n",
"67 text text MathObfuscationConverter\n",
"68 text text MathPromptConverter\n",
"69 text text MorseConverter\n",
"70 text text NatoConverter\n",
"71 text text NegationTrapConverter\n",
"72 text text NoiseConverter\n",
"73 text text PersuasionConverter\n",
"74 text text PigpenConverter\n",
"75 text text PinyinConverter\n",
"76 text text PolicyPuppetryConverter\n",
"77 text text PortaConverter\n",
"78 text text PromptTemplateConverter\n",
"79 text text PuzzledConverter\n",
"80 text text ROT13Converter\n",
"81 text text RandomCapitalLettersConverter\n",
"82 text text RandomTranslationConverter\n",
"83 text text RepeatTokenConverter\n",
"84 text text RolePlayToolCallConverter\n",
"85 text text SATAMaskingConverter\n",
"86 text text ScientificTranslationConverter\n",
"87 text text SearchReplaceConverter\n",
"88 text text SelectiveTextConverter\n",
"89 text text SneakyBitsSmugglerConverter\n",
"90 text text StringJoinConverter\n",
"91 text text SuffixAppendConverter\n",
"92 text text SuperscriptConverter\n",
"93 text text TaskFramingConverter\n",
"94 text text TatweelConverter\n",
"95 text text TemplateSegmentConverter\n",
"96 text text TenseConverter\n",
"97 text text TextJailbreakConverter\n",
"98 text text TokenBijectionConverter\n",
"99 text text ToneConverter\n",
"100 text text ToxicSentenceGeneratorConverter\n",
"101 text text TranslationConverter\n",
"102 text text UnicodeConfusableConverter\n",
"103 text text UnicodeReplacementConverter\n",
"104 text text UnicodeSubstitutionConverter\n",
"105 text text UrlConverter\n",
"106 text text VariationConverter\n",
"107 text text VariationSelectorSmugglerConverter\n",
"108 text text VigenereConverter\n",
"109 text text ZalgoConverter\n",
"110 text text ZeroWidthConverter\n",
""
]
}
Expand Down
6 changes: 6 additions & 0 deletions doc/code/converters/1_text_to_text_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
AtbashConverter,
Base64Converter,
Base2048Converter,
BeaufortConverter,
BifidConverter,
BinaryConverter,
BinAsciiConverter,
Expand All @@ -60,10 +61,12 @@
ColumnarTranspositionConverter,
DigitBijectionConverter,
EcojiConverter,
GronsfeldConverter,
LetterBijectionConverter,
MorseConverter,
NatoConverter,
NegationTrapConverter,
PortaConverter,
ROT13Converter,
TokenBijectionConverter,
VigenereConverter,
Expand Down Expand Up @@ -91,6 +94,9 @@
print("Caesar:", await CaesarConverter(caesar_offset=3).convert_async(prompt=prompt)) # type: ignore
print("Atbash:", await AtbashConverter().convert_async(prompt=prompt)) # type: ignore
print("Vigenere:", await VigenereConverter(key="key").convert_async(prompt=prompt)) # type: ignore
print("Porta:", await PortaConverter(key="pyrit").convert_async(prompt=prompt)) # type: ignore
print("Gronsfeld:", await GronsfeldConverter().convert_async(prompt=prompt)) # type: ignore
print("Beaufort:", await BeaufortConverter(key="pyrit").convert_async(prompt=prompt)) # type: ignore
print("Bifid:", await BifidConverter().convert_async(prompt=prompt)) # type: ignore
print(
"ColumnarTransposition:",
Expand Down
4 changes: 2 additions & 2 deletions doc/scanner/garak.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@
"pyrit_scan run garak.encoding --target openai_chat --techniques base64 --max-total 1\n",
"```\n",
"\n",
"**Available techniques** (22 encodings): Base64, Base2048, Base16, Base32, ASCII85, Hex,\n",
"**Available techniques** (25 encodings): Base64, Base2048, Base16, Base32, ASCII85, Hex,\n",
"QuotedPrintable, UUencode, ROT13, Braille, Atbash, MorseCode, NATO, Ecoji, Zalgo, LeetSpeak,\n",
"AsciiSmuggler, Bifid, ColumnarTransposition, UbbiDubbi, Disemvowel, Pigpen\n",
"AsciiSmuggler, Bifid, ColumnarTransposition, UbbiDubbi, Disemvowel, Pigpen, Porta, Gronsfeld, Beaufort\n",
"\n",
"**Aggregate techniques:** `ALL` (every encoding, exhaustive) and `DEFAULT` (a broad curated subset\n",
"spanning every encoding family — base-N, byte-encodings, substitution ciphers, and symbolic\n",
Expand Down
4 changes: 2 additions & 2 deletions doc/scanner/garak.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
# pyrit_scan run garak.encoding --target openai_chat --techniques base64 --max-total 1
# ```
#
# **Available techniques** (22 encodings): Base64, Base2048, Base16, Base32, ASCII85, Hex,
# **Available techniques** (25 encodings): Base64, Base2048, Base16, Base32, ASCII85, Hex,
# QuotedPrintable, UUencode, ROT13, Braille, Atbash, MorseCode, NATO, Ecoji, Zalgo, LeetSpeak,
# AsciiSmuggler, Bifid, ColumnarTransposition, UbbiDubbi, Disemvowel, Pigpen
# AsciiSmuggler, Bifid, ColumnarTransposition, UbbiDubbi, Disemvowel, Pigpen, Porta, Gronsfeld, Beaufort
#
# **Aggregate techniques:** `ALL` (every encoding, exhaustive) and `DEFAULT` (a broad curated subset
# spanning every encoding family — base-N, byte-encodings, substitution ciphers, and symbolic
Expand Down
6 changes: 6 additions & 0 deletions pyrit/converter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from pyrit.converter.azure_speech_text_to_audio_converter import AzureSpeechTextToAudioConverter
from pyrit.converter.base64_converter import Base64Converter
from pyrit.converter.base2048_converter import Base2048Converter
from pyrit.converter.beaufort_converter import BeaufortConverter
from pyrit.converter.bidi_converter import BidiConverter
from pyrit.converter.bifid_converter import BifidConverter
from pyrit.converter.bijection_converter import (
Expand Down Expand Up @@ -64,6 +65,7 @@
from pyrit.converter.flip_converter import FlipConverter
from pyrit.converter.fullwidth_converter import FullwidthConverter
from pyrit.converter.grid_composite_converter import GridCompositeConverter
from pyrit.converter.gronsfeld_converter import GronsfeldConverter
from pyrit.converter.image_blur_converter import ImageBlurConverter
from pyrit.converter.image_color_saturation_converter import ImageColorSaturationConverter
from pyrit.converter.image_compression_converter import ImageCompressionConverter
Expand Down Expand Up @@ -94,6 +96,7 @@
from pyrit.converter.pigpen_converter import PigpenConverter
from pyrit.converter.pinyin_converter import PinyinConverter
from pyrit.converter.policy_puppetry_converter import PolicyPuppetryConverter, PolicyPuppetryTemplate
from pyrit.converter.porta_converter import PortaConverter
from pyrit.converter.prompt_template_converter import PromptTemplateConverter
from pyrit.converter.puzzled import PuzzledConverter, PuzzleType
from pyrit.converter.qr_code_converter import QRCodeConverter
Expand Down Expand Up @@ -173,6 +176,7 @@
"AzureSpeechTextToAudioConverter": "pyrit.converter.azure_speech_text_to_audio_converter",
"Base2048Converter": "pyrit.converter.base2048_converter",
"Base64Converter": "pyrit.converter.base64_converter",
"BeaufortConverter": "pyrit.converter.beaufort_converter",
"BidiConverter": "pyrit.converter.bidi_converter",
"BifidConverter": "pyrit.converter.bifid_converter",
"DigitBijectionConverter": "pyrit.converter.bijection_converter",
Expand Down Expand Up @@ -200,6 +204,7 @@
"FlipConverter": "pyrit.converter.flip_converter",
"FullwidthConverter": "pyrit.converter.fullwidth_converter",
"GridCompositeConverter": "pyrit.converter.grid_composite_converter",
"GronsfeldConverter": "pyrit.converter.gronsfeld_converter",
"ImageBlurConverter": "pyrit.converter.image_blur_converter",
"ImageColorSaturationConverter": "pyrit.converter.image_color_saturation_converter",
"ImageCompressionConverter": "pyrit.converter.image_compression_converter",
Expand Down Expand Up @@ -231,6 +236,7 @@
"PinyinConverter": "pyrit.converter.pinyin_converter",
"PolicyPuppetryConverter": "pyrit.converter.policy_puppetry_converter",
"PolicyPuppetryTemplate": "pyrit.converter.policy_puppetry_converter",
"PortaConverter": "pyrit.converter.porta_converter",
"PositionSelectionStrategy": "pyrit.converter.text_selection_strategy",
"PromptTemplateConverter": "pyrit.converter.prompt_template_converter",
"Converter": "pyrit.converter.converter",
Expand Down
Loading
Loading