ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Sep 23, 2017 8:07 pm

All times are UTC




Post new topic  Reply to topic  [ 221 posts ]  Go to page Previous 1 2 3 4 5 612 Next
Author Message
PostPosted: Wed Dec 28, 2016 1:02 am 

Joined: Tue Nov 22, 2016 9:25 pm
Posts: 19
The tutorial video for the .sc files decryption is up! https://youtu.be/oqnG9nuDV6I



P.S. : The .csv files decryption video will be posted soon! Subscribe to stay updated.


Top
   
PostPosted: Sat Jan 07, 2017 3:02 pm 

Joined: Fri Oct 28, 2016 9:54 am
Posts: 11
CamC999 wrote:
The tutorial video for the .sc files decryption is up! https://youtu.be/oqnG9nuDV6I
P.S. : The .csv files decryption video will be posted soon! Subscribe to stay updated.


Unfortunately the video got took down by "Supercell Oy", could you send the vid as an mp4 plz? Thx. (You could also re-upload the video and make it a private vid with only the ppl with the link that can have access to it)


Top
   
PostPosted: Mon Jan 09, 2017 8:52 pm 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
CamC999 wrote:
barbossa42 wrote:
It is VERY unlikely that the client (CR app) would accept modified resource files, since it validates their hash against the server.
Now, if there were some alternative server around, like the Ultrapowa Clash Server, it wouldn't be hard to reverse the process: change the textures, update the texture map if necessary, save a stream of pixels in the correct format, compress with LZMA and remove a part of the header, so the file would behave just like CR's .sc files.
Also, I'm not the creator of dumpsc, just fixed a bug ;-)


So I found that the .sc files have a fingerprint and hash on them, not allowing you to edit them, however, the _tex.sc files don't. I was able to replace the chr_princess_tex.sc with chr_electro_wiz_tex.sc and it worked using filza on jailbreak. The problem is that the normal .sc files can't be changed, so it ends up trying to perform an animation meant for the princess texture, on the electro wizard, making the textures offset and out of place.

I am trying to find a way to use LZMA and the dumpsc.py script to reencrypt edited .png files that will save them as the correct encrypted .sc files. Do you know enough about the script to reverse the process? :?


So did you find a script that reverse the process ?


Top
   
PostPosted: Mon Jan 09, 2017 8:54 pm 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
barbossa42 wrote:
CamC999 wrote:
So I found that the .sc files have a fingerprint and hash on them, not allowing you to edit them, however, the _tex.sc files don't. I was able to replace the chr_princess_tex.sc with chr_electro_wiz_tex.sc and it worked using filza on jailbreak. The problem is that the normal .sc files can't be changed, so it ends up trying to perform an animation meant for the princess texture, on the electro wizard, making the textures offset and out of place.

I am trying to find a way to use LZMA and the dumpsc.py script to reencrypt edited .png files that will save them as the correct encrypted .sc files. Do you know enough about the script to reverse the process? :?


As I said before, the reverse process is relatively simple. Unfortunately I'm a bit busy at work to code it, but here is an outline:

0- Change your PNG file as wished; to keep it simple, keep the image dimensions the same.

1- Load the image using PIL/pillow, convert it to an 1D array of pixels, encoded as 4 bytes per pixel (RGBA)
2- Write the header:
2.1- byte 0 is 0x01
2.2- bytes 1-4 should be the number of pixels * the number of bytes per pixel (4), little endian notation
2.3- byte 5 should be 0x00
2.4- bytes 6-7 are the image width, little endian
2.5- bytes 8-9 are the image height, little endian

3- Write header + image data to a file, compress using LZMA
4- Remove 4 0x00 bytes from position 9 of the compressed file
5- Save as .sc

Some sprite map files have the image pixel format in them, this could probably cause some errors; you would need to note the pixel format of the source image and re-encode the pixels in the original format, but this is outside my knowledge, the instructions above are for RGBA8888. Check the convert_pixel function and reverse the binary operations there.


So did you find a script that convert png files to correct sc files ?


Top
   
PostPosted: Tue Jan 10, 2017 1:09 am 

Joined: Tue Jan 10, 2017 1:08 am
Posts: 1
CamC999 wrote:
Okay so i did everything barbossa42 said and i get this error:

C:\Users\cam\Desktop\sc>for %v in (*_tex.sc) do python dumpsc.py %v

C:\Users\cam\Desktop\sc>python dumpsc.py arena_training_tex.sc
Traceback (most recent call last):
File "dumpsc.py", line 6, in <module>
from PIL import Image
ImportError: No module named 'PIL'

It also does this for every SC file in the folder ending in _tex.sc

UPDATE: I was able to fix the issue by installing "pillow" for python (The link can be found here: https://pypi.python.org/pypi/Pillow/3.4.2#downloads)

ALSO: I was able to find all of the images by fixing the problem above! thank you everyone!

P.S. I can share the audio and images with any of you on google drive if you want :lol:

Here are some sample files!

ui_spells_tex_.png

chr_electro_wizard_tex.png

ui_spells_tex.png

YES Can you pleassee share the files with me. my email is yohan.guyomard@gmail.com


Top
   
PostPosted: Wed Jan 11, 2017 5:17 am 

Joined: Tue Nov 22, 2016 9:25 pm
Posts: 19
Johnny wrote:
CamC999 wrote:
The tutorial video for the .sc files decryption is up! https://youtu.be/oqnG9nuDV6I
P.S. : The .csv files decryption video will be posted soon! Subscribe to stay updated.


Unfortunately the video got took down by "Supercell Oy", could you send the vid as an mp4 plz? Thx. (You could also re-upload the video and make it a private vid with only the ppl with the link that can have access to it)


Yes, fortunately I do have it on my drive and this is the link: https://drive.google.com/open?id=0Bzh5n ... m1pdTJ2RlU

I guess it would be better to just also do this for the upcoming .csv decryption tutorial :D


Top
   
PostPosted: Wed Jan 11, 2017 5:23 am 

Joined: Tue Nov 22, 2016 9:25 pm
Posts: 19
YohanIsHere wrote:
CamC999 wrote:
Okay so i did everything barbossa42 said and i get this error:

C:\Users\cam\Desktop\sc>for %v in (*_tex.sc) do python dumpsc.py %v

C:\Users\cam\Desktop\sc>python dumpsc.py arena_training_tex.sc
Traceback (most recent call last):
File "dumpsc.py", line 6, in <module>
from PIL import Image
ImportError: No module named 'PIL'

It also does this for every SC file in the folder ending in _tex.sc

UPDATE: I was able to fix the issue by installing "pillow" for python (The link can be found here: https://pypi.python.org/pypi/Pillow/3.4.2#downloads)

ALSO: I was able to find all of the images by fixing the problem above! thank you everyone!

P.S. I can share the audio and images with any of you on google drive if you want :lol:

Here are some sample files!

ui_spells_tex_.png

chr_electro_wizard_tex.png

ui_spells_tex.png

YES Can you pleassee share the files with me. my email is yohan.guyomard@gmail.com


Yes I have just shared the .png files with you as of now :D


Top
   
PostPosted: Wed Jan 11, 2017 6:20 am 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
CamC999 wrote:
YohanIsHere wrote:
CamC999 wrote:
Okay so i did everything barbossa42 said and i get this error:

C:\Users\cam\Desktop\sc>for %v in (*_tex.sc) do python dumpsc.py %v

C:\Users\cam\Desktop\sc>python dumpsc.py arena_training_tex.sc
Traceback (most recent call last):
File "dumpsc.py", line 6, in <module>
from PIL import Image
ImportError: No module named 'PIL'

It also does this for every SC file in the folder ending in _tex.sc

UPDATE: I was able to fix the issue by installing "pillow" for python (The link can be found here: https://pypi.python.org/pypi/Pillow/3.4.2#downloads)

ALSO: I was able to find all of the images by fixing the problem above! thank you everyone!

P.S. I can share the audio and images with any of you on google drive if you want :lol:

Here are some sample files!

ui_spells_tex_.png

chr_electro_wizard_tex.png

ui_spells_tex.png

YES Can you pleassee share the files with me. my email is yohan.guyomard@gmail.com


Yes I have just shared the .png files with you as of now :D

Hi, did u find a script that reverse the process ?


Top
   
PostPosted: Thu Jan 12, 2017 12:45 am 

Joined: Tue Nov 22, 2016 9:25 pm
Posts: 19
imblyzzard wrote:
CamC999 wrote:
YohanIsHere wrote:
YES Can you pleassee share the files with me. my email is yohan.guyomard@gmail.com


Yes I have just shared the .png files with you as of now :D

Hi, did u find a script that reverse the process ?


Umm... unfortunatley I have not found a script to reverse the process. I have been working on it for a very long time, but if anyone can do it, i would say Barbossa42 could, but he doesn't appear to go on this forum anymore :(


Top
   
PostPosted: Thu Jan 12, 2017 6:15 am 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
CamC999 wrote:
imblyzzard wrote:
CamC999 wrote:

Yes I have just shared the .png files with you as of now :D

Hi, did u find a script that reverse the process ?


Umm... unfortunatley I have not found a script to reverse the process. I have been working on it for a very long time, but if anyone can do it, i would say Barbossa42 could, but he doesn't appear to go on this forum anymore :(


Oh ok. I thank u for the work you realize (srry for my bad english). I'm still looking for reverse the process but its hard. There is a forum on ultrapowa.com/forum where a guy post a script to convert _tex.sc to png on décember 2. He says that he works on that to. Same with knobse (on the same forum).
But if someone trying and do it, that could be awesome !
Thanks for you reply
Bye


Top
   
PostPosted: Thu Jan 12, 2017 2:36 pm 

Joined: Thu Oct 20, 2016 11:18 am
Posts: 11
Hi guys.
I'm quite busy at work for some time now, so working on this script is being really hard. Also, my phone is not rooted right now (and I'll have to keep it like that for some time), so I can't really test if _tex.sc replacement will work.
I'll try to come up with something on the next week or so, but don't count on it.
And yes, I'll still follow this topic =)


Top
   
PostPosted: Thu Jan 12, 2017 3:35 pm 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
barbossa42 wrote:
Hi guys.
I'm quite busy at work for some time now, so working on this script is being really hard. Also, my phone is not rooted right now (and I'll have to keep it like that for some time), so I can't really test if _tex.sc replacement will work.
I'll try to come up with something on the next week or so, but don't count on it.
And yes, I'll still follow this topic =)


Ok great man good luck ;)


Top
   
PostPosted: Thu Jan 12, 2017 4:01 pm 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
imblyzzard wrote:
barbossa42 wrote:
Hi guys.
I'm quite busy at work for some time now, so working on this script is being really hard. Also, my phone is not rooted right now (and I'll have to keep it like that for some time), so I can't really test if _tex.sc replacement will work.
I'll try to come up with something on the next week or so, but don't count on it.
And yes, I'll still follow this topic =)


Ok great man good luck ;) on my side i will try to create a new fingerprint.json or something like that. If i succeed, we wont need to convert png to sc and that could be convenient. Sorry for my bad english one more time :lol: bye


Top
   
PostPosted: Fri Jan 13, 2017 12:54 am 

Joined: Tue Nov 22, 2016 9:25 pm
Posts: 19
imblyzzard wrote:
imblyzzard wrote:
barbossa42 wrote:
Hi guys.
I'm quite busy at work for some time now, so working on this script is being really hard. Also, my phone is not rooted right now (and I'll have to keep it like that for some time), so I can't really test if _tex.sc replacement will work.
I'll try to come up with something on the next week or so, but don't count on it.
And yes, I'll still follow this topic =)


Ok great man good luck ;) on my side i will try to create a new fingerprint.json or something like that. If i succeed, we wont need to convert png to sc and that could be convenient. Sorry for my bad english one more time :lol: bye


I already know that fingerprint.json already has a fingerprint on it, preventing you from being able to change the .sc in any way. HOWEVER, the files that are _tex.sc can be altered. I have tested this by deleting the chr_princess_tex.sc file and duplicating the chr_goblin_blowdart and renaming back to "chr_princess_tex.sc"

This makes it so that the princess has the texture of the dart goblin, but since the normal .sc files control the hitboxes and animations, the troop's texture is offset, and this can't be changed because it is controlled by the fingerprint.json


Top
   
PostPosted: Sun Jan 15, 2017 7:37 pm 

Joined: Sun Jan 15, 2017 7:32 pm
Posts: 10
Hi everyone, first i'm sorry for my bad english, i'm french and i'm only 17. Well, i know how transform any .sc to .png with CamC999's Tutorial, he said he will do a tutorial about .csv modification. I'm waiting for this tutorial because i know how to edit them. I decrypt them, change values and recrypt them, the only problem that's when i build the new apk with modified values, i can't install it, i think Supercell have some security, do you know how can i bypass those security ? Thanks a lot :)


Last edited by Moon Arts on Sun Jan 15, 2017 10:35 pm, edited 1 time in total.

Top
   
PostPosted: Sun Jan 15, 2017 8:47 pm 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
Moon Arts wrote:
Hi everyone, first i'm sorry for my bad english, i'm french and i'm only 17. Well, i know how transform any .sc to .png with CamC999's Tutorial, he said he will do a tutorial about .scv modification. I'm waiting for this tutorial because i know how to edit them. I decrypt them, change values and recrypt them, the only problem that's when i build the new apk with modified values, i can't install it, i think Supercell have some security, do you know how can i bypass those security ? Thanks a lot :)


Yo ! Je suis français aussi enfin mdr. Bon alors moi JAI 14 ans. On travaille tous plus ou moins sur un script qui transforme les png en sc mais je bloque à une ligne de code (ça c t pour les autres). Dans ton cas, je ne pense pas que supercell ai une sécurité qui empêche l'apk de s'installer. C'est même impossible. Ce qui serait possible, c'est que tu serais capable de l'installer, de la lancer et ça crash. Ça ok. Mais non. J'utilise DarkSouls Éditor 3.0 pour le decrypt/encrypt des csv. Je suis sous iOS jailbreak et moi comme je suis JB, je n'ai pass besoin de réinstaller l'application, JAI juste besoin de remplacer le csv que j'ai modifié avec iFile. Essaye de Root ton Android device, modifie le csv (oublie pas de le reencypter) et remplace le avec un logiciel Root du genre iFile. Si tu as la flemme de Root ton tel/tablette, je pense savoir d'où vient ton problème. Quand tu recompile ton apk, je pense qu'elle n'est pas signée. C'est pour ça qu'elle ne veut pas s'installer. Il y a plein d'application qui permette de signer une apk (AdvancedApk Tool by BDFreak). Tien moi au courant
Bye


Top
   
PostPosted: Sun Jan 15, 2017 9:48 pm 

Joined: Sun Jan 15, 2017 7:32 pm
Posts: 10
imblyzzard wrote:
Yo ! Je suis français aussi enfin mdr. Bon alors moi JAI 14 ans. On travaille tous plus ou moins sur un script qui transforme les png en sc mais je bloque à une ligne de code (ça c t pour les autres). Dans ton cas, je ne pense pas que supercell ai une sécurité qui empêche l'apk de s'installer. C'est même impossible. Ce qui serait possible, c'est que tu serais capable de l'installer, de la lancer et ça crash. Ça ok. Mais non. J'utilise DarkSouls Éditor 3.0 pour le decrypt/encrypt des csv. Je suis sous iOS jailbreak et moi comme je suis JB, je n'ai pass besoin de réinstaller l'application, JAI juste besoin de remplacer le csv que j'ai modifié avec iFile. Essaye de Root ton Android device, modifie le csv (oublie pas de le reencypter) et remplace le avec un logiciel Root du genre iFile. Si tu as la flemme de Root ton tel/tablette, je pense savoir d'où vient ton problème. Quand tu recompile ton apk, je pense qu'elle n'est pas signée. C'est pour ça qu'elle ne veut pas s'installer. Il y a plein d'application qui permette de signer une apk (AdvancedApk Tool by BDFreak). Tien moi au courant
Bye


C'est exactement ça, alors il faut savoir que j'ai un téléphone assez rare un "Xiaomi Redmi Note 2 Prime" un téléphone chinois, je l'avais root avant mais suite à certain problèmes de version de ma rom, j'ai dû enlever le root. J'utilise aussi DarkSouls Editor 3.0 pour decrypt/encrypt mes .csv. Merci pour toutes tes informations qui vont m'être très utile par la suite. Je vais essayer de signer mon .apk cette semaine je te retiens au courant. Bye


Top
   
PostPosted: Mon Jan 16, 2017 4:00 pm 

Joined: Mon Jan 16, 2017 3:54 pm
Posts: 2
It is easy to reverse dumpsc.py. Proof: http://imgur.com/a/57YqJ
But i think it shoud not be public available. Who can't reverse the script - dont need it. For example it can cause that a lot of clickbaiters on youtube as Azhure will make more trash videos with "ideas" and fake updates.


Top
   
PostPosted: Mon Jan 16, 2017 4:07 pm 

Joined: Mon Jan 09, 2017 8:50 pm
Posts: 28
royalemod wrote:
It is easy to reverse dumpsc.py. Proof: http://imgur.com/a/57YqJ
But i think it shoud not be public available. Who can't reverse the script - dont need it. For example it can cause that a lot of clickbaiters on youtube as Azhure will make more trash video with "ideas" and fake updates.


Maybe but we don't know that your picture is fake or not. If you success, you can send me the reversed dumpsc.py. I Will test it.

Bye
Sorry for my bad english


Top
   
PostPosted: Mon Jan 16, 2017 4:15 pm 

Joined: Mon Jan 16, 2017 3:54 pm
Posts: 2
imblyzzard wrote:
Maybe but we don't know that your picture is fake or not. If you success, you can send me the reversed dumpsc.py. I Will test it.

I can only send the modded texture. Not the script itself, reasons in my prev. post


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 221 posts ]  Go to page Previous 1 2 3 4 5 612 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited