Hacking [Release] PlaiCDN: Download and create installable CIAs (or .3ds) with just a title ID and titlekey

FTRBND

Waifu
Member
Joined
Apr 3, 2016
Messages
564
Trophies
0
XP
440
Country
Saint Kitts and Nevis
Every single time I try to run either the .exe or .py (I got python 3 installed), it automatically closes.

iAqu6y2.png

No error whatsoever.
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,077
Country
United States
Well I do have a decTitleKeys.bin
Ok? Double clicking the script or EXE isn't going to do anything other than display the usage of the script. It's essentially saying "hey asshole, you have to supply something to me for me to work". I take it you're not very familiar with CLI programs.

Code:
python3 plaicdn.py -deckey decTitleKeys.bin
The binary has to be in the same folder as the script, by the way.
 

redunka

Well-Known Member
Member
Joined
Nov 26, 2014
Messages
440
Trophies
0
Age
29
XP
2,611
Country
Russia
Good news about DSiWare: latest makerom compiled from source actually can build DSiWare CIA's.
I'm glad I was wrong and it has been fixed. Latest makerom can be found somewhere in AuReiNand thread.
Well, PlaiCDN script doesn't support DSiWare CIA packing yet, but I believe it can be easily fixed. ^^

Here's how you can create DSiWare cia manually:
As always, feed PlaiCDN titleID and title key of DSiWare,
let it download and decrypt content then use makerom to build cia.
Example for Zelda 4 Swords EUR:
makerom -f cia -srl 00000001.dec -major 0 -minor 1 -micro 0 -o 000480044b513956.cia

Most of DSiWare's probably won't require major/minor/micro option.
Also, there's a problem with "3DS exclusive" DSiWare's (Advance Wars and WarioWare), unlike regular DSiWare
they contain both SRL and NCCH (manual). Makerom can build them only with manual excluded.
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,747
Trophies
2
XP
8,610
Country
Tuvalu
Good news about DSiWare: latest makerom compiled from source actually can build DSiWare CIA's.
I'm glad I was wrong and it has been fixed. Latest makerom can be found somewhere in AuReiNand thread.
Well, PlaiCDN script doesn't support DSiWare CIA packing yet, but I believe it can be easily fixed. ^^

Here's how you can create DSiWare cia manually:
As always, feed PlaiCDN titleID and title key of DSiWare,
let it download and decrypt content then use makerom to build cia.
Example for Zelda 4 Swords EUR:
makerom -f cia -srl 00000001.dec -major 0 -minor 1 -micro 0 -o 000480044b513956.cia

Most of DSiWare's probably won't require major/minor/micro option.
Also, there's a problem with "3DS exclusive" DSiWare's (Advance Wars and WarioWare), unlike regular DSiWare
they contain both SRL and NCCH (manual). Makerom can build them only with manual excluded.
nice to see that makerom got a little better - but for eshop content i can only recommend makecdncia, it just works for everything :)
and, people were making dsiware cias from old dsiware dumped from their actual dsi before this update to makerom, so, i guess it you could do what they were doing.
but yeah you guys who like makerom don't need another tool! :)
 

redunka

Well-Known Member
Member
Joined
Nov 26, 2014
Messages
440
Trophies
0
Age
29
XP
2,611
Country
Russia
nice to see that makerom got a little better - but for eshop content i can only recommend makecdncia, it just works for everything :)
and, people were making dsiware cias from old dsiware dumped from their actual dsi before this update to makerom, so, i guess it you could do what they were doing.
but yeah you guys who like makerom don't need another tool! :)
Yeah, it was possible to pack dsi srl's into cia with make_cia tool.
Still good that makerom can do it too now, no need to keep extra tool just for dsiware. ^_^
 
  • Like
Reactions: cearp

pikatsu

Well-Known Member
Member
Joined
Apr 16, 2014
Messages
845
Trophies
1
Age
39
XP
1,175
Country
Argentina
Alright, here we go. I'm not forking this on Github because it's literally thrown together from bits and pieces and heavy deletions from the original PlaiCDN script. There's probably a lot of cleanup to be done but I wanted to put this out there so people could use it.

validate_keys.py
Usage: validate_keys <options>

No Options : parses decTitleKeys.bin for valid title keys and outputs encrypted keys to screen
-checkall : adds system titles to the output
-csv : generates a titles.csv file in same directory
-help : displays this text

If you'd like to save the screen output to a file then add " > file.txt" to the end of the command like this:
validate_keys.py -csv > titles.txt

The CSV file may be imported into Excel or Google Spreadsheet (does not work well in Numbers)

Requirements: Similar to PlaiCDN, you need Python3, PyCrypto, ctr-common-1.crt, ctr-common-1.key and you also need BOTH decTitleKeys.bin and encTitleKeys.bin. You can dump them both from the latest compile of Decrypt9 or if you have one you can also generate the other with Decrypt9.

@cearp I found the Region detection by product code, however I can't get rid of the for loop that checks all the ninja servers since additional information comes from there such as publisher, version, file size and the product code itself. I still implemented a new region detector that helps properly identify region-free games that were identifying as EUR for some reason.

I have downloaded ctr-common-1.crt, ctr-common-1.key from PlaiCDN github, installed Python3, PyCrypto and have both decTitleKeys.bin and encTitleKeys.bin from that key database but the script shows no result. Any idea?
 

Attachments

  • 2222.PNG
    2222.PNG
    3.8 KB · Views: 250
  • 3333.PNG
    3333.PNG
    1.9 KB · Views: 224
  • 1111.PNG
    1111.PNG
    2 KB · Views: 228

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
I have downloaded ctr-common-1.crt, ctr-common-1.key from PlaiCDN github, installed Python3, PyCrypto and have both decTitleKeys.bin and encTitleKeys.bin from that key database but the script shows no result. Any idea?
Your ctr-common-1.crt file has a .txt extension on it that's hidden. Try re-downloading it or show file extensions and remove the .txt or run this from command prompt: REN crt-common-1.crt.txt crt-common-1.crt

Also, this release is a little old. What function interests you the most, as there may be a better tool out now for it.
 

SirByte

Well-Known Member
Member
Joined
Dec 30, 2012
Messages
524
Trophies
1
XP
1,059
Country
Canada
If you go to "that key database" site, you can see several USA entries that have a decrypted title key, but the encrypted title key is blank. Which is strange if you can trivially get the encrypted title key from the decrypted one. Is there a better tool out (that will show you the key in text)?
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
If you go to "that key database" site, you can see several USA entries that have a decrypted title key, but the encrypted title key is blank. Which is strange if you can trivially get the encrypted title key from the decrypted one. Is there a better tool out (that will show you the key in text)?
Rather than downloading the encTitleKey.bin file from that site, instead download only the split encTitleKeys.bin's and convert it yourself on Decrypt9 to get the missing keys. Then you may use the script quoted above or PlaiCDN to get all the info. (hint, if you use PlaiCDN's -deckey option with an encTitleKeys.bin file that's been renamed to decTitleKeys.bin, it will still output the TitleID and Encrypted Key)
 
  • Like
Reactions: SirByte

pikatsu

Well-Known Member
Member
Joined
Apr 16, 2014
Messages
845
Trophies
1
Age
39
XP
1,175
Country
Argentina
Your ctr-common-1.crt file has a .txt extension on it that's hidden. Try re-downloading it or show file extensions and remove the .txt or run this from command prompt: REN crt-common-1.crt.txt crt-common-1.crt

Also, this release is a little old. What function interests you the most, as there may be a better tool out now for it.

Thanks, I see. By the way the better tool is that ticketparser?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: fuckin heavy storm over here