Last active
December 17, 2025 03:17
-
-
Save FaltoGH/b7563b425e10de41c56bf7af0dc4c864 to your computer and use it in GitHub Desktop.
CCLocalLevels.dat Decrypt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64, zlib, re | |
| def decrypt(filename): | |
| with open(filename, 'rb') as rbf: | |
| dat = rbf.read() | |
| a = [x^11 for x in dat] | |
| b = bytearray(a).decode() | |
| c = b.replace('-','+').replace('_','/') | |
| d = c.encode() | |
| e = base64.b64decode(d) | |
| f = e[10:] | |
| g = -zlib.MAX_WBITS | |
| h = zlib.decompress(f, g) | |
| i = h.decode() | |
| return i | |
| def decrypt2(levelcipher): | |
| c = levelcipher.replace('-','+').replace('_','/') | |
| d = c.encode() | |
| e = base64.b64decode(d) | |
| f = e[10:] | |
| g = -zlib.MAX_WBITS | |
| h = zlib.decompress(f, g) | |
| i = h.decode() | |
| return i | |
| def decrypt3(filename): | |
| xml = decrypt(filename) | |
| levelcipher = re.findall('<k>k4</k><s>(.+)</s><k>k5</k>', xml)[0] | |
| levelstring = decrypt2(levelcipher) | |
| xml2 = xml.replace(levelcipher, levelstring) | |
| return xml2 | |
| xml = decrypt3('CCLocalLevels.dat') | |
| with open('a.txt', 'wt') as wtf: | |
| wtf.write(xml) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what