Exemplo n.º 1
0
    def createFields(self):
        yield Bytes(self, "jump", 3, "Intel x86 jump instruction")
        yield String(self, "name", 8)
        yield BiosParameterBlock(self, "bios", "BIOS parameters")

        yield textHandler(UInt8(self, "physical_drive", "(0x80)"), hexadecimal)
        yield NullBytes(self, "current_head", 1)
        yield textHandler(
            UInt8(self, "ext_boot_sig", "Extended boot signature (0x80)"),
            hexadecimal)
        yield NullBytes(self, "unused", 1)

        yield UInt64(self, "nb_sectors")
        yield UInt64(self, "mft_cluster", "Cluster location of MFT data")
        yield UInt64(self, "mftmirr_cluster",
                     "Cluster location of copy of MFT")
        yield UInt8(self, "cluster_per_mft", "MFT record size in clusters")
        yield NullBytes(self, "reserved[]", 3)
        yield UInt8(self, "cluster_per_index", "Index block size in clusters")
        yield NullBytes(self, "reserved[]", 3)
        yield textHandler(UInt64(self, "serial_number"), hexadecimal)
        yield textHandler(UInt32(self, "checksum", "Boot sector checksum"),
                          hexadecimal)
        yield Bytes(self, "boot_code", 426)
        yield Bytes(self, "mbr_magic", 2,
                    r"Master boot record magic number (\x55\xAA)")
Exemplo n.º 2
0
 def createFields(self):
     yield NullBytes(self, "unused", 6)
     yield UInt8(self, "offsetIntSize",
                 "Size (in bytes) of offsets in the offset table")
     yield UInt8(self, "objectRefSize",
                 "Size (in bytes) of object numbers in object references")
     yield UInt64(self, "numObjects", "Number of objects in this file")
     yield UInt64(self, "topObject", "Top-level object reference")
     yield UInt64(self, "offsetTableOffset",
                  "File offset to the offset table")
Exemplo n.º 3
0
def parseVideoHeader(parent):
    yield NullBytes(parent, "padding[]", 2)
    yield String(parent, "fourcc", 4)
    yield UInt32(parent, "size")
    yield textHandler(UInt64(parent, "time_unit", "Frame duration"), formatTimeUnit)
    yield UInt64(parent, "sample_per_unit")
    yield UInt32(parent, "default_len")
    yield UInt32(parent, "buffer_size")
    yield UInt16(parent, "bits_per_sample")
    yield NullBytes(parent, "padding[]", 2)
    yield UInt32(parent, "width")
    yield UInt32(parent, "height")
    yield NullBytes(parent, "padding[]", 4)
Exemplo n.º 4
0
 def parseStandardInfo(self):
     yield TimestampWin64(self, "ctime", "File Creation")
     yield TimestampWin64(self, "atime", "File Altered")
     yield TimestampWin64(self, "mtime", "MFT Changed")
     yield TimestampWin64(self, "rtime", "File Read")
     yield MSDOSFileAttr32(self, "file_attr", "DOS File Permissions")
     yield UInt32(self, "max_version", "Maximum Number of Versions")
     yield UInt32(self, "version", "Version Number")
     yield UInt32(self, "class_id")
     yield UInt32(self, "owner_id")
     yield UInt32(self, "security_id")
     yield filesizeHandler(UInt64(self, "quota_charged", "Quota Charged"))
     yield UInt64(self, "usn", "Update Sequence Number (USN)")
Exemplo n.º 5
0
 def createFields(self):
     yield GUID(self, "guid")
     yield filesizeHandler(UInt64(self, "file_size"))
     yield TimestampWin64(self, "creation_date")
     yield UInt64(self, "pckt_count")
     yield TimedeltaWin64(self, "play_duration")
     yield TimedeltaWin64(self, "send_duration")
     yield UInt64(self, "preroll")
     yield Bit(self, "broadcast", "Is broadcast?")
     yield Bit(self, "seekable", "Seekable stream?")
     yield PaddingBits(self, "reserved[]", 30)
     yield filesizeHandler(UInt32(self, "min_pckt_size"))
     yield filesizeHandler(UInt32(self, "max_pckt_size"))
     yield displayHandler(UInt32(self, "max_bitrate"), humanBitRate)
Exemplo n.º 6
0
 def createFields(self):
     yield String(self, "magic", 4, "ITSF", charset="ASCII")
     yield UInt32(self, "version")
     yield UInt32(self, "header_size", "Total header length (in bytes)")
     yield UInt32(self, "one")
     yield UInt32(self, "last_modified")
     yield Enum(UInt32(self, "lang_id", "Windows Language ID"), LANGUAGE_ID)
     yield GUID(self, "dir_uuid", "{7C01FD10-7BAA-11D0-9E0C-00A0-C922-E6EC}")
     yield GUID(self, "stream_uuid", "{7C01FD11-7BAA-11D0-9E0C-00A0-C922-E6EC}")
     yield UInt64(self, "filesize_offset")
     yield filesizeHandler(UInt64(self, "filesize_len"))
     yield UInt64(self, "dir_offset")
     yield filesizeHandler(UInt64(self, "dir_len"))
     if 3 <= self["version"].value:
         yield UInt64(self, "data_offset")
Exemplo n.º 7
0
    def createFields(self):
        # Header
        yield NullBytes(self, "zero_vector", 16)
        yield GUID(self, "fs_guid")
        yield UInt64(self, "volume_len")
        yield String(self, "signature", 4)
        yield UInt32(self, "attributes")
        yield UInt16(self, "header_len")
        yield UInt16(self, "checksum")
        yield UInt16(self, "ext_header_offset")
        yield UInt8(self, "reserved")
        yield UInt8(self, "revision")
        while True:
            bm = BlockMap(self, "block_map[]")
            yield bm
            if bm['num_blocks'].value == 0 and bm['len'].value == 0:
                break
        # TODO must handle extended header

        # Content
        while not self.eof:
            padding = paddingSize(self.current_size // 8, 8)
            if padding:
                yield PaddingBytes(self, "padding[]", padding)
            yield File(self, "file[]")
Exemplo n.º 8
0
    def createFields(self):
        yield String(self, "header_id", 4, "Playlist List Header Markup (\"mhyp\")", charset="ISO-8859-1")
        yield UInt32(self, "header_length", "Header Length")
        yield UInt32(self, "entry_length", "Entry Length")
        yield UInt32(self, "data_object_child_count", "Number of Child Data Objects")
        yield UInt32(self, "playlist_count", "Number of Playlist Items")
        yield Enum(UInt8(self, "type", "Normal or master playlist?"), self.is_master_pl_name)
        yield UInt8(self, "XXX1", "XXX1")
        yield UInt8(self, "XXX2", "XXX2")
        yield UInt8(self, "XXX3", "XXX3")
        yield TimestampMac32(self, "creation_date", "Date when the playlist was created")
        yield UInt64(self, "playlistid", "Persistent Playlist ID")
        yield UInt32(self, "unk3", "unk3")
        yield UInt16(self, "string_mhod_count", "Number of string MHODs for this playlist")
        yield Enum(UInt16(self, "is_podcast", "Playlist or Podcast List?"), self.is_podcast_name)
        yield Enum(UInt32(self, "sort_order", "Playlist Sort Order"), self.list_sort_order_name)

        padding = self.seekByte(self["header_length"].value, "entry padding")
        if padding:
            yield padding

        for i in xrange(self["data_object_child_count"].value):
            yield DataObject(self, "mhod[]")

        for i in xrange(self["playlist_count"].value):
            yield PlaylistItem(self, "playlist_item[]")
Exemplo n.º 9
0
 def createFields(self):
     bytes = self.stream.readBytes(self.absolute_address, 4)
     if bytes == "\0R\0\0":
         charset = "UTF-16-BE"
     else:
         charset = "UTF-16-LE"
     yield String(self, "name", 64, charset=charset, truncate="\0")
     yield UInt16(self, "namelen", "Length of the name")
     yield Enum(UInt8(self, "type", "Property type"), self.TYPE_NAME)
     yield Enum(UInt8(self, "decorator", "Decorator"), self.DECORATOR_NAME)
     yield SECT(self, "left")
     yield SECT(self, "right")
     yield SECT(self, "child",
                "Child node (valid for storage and root types)")
     yield GUID(self, "clsid",
                "CLSID of this storage (valid for storage and root types)")
     yield NullBytes(self, "flags", 4, "User flags")
     yield TimestampWin64(
         self, "creation",
         "Creation timestamp(valid for storage and root types)")
     yield TimestampWin64(
         self, "lastmod",
         "Modify timestamp (valid for storage and root types)")
     yield SECT(
         self, "start",
         "Starting SECT of the stream (valid for stream and root types)")
     if self["/header/bb_shift"].value == 9:
         yield filesizeHandler(
             UInt32(self, "size",
                    "Size in bytes (valid for stream and root types)"))
         yield NullBytes(self, "padding", 4)
     else:
         yield filesizeHandler(
             UInt64(self, "size",
                    "Size in bytes (valid for stream and root types)"))
Exemplo n.º 10
0
 def parseFilename(self):
     yield UInt64(self, "ref", "File reference to the parent directory")
     yield TimestampWin64(self, "ctime", "File Creation")
     yield TimestampWin64(self, "atime", "File Altered")
     yield TimestampWin64(self, "mtime", "MFT Changed")
     yield TimestampWin64(self, "rtime", "File Read")
     yield filesizeHandler(
         UInt64(self, "alloc_size", "Allocated size of the file"))
     yield filesizeHandler(
         UInt64(self, "real_size", "Real size of the file"))
     yield UInt32(self, "file_flags")
     yield UInt32(self, "file_flags2", "Used by EAs and Reparse")
     yield UInt8(self, "filename_length", "Filename length in characters")
     yield Enum(UInt8(self, "filename_namespace"), self.FILENAME_NAMESPACE)
     size = self["filename_length"].value * 2
     if size:
         yield String(self, "filename", size, charset="UTF-16-LE")
Exemplo n.º 11
0
 def createFields(self):
     yield UInt64(self, "zip64_end_size",
                  "Size of zip64 end of central directory record")
     yield ZipVersion(self, "version_made_by", "Version made by")
     yield ZipVersion(self, "version_needed", "Version needed to extract")
     yield UInt32(self, "number_disk", "Number of this disk")
     yield UInt32(self, "number_disk2",
                  "Number of the disk with the start of the central directory")
     yield UInt64(self, "number_entries",
                  "Total number of entries in the central directory on this disk")
     yield UInt64(self, "number_entries2",
                  "Total number of entries in the central directory")
     yield UInt64(self, "size", "Size of the central directory")
     yield UInt64(self, "offset", "Offset of start of central directory")
     if 0 < self["zip64_end_size"].value:
         yield RawBytes(self, "data_sector", self["zip64_end_size"].value,
                        "zip64 extensible data sector")
Exemplo n.º 12
0
 def createFields(self):
     yield String(self, "header_id", 4, "DataBase Header Markup (\"mhbd\")", charset="ISO-8859-1")
     yield UInt32(self, "header_length", "Header Length")
     yield UInt32(self, "entry_length", "Entry Length")
     yield UInt32(self, "unknown[]")
     yield UInt32(self, "version_number", "Version Number")
     yield UInt32(self, "child_number", "Number of Children")
     yield UInt64(self, "id", "ID for this database")
     yield UInt32(self, "unknown[]")
     yield UInt64(self, "initial_dbid", "Initial DBID")
     size = self["header_length"].value-self.current_size/ 8
     if size>0:
         yield NullBytes(self, "padding", size)
     for i in xrange(self["child_number"].value):
         yield DataSet(self, "dataset[]")
     padding = self.seekByte(self["entry_length"].value, "entry padding")
     if padding:
         yield padding
Exemplo n.º 13
0
    def createFields(self):
        yield GUID(self, "guid")
        yield filesizeHandler(UInt64(self, "size"))

        size = self["size"].value - self.current_size / 8
        if 0 < size:
            if self.handler:
                yield self.handler(self, "content", size=size * 8)
            else:
                yield RawBytes(self, "content", size)
Exemplo n.º 14
0
    def createFields(self):
        yield Bytes(self, "signature", 4, "Usually the magic is 'FILE'")
        yield UInt16(self, "usa_ofs", "Update Sequence Array offset")
        yield UInt16(self, "usa_count", "Update Sequence Array count")
        yield UInt64(self, "lsn", "$LogFile sequence number for this record")
        yield UInt16(self, "sequence_number",
                     "Number of times this mft record has been reused")
        yield UInt16(self, "link_count", "Number of hard links")
        yield UInt16(self, "attrs_offset",
                     "Byte offset to the first attribute")
        yield MFT_Flags(self, "flags")
        yield UInt32(self, "bytes_in_use",
                     "Number of bytes used in this record")
        yield UInt32(self, "bytes_allocated",
                     "Number of bytes allocated for this record")
        yield UInt64(self, "base_mft_record")
        yield UInt16(self, "next_attr_instance")

        # The below fields are specific to NTFS 3.1+ (Windows XP and above)
        yield NullBytes(self, "reserved", 2)
        yield UInt32(self, "mft_record_number", "Number of this mft record")

        padding = self.seekByte(self["attrs_offset"].value, relative=True)
        if padding:
            yield padding

        while not self.eof:
            addr = self.absolute_address + self.current_size
            if self.stream.readBytes(addr, 4) == "\xFF\xFF\xFF\xFF":
                yield Bytes(self, "attr_end_marker", 8)
                break
            yield Attribute(self, "attr[]")

        size = self["bytes_in_use"].value - self.current_size // 8
        if size:
            yield RawBytes(self, "end_rawdata", size)

        size = (self.size - self.current_size) // 8
        if size:
            yield RawBytes(self, "end_padding", size,
                           "Unused but allocated bytes")
Exemplo n.º 15
0
 def createFields(self):
     yield String(self, 'capture_pattern', 4, charset="ASCII")
     if self['capture_pattern'].value != self.MAGIC:
         self.warning('Invalid signature. An Ogg page must start with "%s".' % self.MAGIC)
     yield UInt8(self, 'stream_structure_version')
     yield Bit(self, 'continued_packet')
     yield Bit(self, 'first_page')
     yield Bit(self, 'last_page')
     yield NullBits(self, 'unused', 5)
     yield UInt64(self, 'abs_granule_pos')
     yield textHandler(UInt32(self, 'serial'), hexadecimal)
     yield UInt32(self, 'page')
     yield textHandler(UInt32(self, 'checksum'), hexadecimal)
     yield UInt8(self, 'lacing_size')
     if self.lacing_size:
         yield Lacing(self, "lacing", size=self.lacing_size*8)
         yield Segments(self, "segments", size=self._size-self._current_size)
Exemplo n.º 16
0
 def createFields(self):
     yield PascalString16(self,
                          "name",
                          "Name",
                          charset="UTF-16-LE",
                          strip="\0")
     yield Enum(UInt16(self, "type"), self.TYPE_NAME)
     yield UInt16(self, "value_length")
     type = self["type"].value
     size = self["value_length"].value
     name = "value"
     if type == 0 and (size % 2) == 0:
         yield String(self, name, size, charset="UTF-16-LE", strip="\0")
     elif type in (2, 3):
         yield UInt32(self, name)
     elif type == 4:
         yield UInt64(self, name)
     else:
         yield RawBytes(self, name, size)
Exemplo n.º 17
0
 def createFields(self):
     yield GUID(self, "type")
     yield GUID(self, "error_correction")
     yield UInt64(self, "time_offset")
     yield UInt32(self, "data_len")
     yield UInt32(self, "error_correct_len")
     yield Bits(self, "stream_index", 7)
     yield Bits(self, "reserved[]", 8)
     yield Bit(self, "encrypted", "Content is encrypted?")
     yield UInt32(self, "reserved[]")
     size = self["data_len"].value
     if size:
         tag = self["type"].value
         if tag in Object.TAG_INFO:
             name, parser = Object.TAG_INFO[tag][0:2]
             yield parser(self, name, size=size * 8)
         else:
             yield RawBytes(self, "data", size)
     size = self["error_correct_len"].value
     if size:
         yield RawBytes(self, "error_correct", size)
Exemplo n.º 18
0
def specialHeader(s, is_file):
    yield filesizeHandler(
        UInt32(s, "compressed_size", "Compressed size (bytes)"))
    yield filesizeHandler(
        UInt32(s, "uncompressed_size", "Uncompressed size (bytes)"))
    yield Enum(UInt8(s, "host_os", "Operating system used for archiving"),
               OS_NAME)
    yield textHandler(UInt32(s, "crc32", "File CRC32"), hexadecimal)
    yield TimeDateMSDOS32(s, "ftime", "Date and time (MS DOS format)")
    yield textHandler(
        UInt8(s, "version", "RAR version needed to extract file"),
        formatRARVersion)
    yield Enum(UInt8(s, "method", "Packing method"), COMPRESSION_NAME)
    yield filesizeHandler(UInt16(s, "filename_length", "File name size"))
    if s["host_os"].value in (OS_MSDOS, OS_WIN32):
        yield MSDOSFileAttr32(s, "file_attr", "File attributes")
    else:
        yield textHandler(UInt32(s, "file_attr", "File attributes"),
                          hexadecimal)

    # Start additional field from unrar
    if s["flags/is_large"].value:
        yield filesizeHandler(
            UInt64(s, "large_size", "Extended 64bits filesize"))

    # End additional field
    size = s["filename_length"].value
    if size > 0:
        if s["flags/is_unicode"].value:
            charset = "UTF-8"
        else:
            charset = "ISO-8859-15"
        yield String(s, "filename", size, "Filename", charset=charset)
    # Start additional fields from unrar - file only
    if is_file:
        if s["flags/has_salt"].value:
            yield textHandler(UInt8(s, "salt", "Salt"), hexadecimal)
        if s["flags/has_ext_time"].value:
            yield ExtTime(s, "extra_time", "Extra time info")
Exemplo n.º 19
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")
Exemplo n.º 20
0
 def createFields(self):
     yield textHandler(UInt32(self, "unknown[]", "0x01FE"), hexadecimal)
     yield textHandler(UInt32(self, "unknown[]", "0x0"), hexadecimal)
     yield filesizeHandler(UInt64(self, "file_size"))
     yield textHandler(UInt32(self, "unknown[]", "0x0"), hexadecimal)
     yield textHandler(UInt32(self, "unknown[]", "0x0"), hexadecimal)
Exemplo n.º 21
0
 def createFields(self):
     yield NullBytes(self, "unused[]", 1)
     yield String(self, "system_id", 32, "System identifier", strip=" ")
     yield String(self, "volume_id", 32, "Volume identifier", strip=" ")
     yield NullBytes(self, "unused[]", 8)
     yield UInt64(self, "space_size", "Volume space size")
     yield NullBytes(self, "unused[]", 32)
     yield UInt32(self, "set_size", "Volume set size")
     yield UInt32(self, "seq_num", "Sequence number")
     yield UInt32(self, "block_size", "Block size")
     yield UInt64(self, "path_table_size", "Path table size")
     yield UInt32(self, "occu_lpath",
                  "Location of Occurrence of Type L Path Table")
     yield UInt32(self, "opt_lpath",
                  "Location of Optional of Type L Path Table")
     yield UInt32(self, "occu_mpath",
                  "Location of Occurrence of Type M Path Table")
     yield UInt32(self, "opt_mpath",
                  "Location of Optional of Type M Path Table")
     yield RawBytes(self, "root", 34, "Directory Record for Root Directory")
     yield String(self,
                  "vol_set_id",
                  128,
                  "Volume set identifier",
                  strip=" ")
     yield String(self, "publisher", 128, "Publisher identifier", strip=" ")
     yield String(self,
                  "data_preparer",
                  128,
                  "Data preparer identifier",
                  strip=" ")
     yield String(self,
                  "application",
                  128,
                  "Application identifier",
                  strip=" ")
     yield String(self,
                  "copyright",
                  37,
                  "Copyright file identifier",
                  strip=" ")
     yield String(self,
                  "abstract",
                  37,
                  "Abstract file identifier",
                  strip=" ")
     yield String(self,
                  "biographic",
                  37,
                  "Biographic file identifier",
                  strip=" ")
     yield String(self,
                  "creation_ts",
                  17,
                  "Creation date and time",
                  strip=" ")
     yield String(self,
                  "modification_ts",
                  17,
                  "Modification date and time",
                  strip=" ")
     yield String(self,
                  "expiration_ts",
                  17,
                  "Expiration date and time",
                  strip=" ")
     yield String(self,
                  "effective_ts",
                  17,
                  "Effective date and time",
                  strip=" ")
     yield UInt8(self, "struct_ver", "Structure version")
     yield NullBytes(self, "unused[]", 1)
     yield String(self, "app_use", 512, "Application use", strip=" \0")
     yield NullBytes(self, "unused[]", 653)
Exemplo n.º 22
0
 def createFields(self):
     yield GUID(self, "file_id")
     yield UInt64(self, "packet_count")
     yield PaddingBytes(self, "reserved", 2)
     size = (self.size - self.current_size) / 8
     yield RawBytes(self, "data", size)
Exemplo n.º 23
0
 def createFields(self):
     yield textHandler(
         UInt64(self, "next_hdr_offset", "Next header offset"), hexadecimal)
     yield UInt64(self, "next_hdr_size", "Next header size")
     yield textHandler(UInt32(self, "next_hdr_crc", "Next header CRC"),
                       hexadecimal)
Exemplo n.º 24
0
    def createFields(self):
        yield String(self, "header_id", 4, "Track Item Header Markup (\"mhit\")", charset="ISO-8859-1")
        yield UInt32(self, "header_length", "Header Length")
        yield UInt32(self, "entry_length", "Entry Length")
        yield UInt32(self, "string_number", "Number of Strings")
        yield UInt32(self, "unique_id", "Unique ID")
        yield UInt32(self, "visible_tag", "Visible Tag")
        yield String(self, "file_type", 4, "File Type")
        yield Enum(UInt8(self, "x1_type", "Extended Type 1"),self.x1_type_name)
        yield Enum(UInt8(self, "x2_type", "Extended type 2"),self.x2_type_name)
        yield UInt8(self, "compilation_flag", "Compilation Flag")
        yield UInt8(self, "rating", "Rating")
        yield TimestampMac32(self, "added_date", "Date when the item was added")
        yield filesizeHandler(UInt32(self, "size", "Track size in bytes"))
        yield displayHandler(UInt32(self, "length", "Track length in milliseconds"), humanDuration)
        yield UInt32(self, "track_number", "Number of this track")
        yield UInt32(self, "total_track", "Total number of tracks")
        yield UInt32(self, "year", "Year of the track")
        yield UInt32(self, "bitrate", "Bitrate")
        yield UInt32(self, "samplerate", "Sample Rate")
        yield UInt32(self, "volume", "volume")
        yield UInt32(self, "start_time", "Start playing at, in milliseconds")
        yield UInt32(self, "stop_time", "Stop playing at,  in milliseconds")
        yield UInt32(self, "soundcheck", "SoundCheck preamp")
        yield UInt32(self, "playcount_1", "Play count of the track")
        yield UInt32(self, "playcount_2", "Play count of the track (identical to playcount_1)")
        yield UInt32(self, "last_played_time", "Time the song was last played")
        yield UInt32(self, "disc_number", "disc number in multi disc sets")
        yield UInt32(self, "total_discs", "Total number of discs in the disc set")
        yield UInt32(self, "userid", "User ID in the DRM scheme")
        yield TimestampMac32(self, "last_modified", "Time of the last modification of the track")
        yield UInt32(self, "bookmark_time", "Bookmark time for AudioBook")
        yield UInt64(self, "dbid", "Unique DataBase ID for the song (identical in mhit and in mhii)")
        yield UInt8(self, "checked", "song is checked")
        yield UInt8(self, "application_rating", "Last Rating before change")
        yield UInt16(self, "BPM", "BPM of the track")
        yield UInt16(self, "artwork_count", "number of artworks fo this item")
        yield UInt16(self, "unknown[]")
        yield UInt32(self, "artwork_size", "Total size of artworks in bytes")
        yield UInt32(self, "unknown[]")
        yield Float32(self, "sample_rate_2", "Sample Rate express in float")
        yield UInt32(self, "released_date", "Date of release in Music Store or in Podcast")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt8(self, "has_artwork", "0x01 for track with artwork, 0x02 otherwise")
        yield UInt8(self, "skip_wen_shuffling", "Skip that track when shuffling")
        yield UInt8(self, "remember_playback_position", "Remember playback position")
        yield UInt8(self, "flag4", "Flag 4")
        yield UInt64(self, "dbid2", "Unique DataBase ID for the song (identical as above)")
        yield UInt8(self, "lyrics_flag", "Lyrics Flag")
        yield UInt8(self, "movie_file_flag", "Movie File Flag")
        yield UInt8(self, "played_mark", "Track has been played")
        yield UInt8(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "sample_count", "Number of samples in the song (only for WAV and AAC files)")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield Enum(UInt32(self, "media_type", "Media Type for video iPod"),self.media_type_name)
        yield UInt32(self, "season_number", "Season Number")
        yield UInt32(self, "episode_number", "Episode Number")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        yield UInt32(self, "unknown[]")
        padding = self.seekByte(self["header_length"].value, "header padding")
        if padding:
            yield padding

        #while ((self.stream.readBytes(0, 4) == 'mhod') and  ((self.current_size/8) < self["entry_length"].value)):
        for i in xrange(self["string_number"].value):
            yield DataObject(self, "data[]")
        padding = self.seekBit(self._size, "entry padding")
        if padding:
            yield padding