Skip to content

Instantly share code, notes, and snippets.

@hermanbanken
Last active September 6, 2015 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hermanbanken/e095aca2bd29c5b6f527 to your computer and use it in GitHub Desktop.
Save hermanbanken/e095aca2bd29c5b6f527 to your computer and use it in GitHub Desktop.
iPhone photos extract script
# Extract all photos from your unencrypted backup. Includes Whatsapp photo's and videos.
dir="name-of-backup-folder"
(IFS='
'
for file in `ls $dir`; do
out=$(cd $dir;file --mime-type $file);
if [[ $out == *"image/"* ]]; then
ext=`sed -e 's/.*image\/\(.*\)$/\1/g`;
cp "$dir"/"$file" "extract-tmp/"$file.$ext;
fi
done)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment