From a315b7b3b80c246dffe7a4f5239ac4b216356e49 Mon Sep 17 00:00:00 2001 From: Rokib Hasan Sagar <10854164+rokibhasansagar@users.noreply.github.com> Date: Mon, 31 May 2021 14:22:59 +0600 Subject: [PATCH] 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. --- dumper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dumper.sh b/dumper.sh index 7a1808d..d3d29a8 100755 --- a/dumper.sh +++ b/dumper.sh @@ -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"