Kodi Community Forum
[RELEASE] Hulu (Video) Plugin - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] Hulu (Video) Plugin (/showthread.php?tid=45889)



- kreeturez - 2011-11-16

BlueCop Wrote:It is working again. no changes. they re-enabled the use of the old security version. I wouldn't expect it to last. I am still looking for better swf tools. I can't really peak inside the thing.

Confirmed: back up; for now.
Strange thing is that Hulu Desktop didn't require a new version today; an old version from a few months back was OK... Guessing it must support both the old and new security protocols...? In which case, I wonder why they re-enabled it...

Once again, thanks for an awesome peice of Python!!


- karmaj - 2011-11-16

I confirmed mine is working too! Your efforts are appreciated! What would the XBMC community do without you? Keep up the awesome work!


- BlueCop - 2011-11-16

kreeturez: all good questions. hulu desktop does not work the way you think hulu desktop works. It loads an swf from the website at http://download.hulu.com/huludesktop.swf
you can even load this in a web browser and use the hulu desktop app without ever installing it.

The relevant changes for security are in http://www.hulu.com/sec_as3.swf?cb=2011111609_20
This file does the signing for certain requests. It also does the decryption of smil and subtitles. They changed the keys in it and all the players using it are changed.

The file crashes my primary swf tool so I can't really examine it. I think the problem is that it is action script 3. I have tried everything I can find and have only had issues so far.

i know the functions in sec_as3.swf that we need to look at. content select requests is what retrieves the SMIL.

secSwf.generateSignatureToCSEL() - Does the signing of content select requests. This seems to be the same as before. this is a HMAC md5 signature. It uses a key.

secSwf.xmldecs() - does the decrypting of the smil.

secSwf.transcriptsdecs() - decrypts subtitles

secSwf.dec() - generic decryption

secSwf.v - the security version. this is a parameter used in content select requests.

there are other interesting things in there like secSwf.encryptping()


Hulu - Zeee1 - 2011-11-17

Thanks for your hard work BC.


Hulu - JonWillieNelson - 2011-11-17

I'm having a slew of problems, i can't seem to get hulu to work at all. With no log in info i can navigate all the way through the add on and select the episode i want but then it fails. If i use login or hulu + it doesn't let me in the add on at all. i'm new to this whole xbmc thing, i'm trying to do this on an ATV2.

heres my pastebin: http://pastebin.com/vaijk0hE


- bckane - 2011-11-17

JonWillieNelson Wrote:I'm having a slew of problems, i can't seem to get hulu to work at all. With no log in info i can navigate all the way through the add on and select the episode i want but then it fails. If i use login or hulu + it doesn't let me in the add on at all. i'm new to this whole xbmc thing, i'm trying to do this on an ATV2.

heres my pastebin: http://pastebin.com/vaijk0hE

did you config hulu with your account information.?


- BlueCop - 2011-11-17

it can't establish an ssl connection to the server. i have seen this before but don't know what causes it. restarting xbmc always fixed it.

i don't see any attempts at playback.

have you upgraded your librtmp? if not do that before posting again.


hulu not working for me - slhpss - 2011-11-18

When I click on directory to see what videos are in it I get an error. every time no matter what directory I pick.


http://pastebin.com/YDzdmBzW


- slhpss - 2011-11-18

disabled windows firewall... still doesn't work, BUT I can use the search to find a show and play it... it just won't display directory listings with shows in them


- BlueCop - 2011-11-18

Try upgrading to a more recent nightly build if you are having problems. Sorry if things are broken in 10.1

I finally figured out the new security version. I was having problems with the keys from sec_as3.swf because they wouldn't decrypt the smil.

I found that it was xor-ing the keys before using them( they use 42 and 1 to xor each byte with ). anyway I got the new security working. I assume they will switch off support for the old version in time. I will try to update the plugin later.

Update:
support for new security version committed.


- slhpss - 2011-11-18

cool... I will update my hulu plugin to the version you just committed and let you know when I get home... I will post in here and on the repo issue I posted if it fixes it..

and if it doesn't I will update xbmc to the nightly


- dynaflash - 2011-11-18

Okay so using Hulu plugin from about half hour ago ... on a git head build from yesterday ...

Code:
12:06:19 T:3043247856  NOTICE: Starting XBMC, Platform: Linux (Ubuntu 8.04.4 LTS, 2.6.24-28-generic i686). Built on Nov 17 2011 (Git:20111117-0e174c0)


Hulu plug in fails on linux (librtmp issue ?) and yes I have the same credentials on setup as I do on my os x setup (which works). Note, I can access everything fine as far as the hulu menu etc. But it obviously fails upon trying to get to the actual video stream.

Here is the debug log http://pastebin.com/cf0jB0Mc . I notice what looks to be like the handshake issue from librtmp which has been plaguing freecable as well ? Not totally sure as am not a linux genius by any means.

Fwiw, I installed librtmp via:

Code:
git clone git://git.ffmpeg.org/rtmpdump

than patched it with :

Code:
diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
index df2cb27..b72dc64 100644
--- a/librtmp/rtmp.c
+++ b/librtmp/rtmp.c
@@ -2857,14 +2857,14 @@ HandleCtrl(RTMP *r, const RTMPPacket *packet)
       if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x01)
    {
      RTMP_Log(RTMP_LOGERROR,
-            "%s: SWFVerification Type %d request not supported! Patches welcome...",
+            "%s: SWFVerification Type %d request not supported, attempting to use SWFVerification Type 1! Patches welcome...",
        __FUNCTION__, packet->m_body[2]);
    }
#ifdef CRYPTO
       /*RTMP_LogHex(packet.m_body, packet.m_nBodySize); */

       /* respond with HMAC SHA256 of decompressed SWF, key is the 30byte player key, also the last 30 bytes of the server handshake are applied */
-      else if (r->Link.SWFSize)
+      if (r->Link.SWFSize)
    {
      RTMP_SendCtrl(r, 0x1B, 0, 0);
    }

which is a patch from your post in the freecable thread to try to fix the librtmp handshake issue. It works for freecable but fails obviously here on hulu.

Please note that I have another linux atv setup that is running the *same* librtmp but not patched and it still fails in the same manner.

Any clues given will be appreciated as the hulu plugin rocks when it works as it does on my os x setup. Phenomenal plugin !!!!!

Thoughts ?


- BlueCop - 2011-11-18

are you sure you installed it to the correct place?

in the librtmp directory after you have done the make command. try this.

sudo make install prefix=/usr

if it installs to the default prefix=/usr/local then xbmc won't use it.


- dynaflash - 2011-11-19

BlueCop Wrote:are you sure you installed it to the correct place?

in the librtmp directory after you have done the make command. try this.

sudo make install prefix=/usr

if it installs to the default prefix=/usr/local then xbmc won't use it.

hmm ... no I didn't Smile Will give it a whirl yet tonight ... that might explain it!

Would be nice if there was a patched rev we could just install .... Eek

Quick question, after doing the above, does it require that I re-compile xbmc ? or will it pick it up at runtime ?

Thanks!


- BlueCop - 2011-11-19

you don't have to recompile xbmc. it will use the one your install.