force to read last line of encrypted file
This commit is contained in:
parent
d25fc4b5c8
commit
6839809335
2
ocdec.sh
2
ocdec.sh
@ -130,7 +130,7 @@ function decryptFile() {
|
|||||||
# --- Decrypt the file ---
|
# --- Decrypt the file ---
|
||||||
# OC writes the encrypted file in 8K chunks, each containing it's own iv in the end
|
# OC writes the encrypted file in 8K chunks, each containing it's own iv in the end
|
||||||
chunkSize=8192
|
chunkSize=8192
|
||||||
while read -d '' -n $chunkSize CHUNK; do
|
while read -d '' -n $chunkSize CHUNK || [ -n "$CHUNK" ]; do
|
||||||
#split chunk into payload an iv string (strip padding from iv)
|
#split chunk into payload an iv string (strip padding from iv)
|
||||||
read payload iv <<<`echo $CHUNK | sed -r 's/(.*)00iv00(.{16})xx/\1 \2/'`
|
read payload iv <<<`echo $CHUNK | sed -r 's/(.*)00iv00(.{16})xx/\1 \2/'`
|
||||||
# convert base64 iv into hex
|
# convert base64 iv into hex
|
||||||
|
Loading…
Reference in New Issue
Block a user