Update dumper.sh

- Unencrypted ozips are reconstructed as zip in the same directory with same basename.
  Dumper will try to get that file first, then search for unpacked encrypted ozip contents.
This commit is contained in:
Rokib Hasan Sagar 2021-05-31 14:22:59 +06:00 committed by GitHub
parent 1d5a0b579b
commit a315b7b3b8
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,10 +234,10 @@ if [[ $(head -c12 "${FILEPATH}" 2>/dev/null | tr -d '\0') == "OPPOENCRYPT!" ]] |
printf "Decrypting ozip And Making A Zip...\n"
python3 "${OZIPDECRYPT}" "${TMPDIR}"/"${FILE}"
mkdir -p "${INPUTDIR}" 2>/dev/null && rm -rf -- "${INPUTDIR:?}"/* 2>/dev/null
if [[ -d "${TMPDIR}"/out ]]; then
mv "${TMPDIR}"/out/* "${INPUTDIR}"/
elif [[ -f "${FILE%.*}".zip ]]; then
if [[ -f "${FILE%.*}".zip ]]; then
mv "${FILE%.*}".zip "${INPUTDIR}"/
elif [[ -d "${TMPDIR}"/out ]]; then
mv "${TMPDIR}"/out/* "${INPUTDIR}"/
fi
rm -rf "${TMPDIR:?}"/*
printf "Re-Loading The Decrypted Content.\n"