Create a gist now

Instantly share code, notes, and snippets.

@balidani /weissman.py Secret
Created Sep 21, 2014

What would you like to do?
def read_chunk(f):
global data
chunk_type = ord(f.read(1))
if chunk_type % 2 == 1:
chunk_size = chunk_type >> 1
data.append(f.read(chunk_size))
orig_data.append(orig.read(chunk_size))
return True
else:
chunk_hash = f.read(2).encode('hex')
chunk_size = chunk_type >> 1
# print "Chunk type: %02x %s, id: %d" % (chunk_type, chunk_hash, len(data))
data.append("\x00" * chunk_size)
return True
f = open('key.csawlz', 'rb')
orig = open('csawlz_source.html', 'rb')
f.read(0x2c)
data = []
orig_data = []
try:
while read_chunk(f):
pass
except Exception:
pass
open('outkey.jpg', 'wb').write(''.join(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment