Add csplit file-write

Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
This commit is contained in:
LinuxSploit 2021-07-31 15:50:05 +05:00 committed by GitHub
parent 0b196471f8
commit 508f493cd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,13 @@ functions:
LFILE=file_to_read LFILE=file_to_read
csplit $LFILE 1 csplit $LFILE 1
cat xx01 cat xx01
file-write:
- description: Writes the data to `xx0file_to_write`. If needed, a different prefix can be specified with `-f` (instead of `xx`).
code: |
TF=$(mktemp)
echo "DATA" > $TF
LFILE=file_to_write
csplit -z -b "%d$LFILE" $TF 1
suid: suid:
- code: | - code: |
LFILE=file_to_read LFILE=file_to_read