Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#3,248 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@barkha1research-ai arbeitet bereits daran.

Seit 15.10.2026.

  • #3249 von @barkha1research-ai — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
tooling

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
4.6k
Forks
944
Ø Merge
2 T. 18 Std.
Gemergte PRs (30 T.)
358

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/PyRIT

Alle Issues in microsoft/PyRIT

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.