OtrDecoder

Page: onlinetvrecorder.com

Linux decoder for Linux Mint / Debian: Dynamic, 64 bits

Code to decode all .otrkey files in a specific folder:

##!/bin/bash

##############
## Settings ##
##############
Downloads="$HOME/Downloads"
OtrDecoder="$HOME/Downloads/otrdecoder/otrdecoder"
OtrEmail="$OTRMAIL"
echo -n "Password:"
read -s OtrPassword
echo

find "$Downloads" -regex ".+\.otrkey$" -type f | while IFS= read -r file; do
    echo "------------------------------------------------------------"
    echo "File: $file"

    TargetFile=$(echo "$file" | sed -nE 's/(.+)\.otrkey$/\1/p')
    if [ -f "$TargetFile" ]; then
        echo "Output file already exists!"
    elif $OtrDecoder -e "$OtrEmail" -p "$OtrPassword" -o "$Downloads" -i "$file"; then
        # Remove the following line to keep the original file after decoding:
        rm "$file"
        echo "Decoding done"
    else
        echo "Error decoding!"
    fi
    echo "------------------------------------------------------------"
done

echo "No more files found."
read -p "Press enter to continue"

Funny enough, despite the bin-bash header and setting the file to launch in a terminal in the menu editor, I had to add /bin/bash in front of the sh file as the command to execute for it to run.

My Mirror collection

This page was last edited on 2025-08-14 13:16

Powered by Wiki|Docs

This page was last edited on 2025-08-14 13:16

Bjørn Singer
Private wiki!

Powered by Wiki|Docs