Jump to content


Photo

YouTube not work in latest firmwares...


  • Please log in to reply
121 replies to this topic

Re: YouTube not work in latest firmwares... #61 kokikoku

  • Senior Member
  • 42 posts

0
Neutral

Posted 24 May 2017 - 11:52

 

@kokikoku

 

This one will be valid for your STB:

http://iptvplayer.pl...ni_patch.tar.gz

 

Installation:

# backup
cp /usr/lib/python2.7/ssl.py /usr/lib/python2.7/ssl.py_backup
cp /usr/lib/python2.7/lib-dynload/_ssl.so /usr/lib/python2.7/lib-dynload/_ssl.so_backup
cp /usr/lib/python2.7/httplib.py /usr/lib/python2.7/httplib.py_backup
 
# installation
cd /tmp
wget http://iptvplayer.pl/resources/python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz
tar -xvf python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz -C /
rm python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz
sync
reboot
reboot -f
 

Regards,

SSS

 

 

 

 

openpli 4 h5

h5 login: root
root@h5:~# cp /usr/lib/python2.7/ssl.py /usr/lib/python2.7/ssl.py_backup
cp: can't stat '/usr/lib/python2.7/ssl.py': No such file or directory
root@h5:~# cp /usr/lib/python2.7/lib-dynload/_ssl.so /usr/lib/python2.7/lib-dynload/_ssl.so_backup
root@h5:~# cp /usr/lib/python2.7/httplib.py /usr/lib/python2.7/httplib.py_backup
cp: can't stat '/usr/lib/python2.7/httplib.py': No such file or directory
root@h5:~#

 

in Openpli, there file name are ssl.pyo httplib.pyo.



Re: YouTube not work in latest firmwares... #62 kokikoku

  • Senior Member
  • 42 posts

0
Neutral

Posted 24 May 2017 - 12:04

OpenPLi 4 on Zgemma H5

 

I am waiting for further help.

 

OpenSSL version

 

root@h5:~# openssl version
OpenSSL 1.0.1j 15 Oct 2014
root@h5:~# ls -la /usr/lib/libssl*
-rwxr-xr-x    1 root     root        356424 May 19 20:51 /usr/lib/libssl.so.1.0.0
root@h5:~# -rwxr-xr-x    1 root     root        356424 Feb  3  2016 /usr/lib/libssl.so.1.0.0
-sh: -rwxr-xr-x: not found
root@h5:~# grep OPENSSL /usr/lib/libssl.so.1.0.0
OPENSSL_cleanse
OPENSSL_DIR_read
OPENSSL_DIR_end
OPENSSL_1.0.0
OPENSSL_1.0.1
OPENSSL_1.0.1d
OPENSSL_DIR_read(&ctx, '
OPENSSL_malloc Error

 

glibc version

 

root@h5:~# ls -la /lib/libc-*
-rwxr-xr-x    1 root     root       1537564 May 19 20:39 /lib/libc-2.20.so

 

hard/soft float

 

root@h5:/var/volatile/tmp# ./readelf -a /lib/libc-*.so | grep FP:
  Tag_GNU_MIPS_ABI_FP: Hard float (double precision)



Re: YouTube not work in latest firmwares... #63 kokikoku

  • Senior Member
  • 42 posts

0
Neutral

Posted 24 May 2017 - 12:13

root@h5:/var/volatile/tmp# wget iptvplayer.pl/temp/python_sni_test.py -O - | python2.7
Connecting to iptvplayer.pl (87.98.239.40:80)
-                    100% |***********************************************************************|   325   0:00:00 ETA
Traceback (most recent call last):
  File "<stdin>", line 10, in <module>
  File "/usr/lib/python2.7/urllib2.py", line 400, in open
  File "/usr/lib/python2.7/urllib2.py", line 418, in _open
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
  File "/usr/lib/python2.7/urllib2.py", line 1215, in https_open
  File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:506: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure>


Edited by kokikoku, 24 May 2017 - 12:14.


Re: YouTube not work in latest firmwares... #64 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 24 May 2017 - 16:04

@SSS

 

If I compare your _ssl.c with our _ssl.c (from PLi-4) after all the patches have been applied then I get the following:

--- a/Modules/_ssl.c    2017-05-24 12:37:25.765734114 +0200
+++ b/Modules/_ssl.c    2017-05-24 14:11:43.670726565 +0200
@@ -265,7 +265,7 @@
                enum py_ssl_server_or_client socket_type,
                enum py_ssl_cert_requirements certreq,
                enum py_ssl_version proto_version,
-               char *cacerts_file, char *ciphers)
+               char *cacerts_file, char *server_hostname, char *ciphers)
 {
     PySSLObject *self;
     char *errstr = NULL;
@@ -372,7 +372,7 @@

     /* ssl compatibility */
     SSL_CTX_set_options(self->ctx,
-                        SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS);
+                        (SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) | SSL_OP_NO_SSLv3);

     verification_mode = SSL_VERIFY_NONE;
     if (certreq == PY_SSL_CERT_OPTIONAL)
@@ -385,6 +385,14 @@

     PySSL_BEGIN_ALLOW_THREADS
     self->ssl = SSL_new(self->ctx); /* New ssl struct */
+#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
+    /* If SNI isn't supported, we just don't call it and fail silently,
+     * as there's not much else we can do.
+     */
+    if ((socket_type == PY_SSL_CLIENT) &&
+             (proto_version != PY_SSL_VERSION_SSL2) && server_hostname)
+        SSL_set_tlsext_host_name(self->ssl, server_hostname);
+#endif
     PySSL_END_ALLOW_THREADS
     SSL_set_fd(self->ssl, Sock->sock_fd);       /* Set the socket for SSL */
 #ifdef SSL_MODE_AUTO_RETRY
@@ -427,15 +435,16 @@
     char *key_file = NULL;
     char *cert_file = NULL;
     char *cacerts_file = NULL;
+    char *server_hostname = NULL;
     char *ciphers = NULL;

-    if (!PyArg_ParseTuple(args, "O!i|zziizz:sslwrap",
+    if (!PyArg_ParseTuple(args, "O!i|zziizzz:sslwrap",
                           PySocketModule.Sock_Type,
                           &Sock,
                           &server_side,
                           &key_file, &cert_file,
                           &verification_mode, &protocol,
-                          &cacerts_file, &ciphers))
+                          &cacerts_file, &server_hostname, &ciphers))
         return NULL;

     /*
@@ -448,13 +457,13 @@

     return (PyObject *) newPySSLObject(Sock, key_file, cert_file,
                                        server_side, verification_mode,
-                                       protocol, cacerts_file,
+                                       protocol, cacerts_file, server_hostname,
                                        ciphers);
 }

 PyDoc_STRVAR(ssl_doc,
 "sslwrap(socket, server_side, [keyfile, certfile, certs_mode, protocol,\n"
-"                              cacertsfile, ciphers]) -> sslobject");
+"                              cacertsfile, ciphers, server_hostname]) -> sslobject");

 /* SSL object methods */

Did you alter this yourself?

/* ssl compatibility */
     SSL_CTX_set_options(self->ctx,
-                        SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS);
+                        (SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) | SSL_OP_NO_SSLv3);

 

Reason I'm asking is that I have patches explicitly disabling SSLv3.


Edited by MastaG, 24 May 2017 - 16:06.


Re: YouTube not work in latest firmwares... #65 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 24 May 2017 - 16:58

@kokikoku

 

Did you install patch and made reboot?

 

Please show terminal output from this commands:

# installation
cd /tmp
wget http://iptvplayer.pl/resources/python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz
tar -xvf python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz -C /
rm python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz
sync
 

Edited by samsamsam, 24 May 2017 - 16:59.


Re: YouTube not work in latest firmwares... #66 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 24 May 2017 - 17:06

@MastaG

 


Applications which never want to support SSLv3 can set SSL_OP_NO_SSLv3.

 

This is set to not use sslv3. As you wrote you also not what this, so what is your problem?



Re: YouTube not work in latest firmwares... #67 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 24 May 2017 - 17:52

My problem is that I love you and want to marry you SSS ;)

Thx for the quote :)

Re: YouTube not work in latest firmwares... #68 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 24 May 2017 - 18:30

@MastaG

 

Sorry, but I am engaged ;)



Re: YouTube not work in latest firmwares... #69 kokikoku

  • Senior Member
  • 42 posts

0
Neutral

Posted 24 May 2017 - 23:45

 

@kokikoku

 

Did you install patch and made reboot?

 

Please show terminal output from this commands:

# installation
cd /tmp
wget http://iptvplayer.pl/resources/python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz
tar -xvf python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz -C /
rm python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz
sync
 

Ok, you mean I install patch directly instead of backup in advance. last quote I just test the original one by your command.

 

 

root@h5:~# cd /tmp
root@h5:/var/volatile/tmp# wget http://iptvplayer.pl...ar.gzConnecting to iptvplayer.pl (87.98.239.40:80)
Connecting to 172.31.180.25:81 (172.31.180.25:81)
python2.7.3_mipsel_f 100% |***********************************************************************| 29534   0:00:00 ETA
root@h5:/var/volatile/tmp# tar -xvf python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz -C /
./
./usr/
./usr/lib/
./usr/lib/python2.7/
./usr/lib/python2.7/ssl.py
./usr/lib/python2.7/lib-dynload/
./usr/lib/python2.7/lib-dynload/_ssl.so
./usr/lib/python2.7/httplib.py
root@h5:/var/volatile/tmp# rm python2.7.3_mipsel_fpu_hard_openssl1.0.2_sni_patch.tar.gz
root@h5:/var/volatile/tmp# sync
root@h5:/var/volatile/tmp# reboot
Broadcast message from root@h5 (pts/0) (Thu May 25 06:33:05 2017):
The system is going down for reboot NOW!
 
COOOOOOOOOL!!!
Love you!
YouTube is Working !

 

 

root@h5:~# wget iptvplayer.pl/temp/python_sni_test.py -O - | python2.7
Connecting to iptvplayer.pl (87.98.239.40:80)
-                    100% |***********************************************************************|   325   0:00:00 ETA
SNI is working :)



Re: YouTube not work in latest firmwares... #70 kaesequante

  • Member
  • 2 posts

+1
Neutral

Posted 25 May 2017 - 00:07

I patched jsinterp.py in Youtube-Plugin along the lines of latest jsinterp.py from youtube-dl
https://github.com/r...12c7092f5d17de2 ).
 
I do not need any other patch in OpenPli 4.

 

Attached File  jsinterp.zip   5.93KB   14 downloads

 

Just overwrite these two files in YouTube Plugin Folder.



Re: YouTube not work in latest firmwares... #71 littlesat

  • PLi® Core member
  • 56,978 posts

+697
Excellent

Posted 25 May 2017 - 06:53

Nice to know that you easily could fix the YouTube issue. Not nice to know you are not willing to offer us the fix by offering a merge request (it was such simple) Instead you decide to troll here..... which costs a lot of ineffective energy... And a pitty you forgot where atv and the oe-a community did come from. And thanks for the others who really try to solve the topic by e.g. replacing two files.

Edited by littlesat, 25 May 2017 - 06:58.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: YouTube not work in latest firmwares... #72 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 25 May 2017 - 07:56

@kaesequante, @littlesat

 

For sure this fix will not fix lack of SNI support.This fix is related to signature decryption, only some videos need signatures decryption for example VEVO.

 

@kaesequante

Are you sure you are using original OpenPLI 4.0? 

What output you get when you execute:

wget iptvplayer.pl/temp/python_sni_test.py -O - | python2.7

@littlesat

 

Before saying something about fixing problem you should check what for this fix is. This is completely different problem. And I really do not think that @kaesequante is usign original OpenPLI 4.0, because this fix can not fix problem with connection to youtube server related to lack SNI support.

 

Lack of SNI support couse problem not only with youtube.


Edited by samsamsam, 25 May 2017 - 08:00.


Re: YouTube not work in latest firmwares... #73 littlesat

  • PLi® Core member
  • 56,978 posts

+697
Excellent

Posted 25 May 2017 - 08:07

You still do not get what I meant... The two file fix is contributing something hetehere....
What you are telling here is that we can't do anything... We only make crap... And then do not offer us a nice fix and troll instead... If you ars so good then offer us a merge request so we can continue to concentrate on other stuff...ntelling here you are so excelent and we are crap is not nice and in addition it does not have real adeed value...

Yes inded I did not look at the fix... I have a lot of different stuff to do... The nice thing of opensource is that anything can contribute... So please contribute and do not yell here we can't do anything... We are crap! That is not nice behaviour!

Now I hope someone else is willing to contribute here... I'm prety convinced SSS is not willing to do this...

Edited by littlesat, 25 May 2017 - 08:13.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: YouTube not work in latest firmwares... #74 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 25 May 2017 - 08:22

@littlesat

 

I provide you patch for SNI. I think that's enough taking into account:

1. I am not using OpenPLI
2. I am not familiar with bb build system

 

You really have problem to add such patch to your build environment?

How much effort is needed to add such patch to your build environment?

 

Really? If yes this only mean that this build system is crap not you.

In my opinion what you really should do is to say "Thank you for the patch." and apply it.

 

This is quite normal. 

 

I prepared hotfix ready for installation for users which do not like to wait and because OpenPLI users say that they will not merge such patch. Understand?

 

But you also get patch for source, so what is your problem?


Edited by samsamsam, 25 May 2017 - 08:24.


Re: YouTube not work in latest firmwares... #75 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 25 May 2017 - 08:29

@littlesat

 

Did you read this thread? Because I think not. Let go and read from beginning.

You will see how the OpenPLI team behaves.

 

As a reminder:

 


@WanWizard Posted 20 May 2017 - 19:20
We will not backport it, OpenPLi 4 is about to go EoL, the builds are already partly frozen.

 

 


@WanWizard Posted 20 May 2017 - 21:14
OpenPLi 4 is being pinned to stable at the moment, which means it will not be updated anymore pending a last and final release, after which the next version will become available (based on develop), which has a newer Python version, and no issues with SSL.
 
Maybe you should discuss and decide if you are able to make any change to OpenPLI 4.0 or not.

Edited by samsamsam, 25 May 2017 - 08:31.


Re: YouTube not work in latest firmwares... #76 littlesat

  • PLi® Core member
  • 56,978 posts

+697
Excellent

Posted 25 May 2017 - 09:51

We will not backport it, OpenPLi 4 is about to go EoL, the builds are already partly frozen

->

Yes we prefer to have it fixed in OpenPLi5.... or what ever name it will get...  As currently we do minimal in OpenPLi4 as we want to stabalize and "freeze" it...... So I think you understood it right....  And Wanwizard just meant to help us with this in OpenPLi5 (or what else name it will  have).... So from this part I understood it right.... Let's please be a bit less defending and/or offending....

 

I appreaciate that you try to help here... ;)


Edited by littlesat, 25 May 2017 - 09:53.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: YouTube not work in latest firmwares... #77 kaesequante

  • Member
  • 2 posts

+1
Neutral

Posted 25 May 2017 - 10:01

@samsamsam

 

you're right - the patched jsinterp.py has nothing to do with SNI-Support, but I couldn't find a video

which requires SNI.

Without patch I wasn't able to play any video, whether on OpenVIX (which I use since a couple of weeks) nor on my saved OpenPLI4 Image which I reflashed yesterday.

I'm using the reflashed OpenPLI at the moment and all videos I tried are loading fine.



Re: YouTube not work in latest firmwares... #78 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 25 May 2017 - 10:03

@littlesat

 

In OpenPLI 5 this problem is already fixed by python2.7 upgrade.

So, in new OpenPLI release there is no need to do anything.

 

But, many users using OpenPLI 4.0 are affected with this problem. 

Because this problem is not only related to youtube plugin.

Its affects all plugins which are using HTTS connections.

 

Regards,

SSS



Re: YouTube not work in latest firmwares... #79 kokikoku

  • Senior Member
  • 42 posts

0
Neutral

Posted 25 May 2017 - 11:07

@littlesat

 

In OpenPLI 5 this problem is already fixed by python2.7 upgrade.

So, in new OpenPLI release there is no need to do anything.

 

But, many users using OpenPLI 4.0 are affected with this problem. 

Because this problem is not only related to youtube plugin.

Its affects all plugins which are using HTTS connections.

 

Regards,

SSS

 

I didn't find Openpli 5.0 for Zgemma H5.



Re: YouTube not work in latest firmwares... #80 WanWizard

  • PLi® Core member
  • 69,944 posts

+1,788
Excellent

Posted 25 May 2017 - 11:36

There is no OpenPLi 5. OpenPLi 4 is going EoL in the next few weeks, when a new version of OpenPLi will be released, which has this issue fixed, as SSS says. 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.



41 user(s) are reading this topic

0 members, 41 guests, 0 anonymous users