Samsung PVR Content Decrypting tool - final

Here is information about customize your D series firmware..:!:This forum is NOT FOR USER questions or problems but DEVELOPER.

User avatar
juusso
SamyGO Moderator
Posts: 10003
Joined: Sun Mar 07, 2010 6:20 pm

Re: Samsung PVR Content Decrypting tool - final

Post by juusso » Fri Mar 16, 2012 8:28 am

No, here isn`t.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Sisternicky
Posts: 19
Joined: Wed Feb 29, 2012 11:19 pm

Re: Samsung PVR Content Decrypting tool - final

Post by Sisternicky » Sat Mar 24, 2012 8:45 pm

Don't ask me how :) but I managed to get it to work on my UE55C8790.

Propably some FW incompatibility (does not seem to work on 3005.1, 3011.2 is a charm).

So now, there stands nothing in the way for me to create a GUI, or better a reimplementation of the code in a GUI... Be prepared :lol:

DEUS
Official SamyGO Developer
Posts: 316
Joined: Mon Feb 06, 2012 12:05 pm
Location: Germany

Re: Samsung PVR Content Decrypting tool - final

Post by DEUS » Wed Mar 28, 2012 7:13 pm

can this get a part of the widget in /opt like privateer, maybe this post should be there as well
with the following command you get the actual played srf file without srf at the end (73 is pid of exeDSP)
file=$(ls -al /proc/73/fd/ | grep srf | sed 's_.*-> __' | sed 's_srf__')
now get the keyfile with drmget and output it with key extension
[ ! -e "$file"key ] && /dtv/usb/sda/DRMDecrypt/rel/drmget "$file"key
and to decrypt the file
[ ! -e "$file"ts ] && /dtv/usb/sda/DRMDecrypt/rel/drmdecrypt "$file"srf "$file"ts
this can get automated in a script or maybe triggerd via something (php or a loop?)
path's must be adjusted, what will be the best

User avatar
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: Samsung PVR Content Decrypting tool - final

Post by arris69 » Wed Mar 28, 2012 7:34 pm

DEUS wrote:can this get a part of the widget in /opt like privateer, maybe this post should be there as well
with the following command you get the actual played srf file without srf at the end (73 is pid of exeDSP)
file=$(ls -al /proc/73/fd/ | grep srf | sed 's_.*-> __' | sed 's_srf__')
now get the keyfile with drmget and output it with key extension
[ ! -e "$file"key ] && /dtv/usb/sda/DRMDecrypt/rel/drmget "$file"key
and to decrypt the file
[ ! -e "$file"ts ] && /dtv/usb/sda/DRMDecrypt/rel/drmdecrypt "$file"srf "$file"ts
this can get automated in a script or maybe triggerd via something (php or a loop?)
path's must be adjusted, what will be the best
you can get the pid with

Code: Select all

pidof exeDSP
if you provide a full working (init) script ... ;)

DEUS
Official SamyGO Developer
Posts: 316
Joined: Mon Feb 06, 2012 12:05 pm
Location: Germany

Re: Samsung PVR Content Decrypting tool - final

Post by DEUS » Wed Mar 28, 2012 7:41 pm

thank you arris69, already got it in, any style guides for the init? some suggestions or whishes?
file=$(ls -al /proc/$(pidof exeDSP)/fd/ | grep srf | sed 's_.*-> __' | sed 's_srf__')
[ ! -z "$file" -a ! -e "$file"key ] && /dtv/usb/sda/DRMDecrypt/rel/drmget "$file"key
[ ! -z "$file" -a ! -e "$file"ts ] && /dtv/usb/sda/DRMDecrypt/rel/drmdecrypt "$file"srf "$file"ts
happy to provide a basic initscript, already working on it

User avatar
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: Samsung PVR Content Decrypting tool - final

Post by arris69 » Wed Mar 28, 2012 7:53 pm

DEUS wrote:thank you arris69, already got it in, any style guides for the init? some suggestions or whishes?
script should respect parameters start|stop|status (so user get also some information over webinterface)
not sure what status should print out, maybe list of recorded files and info that decripted version is present or not, or file is in recording state or decryption is running...
you can source /dtv/SGO.env

Code: Select all

. /dtv/SGO.env
and then also use variables like $SYSROOT $DISTROOT etc... (see examples in the other init scripts :) )
file=$(ls -al /proc/$(pidof exeDSP)/fd/ | grep srf | sed 's_.*-> __' | sed 's_srf__')
[ ! -z "$file" -a ! -e "$file"key ] && /dtv/usb/sda/DRMDecrypt/rel/drmget "$file"key
[ ! -z "$file" -a ! -e "$file"ts ] && /dtv/usb/sda/DRMDecrypt/rel/drmdecrypt "$file"srf "$file"ts
happy to provide a basic initscript, already working on it
thnx
arris

DEUS
Official SamyGO Developer
Posts: 316
Joined: Mon Feb 06, 2012 12:05 pm
Location: Germany

Re: Samsung PVR Content Decrypting tool - final

Post by DEUS » Thu Mar 29, 2012 12:28 pm

ok this is a very dirty early version. when TV starts it will run for 1 minute searching open movie files and save the coresponding key for further use, just play the file for 10 seconds and the key should be saved, timer gets reseted when file is changed
can be started with live to decrypt current file
todo disk free check; and NW share detection; pvr_privateer detection
auto decrypting of files ( for this its neccesary to supply a keyfile for drmdecrypt as 3 parameter) its possible on Linux machine
decrypt on TV consume a lot CPU can interfere with something

any hits suggestions improvements are welcome
file corrected
You do not have the required permissions to view the files attached to this post.

DEUS
Official SamyGO Developer
Posts: 316
Joined: Mon Feb 06, 2012 12:05 pm
Location: Germany

Re: Samsung PVR Content Decrypting tool - final

Post by DEUS » Thu Mar 29, 2012 4:24 pm

added some checks see code, freespace network share load

EDIT: Howto check on shell if drm is on or off?
You do not have the required permissions to view the files attached to this post.

merilix
Posts: 12
Joined: Wed Apr 04, 2012 11:16 pm

Re: Samsung PVR Content Decrypting tool - final

Post by merilix » Wed Apr 04, 2012 11:35 pm

Why make it easy when you can make it hard?

When you need the encryption key for 20111109131508.srf, just look at offset 8 within 20111109131508.mdb.
Its there :)

just change source of drmdecrypt.c to read drm_key from mdb file:
...
// try .mdb
sprintf(outfile,"%s",argv[1]);
sprintf(&outfile[strlen(outfile)-3],"mdb");
if((outputfp = fopen(outfile, "rb"))){
fseek(outputfp, 8, SEEK_SET);
for (j = 0; j<0x10; j++)
// read each byte separately because of different byte order
fread(&drm_key[(j&0xc)+(3-(j&3))], sizeof(unsigned char), 1, outputfp);
fclose(outputfp);
} else {
printf("Cannot open %s key file\n", outfile);
return 0;
}
...

This way you can decrypt your recordings even if you don't have full SamyGo access to the TV where they are recorded.
:)
UE40D7090LS

gooseye
Official SamyGO Developer
Posts: 132
Joined: Sat Dec 11, 2010 11:32 am

Re: Samsung PVR Content Decrypting tool - final

Post by gooseye » Thu Apr 05, 2012 10:02 am

Nice discovery :-)

Post Reply

Return to “[D] Firmware”