BUG BinAsciiConverter UUencode output cannot be decoded when all words are converted
Los mantenedores suelen responder en 2 días
Ya se ha fusionado un pull request relacionado.
- #3249 de @barkha1research-ai — fusionado
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 4.6k
- Forks
- 962
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 367
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PyRIT
-
BUG: label queries only return the final conversation of an attackPosiblemente ocupada @u7k4rs6 la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
microsoft/PyRIT#3095 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
BUG: LeetspeakConverter ignores uppercase and multi-character custom_substitutions keys and fails on empty replacement listsPosiblemente ocupada @ShivamSharma43 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
Los mantenedores suelen responder en 2 días
-
BUG: InsertPunctuationConverter accepts multi-character and empty punctuation_list entriesPosiblemente ocupada @ShivamSharma43 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
Los mantenedores suelen responder en 2 días
-
BUG: ColloquialWordswapConverter identifier ignores custom substitution valuesPosiblemente ocupada @ShivamSharma43 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
Los mantenedores suelen responder en 2 días
-
BUG: MathObfuscation, NegationTrap, SelectiveText and Zalgo converter identifiers ignore settings that change outputPosiblemente ocupada @ShivamSharma43 la tomó hace 1 día. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/PyRIT
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
521xueweihan/HelloGitHub#4025 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
aws-samples/sample-per-model-bedrock#321 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
FavioVazquez/showtime#101 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
koush/ha_scrypted#81 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
google/osv-scanner-action#147 ·