View Single Post
Old 04-08-2015, 06:13 AM   #15
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
Second approach
Spoiler:
Code:
#!/usr/bin/python2
# -- coding: utf-8 --

__author__ = 'axa'

import zlib

ZLIB_MARKERS = ['\x78\x9c']

def zipstreams(filename) :
    with open(filename, 'rb') as fh:
        data = fh.read()

    pos = 0

    while pos < len(data) :
        window = data[pos:pos+2]
        for marker in ZLIB_MARKERS:
            if window == marker:
                try:
                    zo = zlib.decompress(data[pos:])
                    if zo[0:4] not in ['\x89PNG', '\x8aMNG']:
                        print '{:x} : {:s}'.format(pos, repr(zo)[0:1000])
                except zlib.error:
                    pos = pos
        pos += 1
        if pos == len(data):
            break

zipstreams('nickel-glo')

Spoiler:

And out

Code:
3cabc : "'Adan, Yemen\tAsia/Aden\n'Ar'ar, Saudi Arabia\tAsia/Riyadh\n'Ataq, Yemen\tAsia/Aden
44a28 : '* { margin: 0px; padding: 0px; }\n\n/* --- */\n\nbody\n{\n    text-align: center;\n
49e9e : '* {\n\tbackground-color: white;\n}\n\nQCheckBox {\n\tspacing: 12px;\n\tpadding-left
4a796 : 'const SHOW_DEBUG_ALERTS = false;\n\n// for testing if we\'ve evaluated this file ye
2d0661 : 'html {\n\tfont-family: serif;\n\tfont-size: 20px;\n}\n\nhtml[deviceCodeName="phoen
2d1a9b : 'QSlider {\n\tbackground-color:none;\n}\n\nQSlider::handle:horizontal[qApp_deviceIs
2d1c8b : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@ \x00\x00\x00.\x00\x
2f62f9 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\xc8\x00\x00\x00.
31d644 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\xb8\x00\x00\x00.
345b39 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x18\x00\x00\x00.
369e5c : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x18\x00\x00\x00.
38e2cc : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@ \x00\x00\x00.\x00
3b37cc : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@ \x00\x00\x00.\x00
3d9be1 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x18\x00\x00\x00.
3fde8c : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x10\x00\x00\x00.

Last edited by AxaRu; 04-08-2015 at 06:17 AM.
AxaRu is offline   Reply With Quote