Created
May 15, 2019 16:38
-
-
Save DamnedFacts/2e1ba1001f6c20ba46f837089b602a0d to your computer and use it in GitHub Desktop.
Revisions
-
DamnedFacts created this gist
May 15, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/sh TEMP="$1.$$.img" trap "rm -f $TEMP 2>/dev/null" 1 2 3 11 15 offset=`hexdump -s 0x158 -n 4 "$1" | head -1 | awk '{print $5 $4 $3 $2}'` offset512=`echo "obase=16; ibase=16; $offset / 200" | bc` ln "$1" "$TEMP" hdiutil attach "$TEMP" -nomount -section "0x$offset512" rm -f "$TEMP"