Last active 1670069776

Linux .3ds decrypt

Alyssa Smith revised this gist 1618212150. Go to revision

1 file changed, 24 insertions

tdsdec.sh(file created)

@@ -0,0 +1,24 @@
1 + #!/bin/bash -x
2 + # https://gbatemp.net/download/batch-cia-3ds-decryptor.35098/
3 + # adapted from the .bat file in this zip
4 + # requires wine
5 + # intended for e.g Homebrew.Game.Title/asdf.rar, produces Homebrew.Game.Title.3ds as decrypted output
6 + _PWD=$(pwd)
7 + DECRYPTPATH=/root
8 + cd "$1"
9 + unrar -o+ x $(find . -name *.rar | head -n1)
10 + echo | wine $DECRYPTPATH/decrypt.exe *.3ds
11 + cd $DECRYPTPATH
12 + >/dev/null ls *.Main.ncch && arg="-i $(ls *.Main.ncch):0:0"
13 + >/dev/null ls *.Manual.ncch && arg="$arg -i $(ls *.Manual.ncch):1:1"
14 + >/dev/null ls *.DownloadPlay.ncch && arg="$arg -i $(ls *.DownloadPlay.ncch):2:2"
15 + >/dev/null ls *.Partition4.ncch && arg="$arg -i $(ls *.Partition4.ncch):3:3"
16 + >/dev/null ls *.Partition5.ncch && arg="$arg -i $(ls *.Partition5.ncch):4:4"
17 + >/dev/null ls *.Partition6.ncch && arg="$arg -i $(ls *.Partition6.ncch):5:5"
18 + >/dev/null ls *.N3DSUpdateData.ncch && arg="$arg -i $(ls *.N3DSUpdateData.ncch):6:6"
19 + >/dev/null ls *.UpdateData.ncch && arg="$arg -i $(ls *.UpdateData.ncch):7:7"
20 + echo $arg
21 + wine $DECRYPTPATH/makerom.exe -f cci -ignoresign -target p -o "$_PWD/$1.3ds" $arg
22 + rm *.ncch
23 + cd $_PWD
24 + test "$1.3ds" && rm "$1"/*.3ds
Newer Older