4 echo "Usage: pupexplode <pup> <out_dir>"
5 echo "pupexplode expands all important files in a PUP and tries to decrypt every file as a self"
12 pupunpack
$pup $outdir ||
exit
18 tar xvf ..
/update_files.
tar ||
exit
20 for f
in dev_flash
*; do
21 unpkg
$f ${f}_unpkg ||
exit
22 tar xvf
${f}_unpkg
/content ||
exit
27 if [[ $f == "CORE_OS_PACKAGE.pkg" ]]; then
28 cosunpkg CORE_OS_PACKAGE
/content CORE_OS_PACKAGE
/
33 for f
in $
(find .
-type f
-print0); do
34 if readself
$f &> /dev
/null
; then
35 print
-n "Unselfing $f... "
36 if unself
$f ${f}.elf
&> /dev
/null
; then