Xpl0itU / WiiUDownloader

Allows to download encrypted wiiu files from nintendo's official servers
GNU General Public License v3.0
876 stars 24 forks source link

Decrypting error: "content not found" #94

Closed bhartshorn closed 7 months ago

bhartshorn commented 7 months ago

Hi there, thanks for a great software.

I'm unable to decrypt downloaded content, I get only a small dialog box stating "content not found". This happens whether I check the "Decrypt contents" box or run the decrypt from the tools menu. image

Running an updated Arch Linux and the latest AppImage. No relevant output when running from the terminal. Let me know any way I can help.

bhartshorn commented 7 months ago

Doing a little more troubleshooting, but I'm thinking it has something to do with the files being saved on an NTFS volume. WiiUDownloader seemingly has no problem writing to that drive, just decrypting.

Nope, I redownloaded the files to an EXT4 partition and see the same error. I did find the error message in decryption.go, and see what it's supposed to be doing, so I'm digging in a little bit.

Xpl0itU commented 7 months ago

What game and region?

bhartshorn commented 7 months ago

What game and region?

Same error with Pikmin 1, 2, and 3, all US releases.

Thanks for quick response!

bhartshorn commented 7 months ago

Turns out to be related to the capitlization of the downloaded files. I added a debug to the error message which just prints the file it's unable to find, it's looking for lowercase but the files are uppercase.

image

Edit: it's due to the following line, the format string %08x is using lowercase for the hex characters. A simple fix for my case is to use %08X to use uppercase. No idea if that breaks other cases though.

tmd.Contents[i].CIDStr = fmt.Sprintf("%08x", tmd.Contents[i].ID)

Edit 2: I made that change and recompiled, that does indeed solve my case! I'll leave it to you if that's the right way to handle the issue.

Xpl0itU commented 7 months ago

Fixed with v2.53