rendered paste body#!/bin/sh# =====# Done by cyt0plasDIR=$1TMPDIR=`mktemp -d XXXXXX`find "${DIR}" -type f -exec cp {} ${TMPDIR} \;mkdir -p outcd ${TMPDIR}# Extract the manifestcat Manifest.plist | awk '/<data>/,/<\/data>/ { print $1 }' | grep -v \< | tail -n +3 > manifest.tmpopenssl enc -d -base64 < manifest.tmp > manifest.xmlplutil -convert xml1 manifest.xmlmv manifest.xml ../outrm manifest.tmpfor BACKUP in *.mdbackup; do plutil -convert xml1 ${BACKUP}; FILE=`cat ${BACKUP} | awk '/<string>/,/<\/string>/ { print $1 }' | grep -v 1.0 | sed 's/<string>//g' | sed 's/<\/string>//g'` echo "Extracting ${FILE}" # Make sure the directory exists SPATH=`dirname ${FILE}` mkdir -p ../out/${SPATH} cat ${BACKUP} | awk '/<data>/,/<\/data>/ { print $1 }' | grep -v \< > ../out/file.tmp openssl enc -d -base64 < ../out/file.tmp > ../out/${FILE}done# Cleanupcd ..rm -rf "${TMPDIR}"rm -rf out/file.tmp