View Single Post
Old 04-07-2015, 08:46 AM   #6
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 24
Karma: 624
Join Date: May 2013
Location: Moscow
Device: Kobo Aura H2o, Kobo Aura One, Kobo Forma
This first approx of python code

Spoiler:
Code:
#!/usr/bin/python2

__author__ = 'axa'

import zlib

ZLIB_MARKERS = ['\x78\x9c']
filename = 'nickel-glo'

infile = open(filename, 'r')
data = infile.read()
end = len(data)

pos = 0
found = False

while pos < end:
    window = data[pos:pos+2]
    for marker in ZLIB_MARKERS:
        if window == marker:
            start = pos
            rest_of_data = data[start:]
            decomp_obj = zlib.decompressobj()
            uncompressed_msg = decomp_obj.decompress(rest_of_data)
            print "===== Message start %0x\n%s" % (pos, uncompressed_msg)

    pos += 1


There is a bug, but the result is very interesting.

http://pastebin.ru/sgat12V0

Last edited by AxaRu; 04-07-2015 at 10:19 PM.
AxaRu is offline   Reply With Quote