Hacking NSP file viewer (to verify complete) in Windows?

UnT7oh

Well-Known Member
Newcomer
Joined
Mar 18, 2017
Messages
88
Trophies
0
XP
377
Country
United States
The way it works is that the nca files that are packed in nsps derive their name from their SHA256 checksum, therefore if the nca checksum matches the nca filename we can confirm file integrity for the essential nca files.

Checksums for the nsp itself (which is just a file container) are useless because it will vary depending on what tool was used to pack the nsp. For example some tools generate extra files (BBB) or generate xml files with different sizes. Verifying the essential nca files will do the job regardless of the source of the nsp.
 
Last edited by UnT7oh,
  • Like
Reactions: hippy dave

Garou

Well-Known Member
Member
Joined
Jan 13, 2015
Messages
1,213
Trophies
0
XP
1,667
Country
Garou, I love your description FAQ (nice cameo) lol
thanks for the tools both of you :)
from none, we will get 3 at once!

garou: there's no checksum or calculated data possible with nsp file? it's only checking parts length? it's a quick check, that's fine too.

I see rikikoo is doing the sha256 check, but I'm trying to find how to launch it, due to all the module dependencies.
I need to put all the "example" content into the parent folder? and I see I need the key files too.
no checksum because most issue with NSP files are incomplete download so what I did was verify the correct file size
although after second thought, I realized that this might not work with NSP downloaded using CDNSP because depends on how the NSP repack works, you could download a corrupted NCA but still got a valid NSP file
 
Last edited by Garou,

Rikikoo

Member
Newcomer
Joined
Aug 1, 2018
Messages
21
Trophies
0
Age
26
XP
246
Country
France
Use the CRC32 hashes from http://nswdb.com/ for known releases. If you're building files yourselves, the hash may change depending on your the cert you use. Unsure. But if your files are from BBB or other scene/p2p groups, hashes are on that site. It may help, a little.
An XCI is really not the same as an NSP.
The underlying file structure is an HFS0, when NSP is just a PFS0. And even if you mounted the XCI and only cared about the NCA's inside, they aren't the identical since they don't use the same encryption scheme.

Besides, data downloaded from the CDN does not chane depending on what cert you used to download it.
 

caitsith2

Well-Known Member
Member
Joined
Jan 16, 2004
Messages
350
Trophies
2
Age
43
Location
a secret location 93 million miles from the sun
Website
www.caitsith2.com
XP
2,476
Country
Canada
Also, the CRC32 may change depending on if the title key is present or not , whether or not all this extra .xml stuff is present or not, and even the order the content files are packed in, and whether or not update .nsps include the delta fragment updates.

The hashes on the .nca files themselves however are not going to change unless the download of said files is incomplete or corrupted.
 
Last edited by caitsith2,
  • Like
Reactions: 877

khuong

Well-Known Member
Member
Joined
Jul 18, 2018
Messages
1,542
Trophies
1
Age
44
XP
6,503
Country
Canada
An XCI is really not the same as an NSP.
The underlying file structure is an HFS0, when NSP is just a PFS0. And even if you mounted the XCI and only cared about the NCA's inside, they aren't the identical since they don't use the same encryption scheme.

Besides, data downloaded from the CDN does not chane depending on what cert you used to download it.

└──> pythac $ >> python verify_nsp.py
Traceback (most recent call last):
File "verify_nsp.py", line 3, in <module>
from print_meta import open_cnmt
ImportError: No module named print_meta


can't find that anywhere @Rikikoo
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Software update might improve it.