From 12989393311cdca62f376bea6883ee36e8fa43ac Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 17 Sep 2016 11:06:16 +0200 Subject: Add disk extraction tools --- extractAll.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 extractAll.sh (limited to 'extractAll.sh') diff --git a/extractAll.sh b/extractAll.sh new file mode 100755 index 0000000..6139475 --- /dev/null +++ b/extractAll.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +root=`dirname "$0"` +root=`realpath "$root"` + +while read -r F; do + base=`basename "$F"` + linear=`mktemp` + destdir="${base}.extracted" + echo "Extracting $F to $destdir" + $root/linearizeDisk.py "$F" "$linear" + $root/extractArchive.py -o "$destdir" "$linear" + pushd "$destdir" || continue + for G in ./*; do + echo "Converting $G to ${G}.txt" + $root/convertFileDs.py "$G" > "${G}.txt" || rm "${G}.txt" + done + popd + rm "$linear" +done + -- cgit v1.2.3