1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unencrypt is not unencrypting

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by Two Steps, Mar 4, 2012.

  1. Two Steps

    Two Steps New Member

    Hi guys,

    I have been lurking for ages and through this forum I have been able to customise my HDR Fox-T2 using the fantastic custom firmware produced here.

    Up until now I have not needed to ask a question myself as I have always been able to deal with any issues by reading about other people's experiences. That was until I installed Unencrypt.

    The problem I have encountered is that it simply doesn't seem to work for me. I decided I was going to have my whole videos folder decrypted and therefore when I used Telnet I typed unencryptsetup followed by y to confirm I wanted to decrypt everything. I got the response:-

    The following line has been added to cron
    1,31 1-6 * * * /mod/sbin/unencrypt "/mnt/hd2" > /mod/tmp/unencrypt.log 2>&1

    Unfortunately it does not seem to decrypt anything, and that is after waiting days.

    When I go onto diagnostics the unencrypt.log was previously saying that the DLNA server may have crashed. It now says:-

    >>> Contents of /mod/tmp/unencrypt.log 26.00 bytes
    -/bin/sh: 1,31: not found

    I have rebooted on a number of occasions and have switched unencryption on and off, uninstalled it and reinstalled it, but still no unencryption is happening.

    I am not at all techy, so even using Telnet I am out of my comfort zone.

    If anyone has any idea how I can get get unencrypt to work I would be very grateful.
  2. 4291

    4291 Well-Known Member

    Presumably you have read this:


    This function will unencrypt all files in a designated directory (or all files in My Video) automatically, Files are de-crypted at the same location e.g. 'decrypt in place' and are processed at the rate of one file every 30 Mins. max. so don't expect instant results
    To setup Unencrypt install the package and then via Telnet enter one of the lines below :-
    unencryptsetup "Bob's Videos" process a single directory
    unencryptsetup process all files in 'My Video'
    unencryptsetup disable Turn off unencrypt
    This will update the cron table and schedule the program to run every 30 minutes (at Mins 01 and 31) indefinitely. Every time it runs, it will check that there isn't already another job running and then decrypt the first encrypted file that it finds in the directory you specified, therefore gradually working its way through your files, If you don't specify a directory, it will default to decrypting all of your recordings.
    Auto-Unprotect must be running
    Media sharing must = on
    Set-up Telnet as follows :- Putty Configuration >> Catagory = Telnet >> return Key sends Telnet New Line instead of ^M should be 'un-Ticked' (or if using Windows Telnet use "unset crlf" before opening the session)
  3. Two Steps

    Two Steps New Member

    Hi 4291,

    Yes I have followed all those instructions. Media Sharing is on, although I switched it off an on a few times in case that was the issue. Auto-unptotect is running.

    As far as I can see I used telnet properly and got the response:-

    The following line has been added to cron
    1,31 1-6 * * * /mod/sbin/unencrypt "/mnt/hd2" > /mod/tmp/unencrypt.log 2>&1
  4. 4291

    4291 Well-Known Member

    I had to ask. It is difficult to diagnose peoples' problems without knowing exactly what they are doing.
  5. Sam Widges

    Sam Widges Active Member

    That looks very strange, like there's something up with cron and it's trying to run that line as the input to another command or similar.

    I suspect that it may be a problem with one of the previous lines because a broken crontab entry wouldn't try to run unencrypt at all, but you are getting something in the log, so something is being scheduled, somehow. Could you please telnet into the box and record the output from "crontab -l"

    Also, could you please tell me what packages that you have installed, using the command "opkg list-installed".

    The good news is that it shouldn't be telnet related because that just stops the cron job being set up in the first place.
  6. Two Steps

    Two Steps New Member

    Hi Sam you will have to help me out a bit here. What do I do on telnet to record the output from "crontab-l"?
    Installed packages are as follows:-
    anacron - 2.3-1
    auto-unprotect - 1.0.6
    auto-update - 1.0.0
    busybox - 1.19.3-3
    bzip2 - 1.0.4
    cron-daemon - 1.18.3-1
    custom-portal - 1.12
    epg - 1.0.9
    ffmpeg - 0.10
    file - 5.0.4
    hmt - 1.1.6
    id3v2 - 0.1.11-1
    inotify-tools - 3.14
    jim - 0.73-1
    jim-cgi - 0.5
    jim-oo - 0.71
    jim-sqlite3 - 0.73
    lamemp3 - 3.98.4
    libevent - 2.0.11
    lsof - 4.82
    mongoose - 3.0-7
    nicesplice - 1.1
    openssl-command - 1.0.0.d
    rs - 0.4.4-1
    samba - 2.2.12-3
    service-control - 1.2
    sqlite3 - 3.7.6
    ssmtp - 2.64
    trm - 1.0
    unencrypt - 0.1.4
    virtual-disk - 1.1
    webif - 0.9.3-4
    webif-iphone - 1.0.0
  7. Black Hole

    Black Hole May contain traces of nut

    It rather depends which Telnet client you are using, but broadly speaking you probably have a scrolling console window with your Telnet session commands and responses scrolling up just like an old VDU. However, you probably also have a scroll bar down the side, so that once the output is complete you can actually roll the output back to see what's gone off the screen at the top.

    Get what you want in view and then you can cut and paste it straight from the Telnet window into your reply here, and if you want to be really fancy enclose it in code / end code tags (I can't type them plain because the forum would interpret them, but you will get the idea from this: [ c o d e ] .... [ / c o d e ]
  8. Sam Widges

    Sam Widges Active Member

    Nothing looks too strange in the list of packages, I may revisit that later, ta.

    You can see the file via webif - go to the diagnostics page and click on file editor, then click on 'Open' and browse to /mod/var/spool/cron/crontabs/root. Copy the text in the box and then simply click "Back to diagnostics" so that no changes are made.
  9. Two Steps

    Two Steps New Member

    Sorry for being a bit slow, but what am I supposed to be typing into telnet to record the output from "crontab-l"? I have no idea what crontab-l is btw.
  10. Two Steps

    Two Steps New Member

    Followed your instructions Sam. Here is the data.

    0 2 * * * /mod/sbin/anacron -s -d
    */10 * * * * /mod/sbin/rs_process >> /mod/tmp/rs.log 2>&1
    1,31 1-6 * * * /mod/sbin/unencrypt "/mnt/hd2" > /mod/tmp/unencrypt.log 2>&1
  11. Black Hole

    Black Hole May contain traces of nut

    It's a command to type into Telnet, but that's not important right now
  12. Sam Widges

    Sam Widges Active Member

    What happens when you run unencrypt on its own? Telnet in and type "/mod/sbin/unencrypt".

    If you tell me what telnet client you are using, e.g. Windows, Mac, plain Telnet, PuTTY etc. and I'll try and give you some solid pointers to copying some of the output.

    By the way "crontab -l" just lists the contents of the file that we checked, but it's quicker to do it that way if you are already using telnet. If you do give it a go, make sure that you put a space between the "crontab" and "-l".
  13. Two Steps

    Two Steps New Member

    I'm using PuTTY. I've done as you said and copied it here:-

    humax# /mod/sbin/unencrypt
    Humax HDR-T2 decryption utility
    Version 0.0.4
    Needs hmt 1.1.0 to work

    Works its way through your videos and decrypts the first encrypted one found
    Designed to be called from cron

    Target path needed
  14. Ezra Pound

    Ezra Pound Well-Known Member

    unencrypt has been modified to prevent over loading the CPU, the cron you listed e.g. 1,31 1-6 * * * /mod/sbin/unencrypt "/mnt/hd2" > /mod/tmp/unencrypt.log 2>&1
    shows that it will unencrypt at 1 min and 31 min past each hour BUT only during the hours of 1 to 6 AM which means that your Humax must be out of standby between 1 and 6AM, If it is in standby during these hour there will be no unencrypt taking place
    If you have an auto turn on / auto turn off between 1AM and 6AM you will get up to 12 unencrypted files per night
  15. Black Hole

    Black Hole May contain traces of nut

    Good point. I modified mine to run every 5 minutes all day.
  16. Sam Widges

    Sam Widges Active Member

    Drat, I meant to ask you to run
    /mod/sbin/unencrypt "/mnt/hd2"
    Please run that command instead.

    To record the output from PuTTY, right-click on the title bar of the window and select "Copy All to Clipboard". You can then paste the results into notepad or similar for editing and then pasting in here. If you get lots of similar lines starting with "Processing", feel free to trim them out and just include the first few and the last few.
  17. Sam Widges

    Sam Widges Active Member

    That's a good point Ezra - I need a message in the installation instructions telling people to leave it on overnight.

    I'm still confused why this is happening, though
    >>> Contents of /mod/tmp/unencrypt.log 26.00 bytes
    -/bin/sh: 1,31: not found
  18. Two Steps

    Two Steps New Member

    Ezra, I didn't realise it was that simple!! I do normally put my Humax in standby at night, so that explains it then.

    I will keep it out of standby tonight and see what it does.
  19. Two Steps

    Two Steps New Member

    Sam I ran what you asked and here is the data:-

    humax# /mod/sbin/unencrypt "/mnt/hd2"
    Processing "My Video/Films/The Borrowers_20110425_1200", Media ID is 64
    Connecting to (
    64.TS 4% |* | 280M 0:16:03 ETA
  20. Sam Widges

    Sam Widges Active Member

    Hopefully it is that simple, let me know how you get on.

    If you want it to run during the day as well, use the editor in the webif diagnostics to edit the crontab line to say:
    1,31 * * * * /mod/sbin/unencrypt "/mnt/hd2" > /mod/tmp/unencrypt.log 2>&1 
    Note the "1-6" is changed to "*"

    After that, just reboot the box and unencrypt will run during the day as well.