Skip to content

Instantly share code, notes, and snippets.

@matklad
Created May 10, 2021 20:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matklad/b971c2502d99b38fc3b54345902b9e9b to your computer and use it in GitHub Desktop.
Save matklad/b971c2502d99b38fc3b54345902b9e9b to your computer and use it in GitHub Desktop.
[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