Skip to content
Open
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
148 changes: 75 additions & 73 deletions doc/code/converters/0_converters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,79 +75,81 @@
"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 Base91Converter\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 IPAConverter\n",
"58 text text ImagePromptStyleConverter\n",
"59 text text InsertPunctuationConverter\n",
"60 text text JsonStringConverter\n",
"61 text text LLMGenericTextConverter\n",
"62 text text LeetspeakConverter\n",
"63 text text LetterBijectionConverter\n",
"64 text text LogicJailbreakConverter\n",
"65 text text MaliciousQuestionGeneratorConverter\n",
"66 text text MathObfuscationConverter\n",
"67 text text MathPromptConverter\n",
"68 text text MorseConverter\n",
"69 text text NatoConverter\n",
"70 text text NegationTrapConverter\n",
"71 text text NoiseConverter\n",
"72 text text PersuasionConverter\n",
"73 text text PigpenConverter\n",
"74 text text PinyinConverter\n",
"75 text text PolicyPuppetryConverter\n",
"76 text text PromptTemplateConverter\n",
"77 text text PuzzledConverter\n",
"78 text text ROT13Converter\n",
"79 text text RandomCapitalLettersConverter\n",
"80 text text RandomTranslationConverter\n",
"81 text text RepeatTokenConverter\n",
"82 text text RolePlayToolCallConverter\n",
"83 text text SATAMaskingConverter\n",
"84 text text ScientificTranslationConverter\n",
"85 text text SearchReplaceConverter\n",
"86 text text SelectiveTextConverter\n",
"87 text text SneakyBitsSmugglerConverter\n",
"88 text text StringJoinConverter\n",
"89 text text SuffixAppendConverter\n",
"90 text text SuperscriptConverter\n",
"91 text text TaskFramingConverter\n",
"92 text text TatweelConverter\n",
"93 text text TemplateSegmentConverter\n",
"94 text text TenseConverter\n",
"95 text text TextJailbreakConverter\n",
"96 text text TokenBijectionConverter\n",
"97 text text ToneConverter\n",
"98 text text ToxicSentenceGeneratorConverter\n",
"99 text text TranslationConverter\n",
"100 text text UnicodeConfusableConverter\n",
"101 text text UnicodeReplacementConverter\n",
"102 text text UnicodeSubstitutionConverter\n",
"103 text text UrlConverter\n",
"104 text text VariationConverter\n",
"105 text text VariationSelectorSmugglerConverter\n",
"106 text text VigenereConverter\n",
"107 text text ZalgoConverter\n",
"108 text text ZeroWidthConverter\n",
""
]
}
Expand Down
3 changes: 3 additions & 0 deletions doc/code/converters/1_text_to_text_converters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"ROT13: text: gryy zr ubj gb phg qbja n gerr\n",
"Base64: text: dGVsbCBtZSBob3cgdG8gY3V0IGRvd24gYSB0cmVl\n",
"Base2048: text: ԽțƘΕฦ৩ଌဦǃଞ൪ഹыŁ৷ဦԊÕϐ࿌Dzȥ\n",
"Base91: text: fPwJ/Wwe#F!&WF<oUBUf][TX2$g%9MjL^zmfZ\n",
"Binary: text: 0000000001110100 0000000001100101 0000000001101100 0000000001101100 0000000000100000 0000000001101101 0000000001100101 0000000000100000 0000000001101000 0000000001101111 0000000001110111 0000000000100000 0000000001110100 0000000001101111 0000000000100000 0000000001100011 0000000001110101 0000000001110100 0000000000100000 0000000001100100 0000000001101111 0000000001110111 0000000001101110 0000000000100000 0000000001100001 0000000000100000 0000000001110100 0000000001110010 0000000001100101 0000000001100101\n",
"BinAscii: text: 74656C6C206D6520686F7720746F2063757420646F776E20612074726565\n",
"Morse: text: - . .-.. .-.. / -- . / .... --- .-- / - --- / -.-. ..- - / -.. --- .-- -. / .- / - .-. . .\n",
Expand Down Expand Up @@ -116,6 +117,7 @@
" AskToDecodeConverter,\n",
" AtbashConverter,\n",
" Base64Converter,\n",
" Base91Converter,\n",
" Base2048Converter,\n",
" BifidConverter,\n",
" BinaryConverter,\n",
Expand Down Expand Up @@ -148,6 +150,7 @@
"print(\"ROT13:\", await ROT13Converter().convert_async(prompt=prompt)) # type: ignore\n",
"print(\"Base64:\", await Base64Converter().convert_async(prompt=prompt)) # type: ignore\n",
"print(\"Base2048:\", await Base2048Converter().convert_async(prompt=prompt)) # type: ignore\n",
"print(\"Base91:\", await Base91Converter().convert_async(prompt=prompt)) # type: ignore\n",
"print(\"Binary:\", await BinaryConverter().convert_async(prompt=prompt)) # type: ignore\n",
"print(\"BinAscii:\", await BinAsciiConverter().convert_async(prompt=prompt)) # type: ignore\n",
"print(\"Morse:\", await MorseConverter().convert_async(prompt=prompt)) # type: ignore\n",
Expand Down
2 changes: 2 additions & 0 deletions doc/code/converters/1_text_to_text_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
AskToDecodeConverter,
AtbashConverter,
Base64Converter,
Base91Converter,
Base2048Converter,
BifidConverter,
BinaryConverter,
Expand Down Expand Up @@ -84,6 +85,7 @@
print("ROT13:", await ROT13Converter().convert_async(prompt=prompt)) # type: ignore
print("Base64:", await Base64Converter().convert_async(prompt=prompt)) # type: ignore
print("Base2048:", await Base2048Converter().convert_async(prompt=prompt)) # type: ignore
print("Base91:", await Base91Converter().convert_async(prompt=prompt)) # type: ignore
Comment thread
romanlutz marked this conversation as resolved.
Resolved
print("Binary:", await BinaryConverter().convert_async(prompt=prompt)) # type: ignore
print("BinAscii:", await BinAsciiConverter().convert_async(prompt=prompt)) # type: ignore
print("Morse:", await MorseConverter().convert_async(prompt=prompt)) # type: ignore
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** (23 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, Base91, ColumnarTransposition, UbbiDubbi, Disemvowel, Pigpen\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** (23 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, Base91, ColumnarTransposition, UbbiDubbi, Disemvowel, Pigpen
#
# **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
2 changes: 2 additions & 0 deletions pyrit/converter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from pyrit.converter.azure_speech_audio_to_text_converter import AzureSpeechAudioToTextConverter
from pyrit.converter.azure_speech_text_to_audio_converter import AzureSpeechTextToAudioConverter
from pyrit.converter.base64_converter import Base64Converter
from pyrit.converter.base91_converter import Base91Converter
from pyrit.converter.base2048_converter import Base2048Converter
from pyrit.converter.bidi_converter import BidiConverter
from pyrit.converter.bifid_converter import BifidConverter
Expand Down Expand Up @@ -173,6 +174,7 @@
"AzureSpeechTextToAudioConverter": "pyrit.converter.azure_speech_text_to_audio_converter",
"Base2048Converter": "pyrit.converter.base2048_converter",
"Base64Converter": "pyrit.converter.base64_converter",
"Base91Converter": "pyrit.converter.base91_converter",
Comment thread
romanlutz marked this conversation as resolved.
Resolved
"BidiConverter": "pyrit.converter.bidi_converter",
"BifidConverter": "pyrit.converter.bifid_converter",
"DigitBijectionConverter": "pyrit.converter.bijection_converter",
Expand Down
Loading
Loading