Homebrew .key files?

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
are you trying to run a PHP script through DOS ?
PHP is a website interpretation language, you need a web server, and load the page using http:// localhost/ path to your script.php
(or upload it to a remote webserver with php support)



He said he has all the needed files : game file (game.wud, it's the full disc iso ?), common.key, the title key.
But he doesn't know how to generate a title.key with the "title key".

I didn't do that for a very long time, but I barely remember creating an empty dummy file, and placing the title key at a specific position inside the title.key file

I can try to check what I have left on my computer and remember how it worked.
what is the password for wii u? I'm not sure if I'm getting the correct information.
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
1649089922212.png


both of these title keys show up as wrong according to the title key site.
 

Sheeba-

Well-Known Member
OP
Member
Joined
Apr 3, 2022
Messages
105
Trophies
0
Age
23
XP
344
Country
United States
are you trying to run a PHP script through DOS ?
PHP is a website interpretation language, you need a web server, and load the page using http:// localhost/ path to your script.php
(or upload it to a remote webserver with php support)



He said he has all the needed files : game file (game.wud, it's the full disc iso ?), common.key, the title key.
But he doesn't know how to generate a title.key with the "title key".

I didn't do that for a very long time, but I barely remember creating an empty dummy file, and placing the title key at a specific position inside the title.key file

I can try to check what I have left on my computer and remember how it worked.

edit:
You need to put the title's key inside a title.tik file
https://gbatemp.net/threads/cdecrypt-doesnt-decrypt.509517/#post-8227848

It seems I didn't give the location in this thread, it's in another castle thread :P

I don't know which tool he is using, maybe cdecrypt ?
If I remember, cdecrypt is used to convert WUD iso file to "file and folder" format (.app and .h3 files to be installed with WUP installer).
if you need to decrypt the app/h3 files to get the real game files (content/meta/code) that's another step you need to do.
or use another tool like JNUSTool

edit2 :
it's located at 0x1bf

https://gbatemp.net/threads/wii-u-python-one-liners-thread.400008/#post-5739356

Python script to generate the files

Code:
python -c "import binascii; open('disckey.bin', 'wb').write(binascii.unhexlify('<pasteyourkeyhereinbetweenthequotes>'.replace(' ','')))"

Code:
python -c "import binascii; open('title.tik', 'wb').write(b'\0'*0x1bf + binascii.unhexlify('<pasteyourkeyhereinbetweenthequotes>'.replace(' ','')))"

edit3 : more info here
https://gbatemp.net/threads/the-dif...-and-how-to-convert-them.449212/#post-6873621
I"m using wud2app and when I try to run the command it says Disc key size wrong! The command that I am using is wud2app.exe common.key game.key game.wud
 

V10lator

Well-Known Member
Member
Joined
Apr 21, 2019
Messages
2,664
Trophies
1
Age
36
XP
5,640
Country
Germany
sometime nintendo, sometime mypass
and sometimes "test", sometimes "1234567890", sometimes "Lucy131211", sometimes "fbf10", sometimes "5678", sometimes "1234" and sometimes even "".
Seriously: Just use NUSspli to generate the keys. It contains a password database for a reason... ;)

//EDIT: @godreborn That PHP script you try to run isn't meaned to get run but for other devs to take it as a ground to start cleanroom implementations of this algorithm in other languages, like this: https://github.com/V10lator/NUSspli/blob/master/src/keygen.c
 
Last edited by V10lator,
  • Like
Reactions: Cyan

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
and sometimes "test", sometimes "1234567890", sometimes "Lucy131211", sometimes "fbf10", sometimes "5678", sometimes "1234" and sometimes even "".
Seriously: Just use NUSspli to generate the keys. It contains a password database for a reason... ;)
I'm trying to figure out how this script works, so I put in all of that, and it's still wrong. :(

1649110031141.png
 

V10lator

Well-Known Member
Member
Joined
Apr 21, 2019
Messages
2,664
Trophies
1
Age
36
XP
5,640
Country
Germany
it's still wrong. :(
Probably cause the PHP script is missing the last step of encrypting the generated key with the Wii U common key. Again: That PHP script is meaned to show you how it needs to be done so you can start thinkering, not to thinker for you... It's meaned for devs, not for end users.
 
  • Like
Reactions: godreborn

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
I"m using wud2app and when I try to run the command it says Disc key size wrong! The command that I am using is wud2app.exe common.key game.key game.wud
You probably put the key number in a .txt file and renamed it to .key ?

the key is probably expected in binary format.
open your hexeditor, create a new empty file, paste the key in the binary area (not in the ASCII part).
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
@Cyan , I was aware that php was a browser based script, but when I tried it with this script from @V10lator , it didn't work, so I put the php.exe in environmental variables from xampp. this did work. it downloaded almost 3,000 files through cmd prompt, but all of them were 0KBs, no idea why. they were the tmd files. this took about an hour to identify all of them, so I assume that's all the unique games that exist for the wii u.
 
  • Like
Reactions: Cyan

Sheeba-

Well-Known Member
OP
Member
Joined
Apr 3, 2022
Messages
105
Trophies
0
Age
23
XP
344
Country
United States
You probably put the key number in a .txt file and renamed it to .key ?

the key is probably expected in binary format.
open your hexeditor, create a new empty file, paste the key in the binary area (not in the ASCII part).
I opened a new file in hex editor and but the game key in it. I named the file game.key I did not put the key in a .txt file then renamed it.
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
iirc, wud files are all around the same size, like 23.9GBs or so. it's probably to the byte, so if it's coming up short, could be a bad dump. wux files are compressed versions, so those will likely have all different sizes.
 

dojafoja

life elevated
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,610
Country
The problem is that you have WUD files, which represent a 1:1 image of the retail disc. Titlekeys as most people know them relate to the titles contents. The wud2app utility can easily extract the encrypted Titlekey from the disc, so that is not what you need. What you need is the disc key, which is sometimes confusingly referred to as the wud Titlekey. You need the disc key because you have a disc image which has the SI partition encrypted. You need to provide this disc key so the SI partition can be decrypted and Wud2app will extract the actual title key in order to decrypt the titles contents.

For what it's worth, I wrote a Python implementation of the leaked PHP script to generate title keys:
https://gbatemp.net/threads/release-kii-u-generator.566930/

Unfortunately this won't help with wud files, as I mentioned above
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
you can use uwizard to know, at least, if the wud key is correct. it will use its sha-1 iirc to tell you if it's correct.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BigOnYa @ BigOnYa: I'm starting to sound like a Tck