Explaination of Python code snippet
<p>For a class assignment, I'm analyzing how Amazon's Kindle digital rights management implementation works as well as how to defeat it.  In my research, I came across a set of Python scripts that extract out the book data from the encryption.  It fits my needs for explaining the encryption-cracking part of my paper.</p>

<p>Problem is, I'm not fluent in Python or have any experience other than <code>print 'Hello World'</code>.</p>

<p>When working my way through the source code, I came across this snippet</p>

<pre><code>def __init__(self, infile):
    # initial sanity check on file
    self.data_file = file(infile, 'rb').read()
    self.mobi_data = ''
    self.header = self.data_file[0:78]

    if self.header[0x3C:0x3C+8] != 'BOOKMOBI' and self.header[0x3C:0x3C+8] != 'TEXtREAd':
        raise DrmException("invalid file format")

    self.magic = self.header[0x3C:0x3C+8]
    self.crypto_type = -1
</code></pre>

<p>My interpretation of the code goes like this:</p>

<ol>
<li><code>self.data_file</code> is a byte array that is returned by <code>read()</code> on the <code>file(infile, 'rb')</code> call.</li>
<li><code>self.header</code> is the value of the first 79 bytes of the data file</li>
</ol>

<p>The problem I'm having is just what does <code>self.header[0x3C:0x3C+8]</code> mean?</p>
