Page 9 of 13

Re: Samsung PVR Content Decrypting tool - final

Posted: Fri Mar 16, 2012 8:28 am
by juusso
No, here isn`t.

Re: Samsung PVR Content Decrypting tool - final

Posted: Sat Mar 24, 2012 8:45 pm
by Sisternicky
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:

Re: Samsung PVR Content Decrypting tool - final

Posted: Wed Mar 28, 2012 7:13 pm
by DEUS
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

Re: Samsung PVR Content Decrypting tool - final

Posted: Wed Mar 28, 2012 7:34 pm
by arris69
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 ... ;)

Re: Samsung PVR Content Decrypting tool - final

Posted: Wed Mar 28, 2012 7:41 pm
by DEUS
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

Re: Samsung PVR Content Decrypting tool - final

Posted: Wed Mar 28, 2012 7:53 pm
by arris69
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

Re: Samsung PVR Content Decrypting tool - final

Posted: Thu Mar 29, 2012 12:28 pm
by DEUS
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

Re: Samsung PVR Content Decrypting tool - final

Posted: Thu Mar 29, 2012 4:24 pm
by DEUS
added some checks see code, freespace network share load

EDIT: Howto check on shell if drm is on or off?

Re: Samsung PVR Content Decrypting tool - final

Posted: Wed Apr 04, 2012 11:35 pm
by merilix
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.
:)

Re: Samsung PVR Content Decrypting tool - final

Posted: Thu Apr 05, 2012 10:02 am
by gooseye
Nice discovery :-)