Skip to content

Instantly share code, notes, and snippets.

@matklad

matklad/shellcode Secret

Created May 10, 2021
Embed
What would you like to do?
[matklad@moby:~/tmp]$ export FOO="; echo 'pwnd'"
(tmp)
[matklad@moby:~/tmp]$ ls $FOO
ls: cannot access ';': No such file or directory
ls: cannot access 'echo': No such file or directory
ls: cannot access "'pwnd'": No such file or directory
(tmp)
[matklad@moby:~/tmp]$ ls "$FOO"
ls: cannot access '; echo '\''pwnd'\''': No such file or directory
(tmp)
[matklad@moby:~/tmp]$ zxpy
zxpy shell
Python 3.7.9 (default, Aug 15 2020, 06:36:35)
[GCC 10.2.0]
>>> foo = "; echo 'pwnd'"
>>> ~f"ls {foo}"
bin
hello
include
lib
lib64
main.rs
pyvenv.cfg
s
pwnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment