Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

BUG BinAsciiConverter UUencode output cannot be decoded when all words are converted

クローズ
#3,248 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #3249 @barkha1research-ai による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

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 の本文から書いたものです。

説明

Bug: triage
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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/PyRIT のほかの issue

microsoft/PyRIT の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。