Beta Offline decryption utility

There has been some work on using the sound switch as a means of adetection and cropping, see
Thanks for the link. I reverse engineered it into a python script that chops the front and back off the recording to keep avidemux happy plus gives a list of where the ads are. Not quite accurate enough to trust it to remove the ads itself unfortuntely. It's as good as I'm going to get though.
 
This is a python3 script to decrypt .ts files. Works on linux, may work on other OSs, minimal testing done. Put YOUR key in the key string instead of 0000... obviously.
Decoded a 4GB .ts file in 3 minutes on my laptop. Thought someone might find it useful...

Python:
from Crypto.Cipher import DES3
import sys

key = bytearray.fromhex("00000000000000000000000000000000")

des = DES3.new(key,DES3.MODE_ECB)

if len(sys.argv) != 2:
    print("Name of file to fix required")
    exit(1)

with open( sys.argv[1]+"fixed.ts", "wb", buffering=1024*1024) as outfile:
    with open( sys.argv[1], "rb", buffering=1024*1024) as infile:
        rec = infile.read(192)

        while rec:
            if (rec[7] & 0x30 ) == 0x10 :
                decoded = des.decrypt(rec[8:])
                outrec = rec[:8]+decoded
            else:
                start = 9+rec[8]
                stop = 8*int((len(rec)-start)/8)+start
                decoded = des.decrypt(rec[start:stop])
                outrec = rec[:start]+decoded+rec[stop:]

            outfile.write(outrec)
            rec = infile.read(192)

exit(0)
 
Hello,

I had set my Hummy to decrypt recursively at the top, then changed my mind and cancelled it. It now creates two files: the intended recording and one called -dec (e.g. Mission_ Impossible - Fallout_20210220_2100.ts and Mission_ Impossible - Fallout_20210220_2100-dec.ts respectively).

How do I overcome this?

Many thanks in advance,
AEKostas
 
I assume you are using an HD-FOX, as a HDR-FOX does not need to use the beta stripts to achieve decryption.

Recursive decryption from the Video folder is enabled by clicking the OPT+ button icon in WebIF >> Browse Media Files, alongside the heading where it shows the current folder. The option is called "Recursive Auto-Decrypt". Unfortunately, there is nothing to indicate whether it is enabled or not until you click it - a message will briefly say whether it has just been enabled or disabled (this seems like an oversight).

It seems likely that you have not actually disabled it, therefore each auto-cycle (every 10 minutes) new recordings are scanned for and queued for decryption.

There should then follow a clean-up, unless the result of decryption is obviously not the right size.
 
Thanks for the very prompt response. I am on the wrong thread. :-( Is there a way to move my q etc to the correct thread?

It is an HDR-Fox T2 that I have.

I clicked on the option and it set it; on the second click it then un-set it (the latest message is "Unflagged directory as autodecryptR").

The files look to be the same size (6.02 GiB).
 
All you need to do is delete the one you don't want. Something went wrong with the clean-up, but it sounds like it was a one-off.
 
Alas it’s a frequent occurrence. I think it happens when the target is the top level; and it doesn’t when in folders (series).
 
This is a python3 script to decrypt .ts files. Works on linux, may work on other OSs, minimal testing done. Put YOUR key in the key string instead of 0000... obviously.
Decoded a 4GB .ts file in 3 minutes on my laptop. Thought someone might find it useful...

Nowhereman, thank you for your python script. I got it to run under Linux Mint (but had to change 'key = bytearray.fromhex('dcd3213cc7d236333731303530383430')" to "key = bytes.fromhex('dcd3213cc7d236333731303530383430')" ), since it flagged an error. I used the key comprising MAC address plus the first ten bytes of the serial number, but the decrypted output file was still gibberish. Is this because I have a FOXSAT-HDR, or am I missing something with 'bytearray.fromhex'?

Thanks for your help.
 
Is this because I have a FOXSAT-HDR
I believe the only known way of 'decrypting' Foxsat-HDR recordings is by installing Nowster's patch before you make the recordings, which actually stops them being encrypted in the first place. You can't retrospectively decrypt them once encrypted.
 
I believe the only known way of 'decrypting' Foxsat-HDR recordings is by installing Nowster's patch before you make the recordings, which actually stops them being encrypted in the first place. You can't retrospectively decrypt them once encrypted.

Thanks. That's what I thought/feared.

I have only recently discovered Nowster and it is now installed, but I have many old HD recordings transferred to my NAS, and fear that I will be unable to play them when my aging Foxsat-HDR eventually dies. Are the encryption algorithms used by the FOXSAT-HDR and HDR-FOX-T2 going to be that different?

"The impossible we do at once. Miracles take a little longer."
 
Last edited:
Are the encryption algorithms used by the FOXSAT-HDR and HDR-FOX-T2 going to be that different?
They are different, but nobody knows exactly how different, outside of the folks at Humax, and they won't tell you.
 
Nowhereman, thank you for your python script. I got it to run under Linux Mint (but had to change 'key = bytearray.fromhex('dcd3213cc7d236333731303530383430')" to "key = bytes.fromhex('dcd3213cc7d236333731303530383430')" ), since it flagged an error. I used the key comprising MAC address plus the first ten bytes of the serial number, but the decrypted output file was still gibberish. Is this because I have a FOXSAT-HDR, or am I missing something with 'bytearray.fromhex'?

Thanks for your help.
I can't comment on whether it will work for HDR vs an HDR T2 but my key looks like this "000378b9a70836333731303433313931" with the mac address being
00:03:78:b9:a7:08 and the Serial Number: 63 7104319 11498

If you have custom firmware the correct key is at the bottom of the diagnostics web page in the system information.
 
Thanks. It was the 'bytes.fromhex' vs 'bytearray.fromhex' issue that I was puzzled by. It works with the former, but throws an error for the latter.

Yes, I have Custom firmware V4.1.3. I don't see a diagnostics web page under system information though, but I'm sure the key is correct.
MAC address:- dc-d3-21-3c-c7-d2; s/n:- 637105084007084.
 

Attachments

  • Freesat webpage.jpg
    Freesat webpage.jpg
    204 KB · Views: 6
I don't see a diagnostics web page under system information though
You are conflating FOXSAT-HDR with HDR-FOX. "nowhereman" is referring to the WebIF for the latter.

No, we don't know how to decrypt FOXSAT-HDR recordings (nor any other recordings). This thread is only about decrypting recordings from the HDR-FOX and the HD-FOX.
 
If there are example encrypted and decrypted versions of the same file available it should be possible to see if they have used the same approach at least. i.e. only encrypt part of each packet.
 
If there are example encrypted and decrypted versions of the same file available it should be possible to see if they have used the same approach at least. i.e. only encrypt part of each packet.
If you say so. Being so confident, perhaps you should volunteer to have a go.
 
If there are example encrypted and decrypted versions of the same file available
I don't see how you would generate such files.
it should be possible to see if they have used the same approach at least. i.e. only encrypt part of each packet.
I haven't (and can't now) check a Foxsat, but the HDR-Fox T2 doesn't encrypt the sync/PID etc. bytes.
 
Last edited:
Back
Top