Skip to content

Instantly share code, notes, and snippets.

@all3kcis
Last active April 28, 2024 12:00
Show Gist options
  • Save all3kcis/66909ed95755146a6969b32f21171642 to your computer and use it in GitHub Desktop.
Save all3kcis/66909ed95755146a6969b32f21171642 to your computer and use it in GitHub Desktop.
Emby Theater premiere bypass

/!\ Anyone interested in this Gist should look at the work of @danielchc ;)
-> https://gist.github.com/danielchc/c159626485a08c76856b2d30ae457e04

DNS

/!\ I used bind9 on my local server to add mb3admin.com entry for all devices ( like android app ) Otherwise in hosts fie :

<your_server> mb3admin.com

Optionnal (electron app - Emby Theater) main.js update

C:\Users\<YOUR_USER>\AppData\Roaming\Emby-Theater\system\electronapp
Add after app.on('window-all-closed', function () { block L:18
To accept self certificate

app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
        event.preventDefault()
        callback(true)
})

On your web server

  • Create /var/www/mb3admin.com folder
  • In /var/www/mb3admin.com/ create file index.php with
<?php
if (false){
	$file = 'data.log';
	$content = file_get_contents($file);
	$content .= date('Y-m-d H:i:s').' : '.$_SERVER['REMOTE_ADDR'].' URL : '.$_SERVER['REDIRECT_URL'].' Query : '.json_encode($_REQUEST)."\r\n";
	file_put_contents($file, $content);
}

if ($_SERVER['REDIRECT_URL'] == '/admin/service/registration/validate'){
	header('content-type:application/json');
	$date = new DateTime();
	$date->add(new DateInterval('P14D'));
	echo '{"featId":"'.$_POST['feature'].'","registered":true,"expDate":"'.$date->format('Y-m-d').'","key":"'.$_POST['key'].'"}';
	
}elseif ($_SERVER['REDIRECT_URL'] == '/admin/service/registration/validateDevice'){
	header('content-type:application/json');
	echo '{"cacheExpirationDays":21,"resultCode":"GOOD","message":"Device Valid"}';
}
  • Create file .htaccess
Allow from all Options -Indexes <IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] </IfModule>

Apache site conf

# /etc/apache2/sites-enabled/mb3admin.conf
<VirtualHost *:80>
        DocumentRoot "/var/www/mb3admin.com"
        ServerName mb3admin.com

        <Directory "/var/www/mb3admin.com/">
                Options MultiViews FollowSymlinks

                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        TransferLog /var/log/apache2/mb3admin_access.log
        ErrorLog /var/log/apache2/mb3admin_error.log
</VirtualHost>

<VirtualHost *:443>
        DocumentRoot "/var/www/mb3admin.com"
        ServerName mb3admin.com

        SSLEngine on
        SSLCertificateFile      /etc/apache2/mb3admin.crt # Self signed certificate
        SSLCertificateKeyFile /etc/apache2/mb3admin.key


        <Directory "/var/www/mb3admin.com/">
                Options MultiViews FollowSymlinks

                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        TransferLog /var/log/apache2/mb3admin_access.log
        ErrorLog /var/log/apache2/mb3admin_error.log
</VirtualHost>
@DrissiReda
Copy link

@DrissiReda "unpack" Emby.Web.dll with ildasm and you will find the connectionmanager.js

See examples above.

Like I said, I have found it, after unpacking that dll, and I modified it, the UI shows I have emby premiere but I have no features. And Emby Theather doesn't work.

@rossi29
Copy link

rossi29 commented May 31, 2022

Good morning all,
can a charitable person explain to me how to do it
thank you

@DrissiReda
Copy link

Good morning all, can a charitable person explain to me how to do it thank you

Don't bother, it does not work anymore.

@rossi29
Copy link

rossi29 commented Jun 1, 2022

ok thank you for your answer

@ogry
Copy link

ogry commented Jun 1, 2022 via email

@rossi29
Copy link

rossi29 commented Jun 3, 2022

Seulement cinq mots : SUIVEZ ATTENTIVEMENT TOUTES LES INSTRUCTIONS En miércoles, 1 de junio de 2022, 18:57:46 CEST, rossi29 @.> escribió : @rossi29 a commenté cet essentiel. ok merci pour votre réponse — Répondez directement à cet e-mail, consultez-le sur GitHub ou désabonnez-vous. Vous recevez ceci parce que vous avez commenté. ID du message : @.>

Sorry, I don't understand your message.

@potatoru
Copy link

potatoru commented Jun 4, 2022

Only five words: FOLLOW CAREFULLY ALL THE INSTRUCTIONS

This. I still use it and it works.

@rossi29
Copy link

rossi29 commented Jun 4, 2022

OK
I don't know where to install the file "Create /var/www/mb3admin.com folder
In /var/www/mb3admin.com/create file index.php with"
thanks to you potatoru

@rossi29
Copy link

rossi29 commented Jun 4, 2022

possibility of a tutorial

@rossi29
Copy link

rossi29 commented Jun 6, 2022

anyone for a step by step explanation

@raphant
Copy link

raphant commented Jun 7, 2022

Only five words: FOLLOW CAREFULLY ALL THE INSTRUCTIONS

This. I still use it and it works.

What version of Emby are you using? And are you hosting it through Docker?

@potatoru
Copy link

potatoru commented Jun 9, 2022

What version of Emby are you using? And are you hosting it through Docker?

I use the latest 4.8.0.0 beta. Yes I use custom docker image based on linuxserver, but with the addition of very small patch. It works fine for web client and hw transcode, but you still need a DNS and a web server for your mobile clients.

@thekin988
Copy link

What version of Emby are you using? And are you hosting it through Docker?

I use the latest 4.8.0.0 beta. Yes I use custom docker image based on linuxserver, but with the addition of very small patch. It works fine for web client and hw transcode, but you still need a DNS and a web server for your mobile clients.

can you give me guide ? i have iis with ssl, please, thanks you.

@danielchc
Copy link

danielchc commented Nov 1, 2022

@potatoru
Copy link

potatoru commented Nov 2, 2022

My solution with a Docker container https://gist.github.com/danielchc/c159626485a08c76856b2d30ae457e04

Great job!

@all3kcis
Copy link
Author

all3kcis commented Nov 3, 2022

My solution with a Docker container https://gist.github.com/danielchc/c159626485a08c76856b2d30ae457e04

Nice job ;)

@1ucay
Copy link

1ucay commented Mar 25, 2024

Best method is replacing mb3admin.com in DLL.
Download https://www.softtreetech.com/24x7/archive/50.htm
FileBinReplace.exe Emby.Web.dll mb3admin.com mydomain.com
Domains has to be 12 characters. On domain there is index.php in this gists.

@iPleyGit
Copy link

thanks for everything! What files would I have to modify to unlock the Android app and Android TV?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment