cr-sc-dump icon indicating copy to clipboard operation
cr-sc-dump copied to clipboard

Failed to decrypt .sc file - Unknown Header exception

Open dancechart opened this issue 1 year ago • 6 comments
trafficstars

Tried via VSCode terminal py dumpsc.py C:\Users\Admin\Main\resources\assets\sc\boats.sc. Got Unknown Header exception. Adding --old doesn't change anything.

dancechart avatar Jun 05 '24 09:06 dancechart

Most likely that file does not contain assets. Please try a *_tex.sc file.

123456abcdef avatar Jun 05 '24 16:06 123456abcdef

Still shows the same exception, tried multiple *_tex.sc files... All libraries are downloaded, VSCode doesn't show any issues. cr-sc-dump-issue

That's what data[0], data[:2] and data[:4] contains when trying to read *_tex.sc file. cr-sc-dump-issue-1

For *.sc file output is different. cr-sc-dump-issue-2

Adding or removing --old doesn't affect that in both cases.

dancechart avatar Jun 12 '24 08:06 dancechart

@dancechart Which game do the files come from?

@CharlieeChaser The first sprite you attached does not match emotes_rascals_lovegum_dl.sc. You can extract the png from it using python dumpsc.py emotes_rascals_lovegum_dl.sc --old. To get an animated version you would need to parse the file further. After the image there is additional info in the file. I assume it tells you how to cut the sprites, rotate, transform, and overlap to get an animated image. sc_decode tried to parse these information. I don't know if there is public script you could use.

123456abcdef avatar Jun 14 '24 19:06 123456abcdef

@123456abcdef from Boom Beach. If you need an archive with all .sc files I could find there after unpacking an .apk, let me know.

dancechart avatar Jun 15 '24 20:06 dancechart

@dancechart Works just fine for me. If you look in <apk-root>/assets/fingerprint.json at the end of the file. sha: 4aac756f2f41dc68fd7552a91005f55065b6afd, version: 52.103.1. Is your version newer or older? sha1 of the file I used is 38ede3081542ecc02077b7301cbfbdb48c41e6d6 boats_tex.sc. First to bytes of the file should be 0x53 0x43 in hex or SC in ASCII. Seems to be not the case for your file.

@CharlieeChaser Getting the *_tex.sc files seems to me more complicated than running a Python script. Please try yourself using this script. I won't share copyrighted data.

123456abcdef avatar Jun 16 '24 13:06 123456abcdef

@123456abcdef my version is older, "sha":"9227415f159f7ff0ad1df05e03b172d1cc11227c","version":"50.101.1". Will try out the latest version, thank you for the help.

dancechart avatar Jun 27 '24 07:06 dancechart