コード例 #1
0
 def createFields(self):
     yield String(self, "name", 16)
     yield UInt32(self, "offset")
コード例 #2
0
 def createFields(self):
     yield UInt32(self, "length")
     length = self["length"].value
     if length == 0xffffffff:
         return
     yield String(self, "text", length, charset="UTF-8")
コード例 #3
0
ファイル: swf.py プロジェクト: tattoomees/SickRage
 def createFields(self):
     yield UInt8(self, "count")
     for index in xrange(self["count"].value):
         yield UInt32(self, "mark44[]")
         yield UInt16(self, "level0[]")
         yield UInt16(self, "level1[]")
コード例 #4
0
def gammaParse(parent):
    yield UInt32(parent, "gamma", "Gamma (x100,000)")
コード例 #5
0
 def createFields(self):
     yield Bits(self, "stream_index", 7)
     yield PaddingBits(self, "reserved", 9)
     yield displayHandler(UInt32(self, "avg_bitrate"), humanBitRate)
コード例 #6
0
 def createFields(self):
     yield UInt32(self, "count")
     for index in xrange(self["count"].value):
         yield Node(self, "node[]")
コード例 #7
0
ファイル: word_doc.py プロジェクト: tattoomees/SickRage
    def createFields(self):
        yield UInt16(self, "wIdent", 2)
        yield UInt16(self, "nFib")
        yield UInt16(self, "nProduct")
        yield UInt16(self, "lid")
        yield Int16(self, "pnNext")

        yield Bit(self, "fDot")
        yield Bit(self, "fGlsy")
        yield Bit(self, "fComplex")
        yield Bit(self, "fHasPic")
        yield Bits(self, "cQuickSaves", 4)
        yield Bit(self, "fEncrypted")
        yield Bit(self, "fWhichTblStm")
        yield Bit(self, "fReadOnlyRecommanded")
        yield Bit(self, "fWriteReservation")
        yield Bit(self, "fExtChar")
        yield Bit(self, "fLoadOverride")
        yield Bit(self, "fFarEeast")
        yield Bit(self, "fCrypto")

        yield UInt16(self, "nFibBack")
        yield UInt32(self, "lKey")
        yield UInt8(self, "envr")

        yield Bit(self, "fMac")
        yield Bit(self, "fEmptySpecial")
        yield Bit(self, "fLoadOverridePage")
        yield Bit(self, "fFutureSavedUndo")
        yield Bit(self, "fWord97Save")
        yield Bits(self, "fSpare0", 3)

        yield UInt16(self, "chse")
        yield UInt16(self, "chsTables")
        yield UInt32(self, "fcMin")
        yield UInt32(self, "fcMac")

        yield PascalString16(self, "file_creator", strip="\0")

        yield NullBytes(self, "reserved[]", 12)

        yield Int16(self, "lidFE")
        yield UInt16(self, "clw")
        yield Int32(self, "cbMac")
        yield UInt32(self, "lProductCreated")
        yield TIMESTAMP(self, "lProductRevised")

        yield UInt32(self, "ccpText")
        yield Int32(self, "ccpFtn")
        yield Int32(self, "ccpHdr")
        yield Int32(self, "ccpMcr")
        yield Int32(self, "ccpAtn")
        yield Int32(self, "ccpEdn")
        yield Int32(self, "ccpTxbx")
        yield Int32(self, "ccpHdrTxbx")
        yield Int32(self, "pnFbpChpFirst")
        yield Int32(self, "pnChpFirst")
        yield Int32(self, "cpnBteChp")
        yield Int32(self, "pnFbpPapFirst")
        yield Int32(self, "pnPapFirst")
        yield Int32(self, "cpnBtePap")
        yield Int32(self, "pnFbpLvcFirst")
        yield Int32(self, "pnLvcFirst")
        yield Int32(self, "cpnBteLvc")
        yield Int32(self, "fcIslandFirst")
        yield Int32(self, "fcIslandLim")
        yield UInt16(self, "cfclcb")
        yield Int32(self, "fcStshfOrig")
        yield UInt32(self, "lcbStshfOrig")
        yield Int32(self, "fcStshf")
        yield UInt32(self, "lcbStshf")

        yield Int32(self, "fcPlcffndRef")
        yield UInt32(self, "lcbPlcffndRef")
        yield Int32(self, "fcPlcffndTxt")
        yield UInt32(self, "lcbPlcffndTxt")
        yield Int32(self, "fcPlcfandRef")
        yield UInt32(self, "lcbPlcfandRef")
        yield Int32(self, "fcPlcfandTxt")
        yield UInt32(self, "lcbPlcfandTxt")
        yield Int32(self, "fcPlcfsed")
        yield UInt32(self, "lcbPlcfsed")
        yield Int32(self, "fcPlcpad")
        yield UInt32(self, "lcbPlcpad")
        yield Int32(self, "fcPlcfphe")
        yield UInt32(self, "lcbPlcfphe")
        yield Int32(self, "fcSttbfglsy")
        yield UInt32(self, "lcbSttbfglsy")
        yield Int32(self, "fcPlcfglsy")
        yield UInt32(self, "lcbPlcfglsy")
        yield Int32(self, "fcPlcfhdd")
        yield UInt32(self, "lcbPlcfhdd")
        yield Int32(self, "fcPlcfbteChpx")
        yield UInt32(self, "lcbPlcfbteChpx")
        yield Int32(self, "fcPlcfbtePapx")
        yield UInt32(self, "lcbPlcfbtePapx")
        yield Int32(self, "fcPlcfsea")
        yield UInt32(self, "lcbPlcfsea")
        yield Int32(self, "fcSttbfffn")
        yield UInt32(self, "lcbSttbfffn")
        yield Int32(self, "fcPlcffldMom")
        yield UInt32(self, "lcbPlcffldMom")
        yield Int32(self, "fcPlcffldHdr")
        yield UInt32(self, "lcbPlcffldHdr")
        yield Int32(self, "fcPlcffldFtn")
        yield UInt32(self, "lcbPlcffldFtn")
        yield Int32(self, "fcPlcffldAtn")
        yield UInt32(self, "lcbPlcffldAtn")
        yield Int32(self, "fcPlcffldMcr")
        yield UInt32(self, "lcbPlcffldMcr")
        yield Int32(self, "fcSttbfbkmk")
        yield UInt32(self, "lcbSttbfbkmk")
        yield Int32(self, "fcPlcfbkf")
        yield UInt32(self, "lcbPlcfbkf")
        yield Int32(self, "fcPlcfbkl")
        yield UInt32(self, "lcbPlcfbkl")
        yield Int32(self, "fcCmds")
        yield UInt32(self, "lcbCmds")
        yield Int32(self, "fcPlcmcr")
        yield UInt32(self, "lcbPlcmcr")
        yield Int32(self, "fcSttbfmcr")
        yield UInt32(self, "lcbSttbfmcr")
        yield Int32(self, "fcPrDrvr")
        yield UInt32(self, "lcbPrDrvr")
        yield Int32(self, "fcPrEnvPort")
        yield UInt32(self, "lcbPrEnvPort")
        yield Int32(self, "fcPrEnvLand")
        yield UInt32(self, "lcbPrEnvLand")
        yield Int32(self, "fcWss")
        yield UInt32(self, "lcbWss")
        yield Int32(self, "fcDop")
        yield UInt32(self, "lcbDop")
        yield Int32(self, "fcSttbfAssoc")
        yield UInt32(self, "lcbSttbfAssoc")
        yield Int32(self, "fcClx")
        yield UInt32(self, "lcbClx")
        yield Int32(self, "fcPlcfpgdFtn")
        yield UInt32(self, "lcbPlcfpgdFtn")
        yield Int32(self, "fcAutosaveSource")
        yield UInt32(self, "lcbAutosaveSource")
        yield Int32(self, "fcGrpXstAtnOwners")
        yield UInt32(self, "lcbGrpXstAtnOwners")
        yield Int32(self, "fcSttbfAtnbkmk")
        yield UInt32(self, "lcbSttbfAtnbkmk")
        yield Int32(self, "fcPlcdoaMom")
        yield UInt32(self, "lcbPlcdoaMom")
        yield Int32(self, "fcPlcdoaHdr")
        yield UInt32(self, "lcbPlcdoaHdr")
        yield Int32(self, "fcPlcspaMom")
        yield UInt32(self, "lcbPlcspaMom")
        yield Int32(self, "fcPlcspaHdr")
        yield UInt32(self, "lcbPlcspaHdr")
        yield Int32(self, "fcPlcfAtnbkf")
        yield UInt32(self, "lcbPlcfAtnbkf")
        yield Int32(self, "fcPlcfAtnbkl")
        yield UInt32(self, "lcbPlcfAtnbkl")
        yield Int32(self, "fcPms")
        yield UInt32(self, "lcbPms")
        yield Int32(self, "fcFormFldSttbs")
        yield UInt32(self, "lcbFormFldSttbs")
        yield Int32(self, "fcPlcfendRef")
        yield UInt32(self, "lcbPlcfendRef")
        yield Int32(self, "fcPlcfendTxt")
        yield UInt32(self, "lcbPlcfendTxt")
        yield Int32(self, "fcPlcffldEdn")
        yield UInt32(self, "lcbPlcffldEdn")
        yield Int32(self, "fcPlcfpgdEdn")
        yield UInt32(self, "lcbPlcfpgdEdn")
        yield Int32(self, "fcDggInfo")
        yield UInt32(self, "lcbDggInfo")
        yield Int32(self, "fcSttbfRMark")
        yield UInt32(self, "lcbSttbfRMark")
        yield Int32(self, "fcSttbCaption")
        yield UInt32(self, "lcbSttbCaption")
        yield Int32(self, "fcSttbAutoCaption")
        yield UInt32(self, "lcbSttbAutoCaption")
        yield Int32(self, "fcPlcfwkb")
        yield UInt32(self, "lcbPlcfwkb")
        yield Int32(self, "fcPlcfspl")
        yield UInt32(self, "lcbPlcfspl")
        yield Int32(self, "fcPlcftxbxTxt")
        yield UInt32(self, "lcbPlcftxbxTxt")
        yield Int32(self, "fcPlcffldTxbx")
        yield UInt32(self, "lcbPlcffldTxbx")
        yield Int32(self, "fcPlcfhdrtxbxTxt")
        yield UInt32(self, "lcbPlcfhdrtxbxTxt")
        yield Int32(self, "fcPlcffldHdrTxbx")
        yield UInt32(self, "lcbPlcffldHdrTxbx")
        yield Int32(self, "fcStwUser")
        yield UInt32(self, "lcbStwUser")
        yield Int32(self, "fcSttbttmbd")
        yield UInt32(self, "cbSttbttmbd")
        yield Int32(self, "fcUnused")
        yield UInt32(self, "lcbUnused")
        yield Int32(self, "fcPgdMother")
        yield UInt32(self, "lcbPgdMother")
        yield Int32(self, "fcBkdMother")
        yield UInt32(self, "lcbBkdMother")
        yield Int32(self, "fcPgdFtn")
        yield UInt32(self, "lcbPgdFtn")
        yield Int32(self, "fcBkdFtn")
        yield UInt32(self, "lcbBkdFtn")
        yield Int32(self, "fcPgdEdn")
        yield UInt32(self, "lcbPgdEdn")
        yield Int32(self, "fcBkdEdn")
        yield UInt32(self, "lcbBkdEdn")
        yield Int32(self, "fcSttbfIntlFld")
        yield UInt32(self, "lcbSttbfIntlFld")
        yield Int32(self, "fcRouteSlip")
        yield UInt32(self, "lcbRouteSlip")
        yield Int32(self, "fcSttbSavedBy")
        yield UInt32(self, "lcbSttbSavedBy")
        yield Int32(self, "fcSttbFnm")
        yield UInt32(self, "lcbSttbFnm")
        yield Int32(self, "fcPlcfLst")
        yield UInt32(self, "lcbPlcfLst")
        yield Int32(self, "fcPlfLfo")
        yield UInt32(self, "lcbPlfLfo")
        yield Int32(self, "fcPlcftxbxBkd")
        yield UInt32(self, "lcbPlcftxbxBkd")
        yield Int32(self, "fcPlcftxbxHdrBkd")
        yield UInt32(self, "lcbPlcftxbxHdrBkd")
        yield Int32(self, "fcDocUndo")
        yield UInt32(self, "lcbDocUndo")
        yield Int32(self, "fcRgbuse")
        yield UInt32(self, "lcbRgbuse")
        yield Int32(self, "fcUsp")
        yield UInt32(self, "lcbUsp")
        yield Int32(self, "fcUskf")
        yield UInt32(self, "lcbUskf")
        yield Int32(self, "fcPlcupcRgbuse")
        yield UInt32(self, "lcbPlcupcRgbuse")
        yield Int32(self, "fcPlcupcUsp")
        yield UInt32(self, "lcbPlcupcUsp")
        yield Int32(self, "fcSttbGlsyStyle")
        yield UInt32(self, "lcbSttbGlsyStyle")
        yield Int32(self, "fcPlgosl")
        yield UInt32(self, "lcbPlgosl")
        yield Int32(self, "fcPlcocx")
        yield UInt32(self, "lcbPlcocx")
        yield Int32(self, "fcPlcfbteLvc")
        yield UInt32(self, "lcbPlcfbteLvc")
        yield TIMESTAMP(self, "ftModified")
        yield Int32(self, "fcPlcflvc")
        yield UInt32(self, "lcbPlcflvc")
        yield Int32(self, "fcPlcasumy")
        yield UInt32(self, "lcbPlcasumy")
        yield Int32(self, "fcPlcfgram")
        yield UInt32(self, "lcbPlcfgram")
        yield Int32(self, "fcSttbListNames")
        yield UInt32(self, "lcbSttbListNames")
        yield Int32(self, "fcSttbfUssr")
        yield UInt32(self, "lcbSttbfUssr")

        tail = (self.size - self.current_size) // 8
        if tail:
            yield RawBytes(self, "tail", tail)
コード例 #8
0
 def createFields(self):
     yield GUID(self, "reserved[]")
     yield UInt32(self, "count")
     for index in xrange(self["count"].value):
         yield Codec(self, "codec[]")
コード例 #9
0
 def createFields(self):
     yield UInt32(self, "inodes_count", "Inodes count")
     yield UInt32(self, "blocks_count", "Blocks count")
     yield UInt32(self, "r_blocks_count", "Reserved blocks count")
     yield UInt32(self, "free_blocks_count", "Free blocks count")
     yield UInt32(self, "free_inodes_count", "Free inodes count")
     yield UInt32(self, "first_data_block", "First data block")
     yield UInt32(self, "log_block_size", "Block size")
     yield UInt32(self, "log_frag_size", "Fragment size")
     yield UInt32(self, "blocks_per_group", "Blocks per group")
     yield UInt32(self, "frags_per_group", "Fragments per group")
     yield UInt32(self, "inodes_per_group", "Inodes per group")
     yield TimestampUnix32(self, "mtime", "Mount time")
     yield TimestampUnix32(self, "wtime", "Write time")
     yield UInt16(self, "mnt_count", "Mount count")
     yield UInt16(self, "max_mnt_count", "Max mount count")
     yield String(self, "magic", 2, "Magic number (0x53EF)")
     yield Enum(UInt16(self, "state", "File system state"), self.state_desc)
     yield Enum(UInt16(self, "errors", "Behaviour when detecting errors"), self.error_handling_desc)
     yield UInt16(self, "minor_rev_level", "Minor revision level")
     yield TimestampUnix32(self, "last_check", "Time of last check")
     yield textHandler(UInt32(self, "check_interval", "Maximum time between checks"), self.postMaxTime)
     yield Enum(UInt32(self, "creator_os", "Creator OS"), self.os_name)
     yield UInt32(self, "rev_level", "Revision level")
     yield UInt16(self, "def_resuid", "Default uid for reserved blocks")
     yield UInt16(self, "def_resgid", "Default gid for reserved blocks")
     yield UInt32(self, "first_ino", "First non-reserved inode")
     yield UInt16(self, "inode_size", "Size of inode structure")
     yield UInt16(self, "block_group_nr", "Block group # of this superblock")
     yield UInt32(self, "feature_compat", "Compatible feature set")
     yield UInt32(self, "feature_incompat", "Incompatible feature set")
     yield UInt32(self, "feature_ro_compat", "Read-only compatible feature set")
     yield RawBytes(self, "uuid", 16, "128-bit uuid for volume")
     yield String(self, "volume_name", 16, "Volume name", strip="\0")
     yield String(self, "last_mounted", 64, "Directory where last mounted", strip="\0")
     yield UInt32(self, "compression", "For compression (algorithm usage bitmap)")
     yield UInt8(self, "prealloc_blocks", "Number of blocks to try to preallocate")
     yield UInt8(self, "prealloc_dir_blocks", "Number to preallocate for directories")
     yield UInt16(self, "padding", "Padding")
     yield String(self, "journal_uuid", 16, "uuid of journal superblock")
     yield UInt32(self, "journal_inum", "inode number of journal file")
     yield UInt32(self, "journal_dev", "device number of journal file")
     yield UInt32(self, "last_orphan", "start of list of inodes to delete")
     yield RawBytes(self, "reserved", 197, "Reserved")
コード例 #10
0
def parseSound(self):
    yield UInt32(self, "offset")
    yield UInt32(self, "block_size")
    size = (self.size - self.current_size) // 8
    if size:
        yield RawBytes(self, "data", size)
コード例 #11
0
ファイル: wmf.py プロジェクト: tattoomees/SickRage
def parseExtCreatePen(parser):
    yield UInt32(parser, "ihPen")
    yield UInt32(parser, "offBmi")
    yield UInt32(parser, "cbBmi")
    yield UInt32(parser, "offBits")
    yield UInt32(parser, "cbBits")
    yield UInt32(parser, "pen_style")
    yield UInt32(parser, "width")
    yield UInt32(parser, "brush_style")
    yield RGBA(parser, "color")
    yield UInt32(parser, "hatch")
    yield UInt32(parser, "nb_style")
    for index in xrange(parser["nb_style"].value):
        yield UInt32(parser, "style")
コード例 #12
0
ファイル: wmf.py プロジェクト: tattoomees/SickRage
def parseICMMode(parser):
    yield UInt32(parser, "icm_mode")
コード例 #13
0
ファイル: xcf.py プロジェクト: 070499/Sick-Beard
 def createValue(self):
     return 1 == UInt32.createValue(self)
コード例 #14
0
 def createFields(self):
     yield UInt32(self, "id")
     yield UInt32(self, "type")
     yield UInt32(self, "attr_count")
     for index in xrange(self["attr_count"].value):
         yield Attribute(self, "attr[]")
コード例 #15
0
 def createFields(self):
     yield UInt32(self, "off_data", "Offset of data")
     yield UInt16(self, "cf_data")
     yield Enum(Bits(self, "compr_method", 4, "Compression method"), COMPRESSION_NAME)
     yield Bits(self, "compr_level", 5, "Compression level")
     yield PaddingBits(self, "padding", 7)
コード例 #16
0
ファイル: xcf.py プロジェクト: 070499/Sick-Beard
 def __init__(self, parent, name):
     UInt32.__init__(self, parent, name)
コード例 #17
0
 def createFields(self):
     yield UInt32(self, "size")
     size = self["size"].value
     if size:
         yield RawBytes(self, "data", size)
コード例 #18
0
 def createFields(self):
     yield UInt32(self, "pckt_number")
     yield UInt16(self, "pckt_count")
コード例 #19
0
def readVersion(parent):
    yield UInt32(parent, "version", "3DS file format version")
コード例 #20
0
 def createFields(self):
     yield UInt32(self, "count")
     for index in xrange(self["count"].value):
         yield Mesh(self, "mesh[]")
コード例 #21
0
 def createFields(self):
     yield UInt32(self, "disk_number", \
                  "Number of the disk with the start of the zip64 end of central directory")
     yield UInt64(self, "relative_offset", \
                  "Relative offset of the zip64 end of central directory record")
     yield UInt32(self, "disk_total_number", "Total number of disks")
コード例 #22
0
 def createFields(self):
     yield UInt32(self, "count")
     for index in xrange(self["count"].value):
         yield String(self, "filename[]", 32, "Material file name", strip="\0")
コード例 #23
0
ファイル: xcf.py プロジェクト: tattoomees/SickRage
 def createFields(self):
     yield Enum(UInt32(self, "mode", "Layer mode"), self.MODE_NAME)
コード例 #24
0
def physicalParse(parent):
    yield UInt32(parent, "pixel_per_unit_x", "Pixel per unit, X axis")
    yield UInt32(parent, "pixel_per_unit_y", "Pixel per unit, Y axis")
    yield Enum(UInt8(parent, "unit", "Unit type"), UNIT_NAME)
コード例 #25
0
ファイル: xcf.py プロジェクト: tattoomees/SickRage
 def __init__(self, parent, name):
     UInt32.__init__(self, parent, name)
コード例 #26
0
def parseArray(parent):
    yield UInt32(parent, "count")
    for index in xrange(parent["count"].value):
        yield AMFObject(parent, "item[]")
コード例 #27
0
ファイル: xcf.py プロジェクト: tattoomees/SickRage
 def createValue(self):
     return 1 == UInt32.createValue(self)
コード例 #28
0
 def createFields(self):
     yield UInt32(self, "count")
     for index in xrange(self["count"].value):
         yield Item(self, "item[]")
コード例 #29
0
 def createFields(self):
     yield GUID(self, "reserved[]")
     yield UInt16(self, "reserved[]")
     yield UInt32(self, "size")
     if self["size"].value:
         yield RawBytes(self, "data", self["size"].value)
コード例 #30
0
 def createFields(self):
     yield UInt32(self, "types_allowed")
     yield KeyringString(self, "display_name")
     yield KeyringString(self, "pathname")
     yield KeyringString(self, "reserved[]")
     yield UInt32(self, "reserved[]")
コード例 #31
0
 def createFields(self):
     yield UInt32(self, "obj_count")
     yield PaddingBytes(self, "reserved[]", 2)
     for index in xrange(self["obj_count"].value):
         yield Object(self, "object[]")
コード例 #32
0
 def createFields(self):
     yield String(self, "tag", 4)
     yield textHandler(UInt32(self, "checksum"), hexadecimal)
     yield UInt32(self, "offset")
     yield filesizeHandler(UInt32(self, "size"))
コード例 #33
0
ファイル: ole2.py プロジェクト: Boereklong/Sick-Beard
 def __init__(self, parent, name, description=None):
     UInt32.__init__(self, parent, name, description)