BUG BinAsciiConverter UUencode output cannot be decoded when all words are converted
メンテナーはふだん 2 日以内に返信
関連するプルリクエストがすでにマージされています。
- #3249 @barkha1research-ai による — マージ済み
評価
調査の方向性
The bug is in BinAsciiConverter when encoding_func="UUencode" and all words are selected: per-word UU lines get joined with an empty string, so the lines run together. Run the reproduction script from the issue and check that binascii.a2b_uu fails on the output. Compare with the hex and quoted-printable fix referenced in #2651. Done means the output keeps line separators and decodes back to the original prompt. Linked PR #3249 already addresses this, so check it before starting.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
With encoding_func="UUencode" and the default all-words selection, BinAsciiConverter encodes each word as its own UU line, strips the line endings and joins the results with "". The separators are dropped and the lines run together, so the output is not valid UUencode and cannot be decoded back to the prompt. #2651 fixed the same separator problem for hex and quoted-printable and noted that UUencode was a separate issue.
Steps/Code to Reproduce
import asyncio
import binascii
from pyrit.converter import BinAsciiConverter
async def main():
converter = BinAsciiConverter(encoding_func="UUencode")
result = await converter.convert_async(prompt="hello world")
print(repr(result.output_text))
print(b"".join(binascii.a2b_uu(line) for line in result.output_text.splitlines()))
asyncio.run(main())
Expected Results
The output decodes back to b'hello world'.
Actual Results
'%:&5L;&\\ %=V]R;&0 '
binascii.Error: Trailing garbage
Versions
- PyRIT version: installed from main (
68487b2e) in editable mode - Python version: 3.12
I have a fix that keeps each encoded word and the encoded separator on their own lines, and would like to open a PR for it.
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 962
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 367
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG: label queries only return the final conversation of an attack対応中かも @u7k4rs6 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/PyRIT#3095 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
BUG: LeetspeakConverter ignores uppercase and multi-character custom_substitutions keys and fails on empty replacement lists対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: InsertPunctuationConverter accepts multi-character and empty punctuation_list entries対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: ColloquialWordswapConverter identifier ignores custom substitution values対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: MathObfuscation, NegationTrap, SelectiveText and Zalgo converter identifiers ignore settings that change output対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
bug Size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oposs/repo-infra#93 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
Graphify-Labs/graphify#4546 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
521xueweihan/HelloGitHub#4025 ·