Detecting DRM protected files

Martijn van Rheenen rheenen at gmail.com
Wed Mar 30 09:08:26 CEST 2011


Tested the DRM code, and only found 2 errors in asffile.cpp, then it
worked!!!!

I included the GUID's wrong (reversed order of first 3 groups of bytes, and
so on), so here are the correct GUIDs to replace the bottom 2 GUID lines
with:

static ByteVector
contentEncryptionGuid("\xFB\xB3\x11\x22\x23\xBD\xD2\x11\xB4\xB7\x00\xA0\xC9\x55\xFC\x6E",
16);
static ByteVector extendedContentEncryptionGuid("\x14\xE6\x8A\x29\x22\x26
\x17\x4C\xB9\x35\xDA\xE0\x7E\xE9\x28\x9C", 16);
static ByteVector
advancedContentEncryptionGuid("\xB6\x9B\x07\x7A\xA4\xDA\x12\x4E\xA5\xCA\x91\xD3\x8D\xC1\x1A\x8D",
16);

Then the detection of those GUID's in the ASF file: They are not found in
the HeaderExtension, but in the ASF Header itself. So I removed the
detection from the ASF::File::HeaderExtensionObject::parse() function, and
addit it to the ASF::File::read() function, like included below:


    ...
    else if(guid == headerExtensionGuid) {
      obj = new HeaderExtensionObject();
    }
    else {
      //NEW CODE STARTS HERE
      if(guid == contentEncryptionGuid || guid ==
extendedContentEncryptionGuid || guid == advancedContentEncryptionGuid) {
        d->properties->setEncrypted(true);
      }

      obj = new UnknownObject(guid);
    }
    ...

On Tue, Mar 29, 2011 at 4:53 PM, Martijn van Rheenen <rheenen at gmail.com>wrote:

> Thanks for that, will check out the drm branch and test it. It will take
> more time to find a proper DRM-protected m4a and wma file... But thanks a
> bunch!
>
> 2011/3/29 Lukáš Lalinský <lalinsky at gmail.com>
>
>> On Tue, Mar 29, 2011 at 4:27 PM, Martijn van Rheenen <rheenen at gmail.com>
>> wrote:
>> > Ooops, I see you were way ahead of me! Thanks for that quick fix!!!!
>> > Is it possible that I submit the 'protected' extension to WMA / ASF file
>> > reading or should I leave it up to you? ;)
>>
>> I've actually already done that as well, based on your mail. :)
>>
>> https://github.com/lalinsky/taglib/commit/7a6647cb9
>>
>> If the code in the drm branch works for you, I'll merge it into master.
>>
>> Lukas
>> _______________________________________________
>> taglib-devel mailing list
>> taglib-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/taglib-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20110330/055c5e45/attachment.htm 


More information about the taglib-devel mailing list