Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#3,248 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@barkha1research-ai ci sta già lavorando.

Dal 15/10/2026.

  • #3249 di @barkha1research-ai — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
4.6k
Fork
944
Merge medio
2g 18h
PR unite (30g)
358

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/PyRIT

Tutte le issue di microsoft/PyRIT

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.