Kodi Community Forum
Hulu Plugin Development Thread - Developers only! - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Hulu Plugin Development Thread - Developers only! (/showthread.php?tid=45888)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


- TheEvilHammer - 2009-04-21

TheEvilHammer Wrote:Looks like I spoke too soon - I'm still having trouble with this. The text "sec.swf" doesn't appear anywhere in the source for player.swf. More importantly, when I try to decompile sec.swf with Flare, I get this error:

Code:
Input file doesn't appear to be a valid SWF file

Arggh - I just realized that "sec.swf" doesn't exist at http://www.hulu.com/sec.swf, and what I actually downloaded (and ran through Flare) was the HTML for a 404 page.

I just took a trace of the HTTP traffic being sent/received while playing a Hulu clip and I don't see sec.swf being requested anywhere. However, I did see dec.swf being requested, so I downloaded that and ran that through Flare. The result is some bizarre looking code with lots of non-printable characters.

I have a feeling that I'm still not doing this right. Did you really mean "sec.swf" and if so, where is that on Hulu's site and why doesn't it get requested by the browser when playing a video clip?


- TheEvilHammer - 2009-04-21

Yeah, it looks like something has definitely changed again on Hulu's site. I just tried running hulu-get-keys.pl (which also attempts to decompile sec.swf) and it's failing with a 404 error:

Code:
D:\Downloads\hulu\hulu-get>perl hulu-get-keys.pl
--13:15:01--  http://www.hulu.com/sec.swf?cb=2009042120
           => `sec.swf'
Resolving www.hulu.com... done.
Connecting to www.hulu.com[128.241.218.59]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
13:15:01 ERROR 404: Not Found.



- TheEvilHammer - 2009-04-21

I looked through the source of player.swf and sure enough, it's loading dec.swf now, not sec.swf. My guess, based on nothing more than rash assumptions, is that Hulu is now obfuscating dec.swf such that it can't be accurately decompiled anymore.


- abstraktion - 2009-04-22

Try hsc.swf. They changed it a few days ago, but it will not decompile. AFAIK everything you need is in player.swf.


- TheEvilHammer - 2009-04-22

abstraktion Wrote:Try hsc.swf. They changed it a few days ago, but it will not decompile. AFAIK everything you need is in player.swf.

Looking at the source for player.swf, I don't think everything we need is in there. I tried decompiling hsc.swf and I'm seeing the same problem as with dec.swf - bizarre-looking code and non-printable characters.


- TheEvilHammer - 2009-04-22

So I stumbled upon something interesting today that might be of help. On a whim, I went to sling.com and played a video clip that actually gets streamed from Hulu. Looking through a network trace, I noticed dsc.swf being fetched, so I downloaded that file and decompiled it, which worked without any issues. The code in this file looks very much like decryption code. If someone could whip up a script or a command-line program or a library that could decrypt the encrypted SMIL text, that would be pretty sweet... Smile


- highlandsun - 2009-04-25

The problem here is, every time we discuss this in public, Hulu will change things again. If you want to actually be able to fix it once and then sit back and use it, you either have to clearly demonstrate to Hulu the futility of their obfuscation efforts, or just sit back quietly and stop discussing it in public, so they no longer get a clear view of how easily their stuff gets broken and how often they need to change it.

I suppose, in the long run, it's better to keep discussing it in the open so that they can see the futility of paying expensive programmers to continue to obfuscate their offerings, when any number of random hackers will rip it to shreds for free.


- TheEvilHammer - 2009-04-27

Boxee has apparently broken through the security: Linux Boxee Users Get Hulu Relief


- badmoviesnbeer - 2009-04-27

They enable it using an embedded browser. Not getting direct access to the stream.

Quote:The current support for Hulu, an effort to sidestep Hulu’s content redistribution concerns, leverages Boxee’s RSS feeds in conjunction with a customized mozilla browser engine that’s part of the latest Boxee release. Evidence of this less-integrated approach is seen as Hulu’s home page momentarily flashes on the screen just prior to Hulu’s content menu (shown above) appearing on the screen.



- kozuscek - 2009-05-16

Hi all.

Any progress on decrypting the SMIL file?

I've updated the hulu-get perl scripts so that they can retrieve all three params needed for the SMIL url (decrypted pid, auth token, and the (constant?) "v" value).


- jdeslip - 2009-06-03

Is the Hulu plugin (browser) boxee uses open-source? Can it be ported back to xbmc?


- rwparris2 - 2009-06-03

jdeslip Wrote:Is the Hulu plugin (browser) boxee uses open-source? Can it be ported back to xbmc?

Please don't post in this thread unless you have code or pseudo code (you also don't need to post to apologize, I know you're sorry Wink).

To answer your question, no and no.


- highlandsun - 2009-07-11

For anyone curious, it looks like Hulu changed things again a few days ago; they used to only be using RTMPE on their H.264 streams but now they're using it on all of their streams. And they've changed the RTMPE protocol; the server is sending a packet that rtmpdump-1.6 doesn't recognize. Back to decoding packet dumps I guess.

edit: simple fix, rtmpdump was only decoding 1 out of up to 3 bytes of a packet's channel ID...


- andrewgee - 2009-07-30

highlandsun Wrote:For anyone curious, it looks like Hulu changed things again a few days ago; they used to only be using RTMPE on their H.264 streams but now they're using it on all of their streams. And they've changed the RTMPE protocol; the server is sending a packet that rtmpdump-1.6 doesn't recognize. Back to decoding packet dumps I guess.

edit: simple fix, rtmpdump was only decoding 1 out of up to 3 bytes of a packet's channel ID...

Great find highlandsun Smile

For those not confident with C++, could you detail what changes we should make to fix the decoding the the channel ID?

Thanks.


- motd2k - 2009-07-30

No, please don't. We can't allow any discussion of reversing RTMPE here i'm afraid.