bartlomiejduda / JSC-PyDecrypt-Tool

Tool for decrypting JSC files from Cocos2d games
GNU General Public License v3.0
15 stars 9 forks source link

Invalid encryption key #1

Closed heliocosta-dev closed 1 month ago

heliocosta-dev commented 1 month ago

Hey there. I'm trying to decompile the attached jsc file. I got the decryption key from inspecting the APK in IDA so I'm confused what could be the cause for the error ERROR - WRONG_KEY: Invalid encryption key.

Key: 12aa03kk-110e-h

jsc.zip

Thanks in advance.

bartlomiejduda commented 1 month ago

What is the name of the game? What is the game package name?

heliocosta-dev commented 1 month ago

Thanks for the quick reply. com.opt.supremapoker

bartlomiejduda commented 1 month ago

Ok, I've spent some time on this isssue. First, I've used Frida and my XXTEA script https://github.com/bartlomiejduda/Tools/blob/master/NEW%20Tools/Cocos2d/cocos2d_xxtea_script.js to get the valid key with this command:

frida -U -l cocos2d_xxtea_script.js -f com.opt.supremapoker

Turns out the valid key is D7tuZBWOxMMeGbb

Unfortunately, getting the key was not enough to decrypt JSC files. I've used this key on every JSC file available in this game like jsb_polyfill.jsc, notepack.jsc, pomelo-cocos2d-js.jsc etc. but none of them seems to decrypt correctly with this key.

So my guess is that this specific app Suprema Poker v1.36 (com.opt.supremapoker) uses additional layer of encryption for JSC files. You need to figure out decrypting method for this additional protection and only then you will be able to use my tool.