Skip to content

Instantly share code, notes, and snippets.

@robocoder
Last active June 11, 2020 14:04
Show Gist options
  • Save robocoder/fc9a28fd1500d510d197a4209996d0f3 to your computer and use it in GitHub Desktop.
Save robocoder/fc9a28fd1500d510d197a4209996d0f3 to your computer and use it in GitHub Desktop.
Purple Player, Platform Purple, DRM, Leaping Brain, Brain Trust
Audience: video content creators
It is alleged that:
* the initial DRM implementation simply XOR'd the first 13 bytes of the first 15 x 1K blocks of the video file;
* the 13 byte key was literally, "RANDOM STRING"
* reference: https://plus.google.com/+AsherLangton/posts/Yk71MgkvAXx
It was later observed that:
* the DRM implementation was changed to XOR the first 32 bytes of the first 16 x 1K blocks of the video file;
* the 32 byte key appears random;
* 6 bytes are appended to the end of the file (presumably to identify the original purchaser;
* trivially circumvented by modifying the BrainPlayer python script to save the decrypted file, e.g.,
```
*** ~/Library/Application Support/LeapingBrain/catalog/player/BrainPlayer.app/Contents/Resources/brainplayer.py.orig 2012-04-07 00:30:00.000000000 -0400
--- ~/Library/Application Support/LeapingBrain/catalog/player/BrainPlayer.app/Contents/Resources/brainplayer.py 2012-04-07 00:30:00.000000000 -0400
***************
*** 549,554 ****
--- 549,559 ----
# Internal methods
#
def load(self, filename, start_time, enable_subtitles, window_state, vlc_args):
+ # HACK: make a copy of the "decrypted" file
+ import shutil
+ fakefilename = filename+"-decrypted.mp4"
+ shutil.copy(filename,fakefilename)
+ # END HACK
"""Load a file and set its starting time."""
self.enable_media_controls(False)
self.enabled_subtitles = enable_subtitles
```
Changes observed in Purple Player 3.2.3:
* the DRM implementation now XORs only the first 32 bytes of the video file;
* no additional bytes are appended to the end of the file;
* while the brain player python script is gone, circumvention may actually be easier because the .mp4 header is 28 to 32 bytes long, e.g.,
```
0000000 \0 \0 \0 034 f t y p m p 4 2 \0 \0 \0 \0
0000020 m p 4 2 i s o m a v c 1 ?? ?? ?? ??
```
or
```
0000000 \0 \0 \0 f t y p i s o m \0 \0 002 \0
0000020 i s o m i s o 2 a v c 1 m p 4 1
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment