BUG BinAsciiConverter UUencode output cannot be decoded when all words are converted
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
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
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
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/PyRIT
-
BUG: label queries only return the final conversation of an attackForse già presa @u7k4rs6 l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
microsoft/PyRIT#3095 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
BUG Configuration keeps runtime-status errors after polling recoversForse già presa @joeyvictorino l’ha presa 6 giorni fa. ApertaBug: triage GUI help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
microsoft/PyRIT#2868 · 6 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targetsForse già presa @PranavD2905 l’ha presa oggi. Apertafeature-request help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
microsoft/PyRIT#3274 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
feature-request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di microsoft/PyRIT
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PolicyEngine/policyengine-us#10262 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
kellyjonbrazil/jc#788 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
`/search.json` ignores the documented `editions.sort` parameterForse già presa @PranavD2905 l’ha presa oggi. ApertaAffects: Server Good First Issue Module: Solr Needs: Triage Theme: Public APIs Theme: Search
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
internetarchive/openlibrary#13989 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug P2: misleading query
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
jeffknupp/association#478 ·