Last active
January 11, 2016 09:55
-
-
Save treeherder/cd386cb7d57ac21d7dee to your computer and use it in GitHub Desktop.
BULLSHIT ASS GARBAGE FUCKING STUPID SHIT
This file contains 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
#!/usr/bin/env python | |
from io import StringIO | |
from Crypto.Cipher import Blowfish | |
import base64 | |
encoded_encryption_key = "e5HcOjmDQALG4ycjOsCHPrKWjKAMhXNC" | |
encrypted_key = base64.b64decode(encoded_encryption_key) | |
game_id ="2064739749" | |
buf = 8 | |
def add_buffer(str): | |
big_buf = str | |
buffered = buf - (len(str) % buf) | |
if buffered != 0: | |
for x in range(buffered): | |
big_buf += " " | |
return big_buf | |
#first step : decrypt the key with gameID | |
KEY =Blowfish.new(game_id, Blowfish.MODE_ECB ).decrypt(encrypted_key) | |
print (KEY) | |
with open('chunk', 'r') as encrypted_chunk: | |
ENC_CHUNK = encrypted_chunk.read() | |
DENCHUNK = Blowfish.new(KEY, Blowfish.MODE_ECB).decrypt(add_buffer(ENC_CHUNK)) | |
compressedFile = StringIO.StringIO(chunk.read()) | |
decompressedFile = gzip.GzipFile(fileobj=compressedFile) | |
decompressedFile = gzip.GzipFile(fileobj=compressedFile, mode='r') | |
outfile = open(chunk.data, 'w') | |
outfile.write(decompressedFile.read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment