2009-02-25, 03:30
how do i get the latest working patch? i don't have the svn address and can't seem to find it
d4rk Wrote:They're doing a simple user agent check, it's defined in libbase/curl_adaptor.cpp.
macbook:Desktop test$ dump-gnash --render-mode 0 --verbose --param FlashVars=pid=f59f3f3cea444f31822baa4430fa4b298c7eddd65d204312649f42cccd2c6f46~5e7f306abe00bb2ee692cb1bb8521bbd119c244eea968997ab8f06cdbe3308f9 DecryptPid.swf
RcInitFile: parsing /usr/local/etc/gnashrc
RcInitFile: couldn't open file: /Users/test/.gnashrc
15560:2691733280] 17:27:52 SECURITY: Checking security of URL 'file:///Users/test/Desktop/DecryptPid.swf'
15560:2691733280] 17:27:52 SECURITY: Load of file /Users/test/Desktop/DecryptPid.swf granted (under local sandbox /Users/test/Desktop/)
15560:2691733280] 17:27:52 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
15560:2691733280] 17:27:52 SECURITY: Checking security of URL 'http://www.hulu.com/sec.swf'
15560:2691733280] 17:27:52 SECURITY: Load from host www.hulu.com granted (default)
15560:2691733280] 17:27:53 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
15560:2953850880] 17:27:53 UNIMPLEMENTED: FileAttributes tag in the SWF requests that network access is not granted to this movie (or application?) when loaded from the filesystem. Anyway Gnash won't care; use white/black listing in your .gnashrc instead
15560:2691733280] 17:27:54 UNIMPLEMENTED: System.security.allowDomain
15560:2691733280] 17:27:54 ERROR: Your locale probably can't convert non-ascii characters to upper case. Using a UTF8 locale may fix this.
15560:2691733280] 17:27:54 TRACE: hulupid=CenhHPToxETiRRlM5hs5_Ing3wWeK6wJ
RcInitFile: parsing /usr/local/etc/gnashrc
RcInitFile: couldn't open file: /Users/test/.gnashrc
16974:2691733280] 23:29:13 SECURITY: Checking security of URL 'file:///Users/test/Desktop/DecryptPid.swf'
16974:2691733280] 23:29:13 SECURITY: Load of file /Users/test/Desktop/DecryptPid.swf granted (under local sandbox /Users/test/Desktop/)
16974:2691733280] 23:29:13 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
16974:2691733280] 23:29:13 SECURITY: Checking security of URL 'http://www.hulu.com/sec.swf'
16974:2691733280] 23:29:13 SECURITY: Load from host www.hulu.com granted (default)
16974:2691733280] 23:29:13 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
16974:2953850880] 23:29:13 UNIMPLEMENTED: FileAttributes tag in the SWF requests that network access is not granted to this movie (or application?) when loaded from the filesystem. Anyway Gnash won't care; use white/black listing in your .gnashrc instead
16974:2691733280] 23:29:14 UNIMPLEMENTED: System.security.allowDomain
16974:2691733280] 23:29:14 UNIMPLEMENTED: Rectangle_equals
16974:2691733280] 23:29:14 TRACE: hulupid=Die unendliche Geschichte
static as_value
Rectangle_equals(const fn_call& fn)
{
boost::intrusive_ptr<Rectangle_as> ptr = ensureType<Rectangle_as>(fn.this_ptr);
UNUSED(ptr);
LOG_ONCE( log_unimpl (__FUNCTION__) );
return as_value();
}
root@boxee-box:~# gnash --render-mode 0 --once --verbose --param FlashVars=pid=dd4e9942974869f0cac12ab9ce815da9af6f8486a433a84bda842dae193457f9~16aa98d95559f7db192bb69972ffc6578e87c22f6bc8eafc8a4c76b924b9800f /home/boxee/.xbmc/plugins/video/Hulu/resources/lib/DecryptPid.swf
RcInitFile: parsing /usr/local/etc/gnashrc
RcInitFile: parsing /home/boxee/.gnashrc
11317:3057023296] 02:45:28 SECURITY: Checking security of URL 'file:///home/boxee/.xbmc/plugins/video/Hulu/resources/lib/DecryptPid.swf'
11317:3057023296] 02:45:28 SECURITY: Load of file /home/boxee/.xbmc/plugins/video/Hulu/resources/lib/DecryptPid.swf granted (under local sandbox /home/boxee/.xbmc/plugins/video/Hulu/resources/lib/)
11317:3057023296] 02:45:28 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
11317:3057023296] 02:45:28 SECURITY: Checking security of URL 'http://www.hulu.com/sec.swf'
11317:3057023296] 02:45:28 SECURITY: Load from host www.hulu.com granted (default)
11317:3057023296] 02:45:28 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
11317:3047279504] 02:45:28 UNIMPLEMENTED: FileAttributes tag in the SWF requests that network access is not granted to this movie (or application?) when loaded from the filesystem. Anyway Gnash won't care; use white/black listing in your .gnashrc instead
11317:3057023296] 02:45:33 UNIMPLEMENTED: System.security.allowDomain
11317:3057023296] 02:45:33 UNIMPLEMENTED: Rectangle_intersection
11317:3057023296] 02:45:33 TRACE: hulupid=http://bit.ly/YVCsQ
Main loop ended, cleaning up
Any segfault past this message is likely due to improper threads cleanup.
oncomouse Wrote:Thanks. I got it working around 6:00 EST today where if I ran:
Code:macbook:Desktop test$ dump-gnash --render-mode 0 --verbose --param FlashVars=pid=f59f3f3cea444f31822baa4430fa4b298c7eddd65d204312649f42cccd2c6f46~5e7f306abe00bb2ee692cb1bb8521bbd119c244eea968997ab8f06cdbe3308f9 DecryptPid.swf
I would get the following results.
Code:RcInitFile: parsing /usr/local/etc/gnashrc
RcInitFile: couldn't open file: /Users/test/.gnashrc
15560:2691733280] 17:27:52 SECURITY: Checking security of URL 'file:///Users/test/Desktop/DecryptPid.swf'
15560:2691733280] 17:27:52 SECURITY: Load of file /Users/test/Desktop/DecryptPid.swf granted (under local sandbox /Users/test/Desktop/)
15560:2691733280] 17:27:52 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
15560:2691733280] 17:27:52 SECURITY: Checking security of URL 'http://www.hulu.com/sec.swf'
15560:2691733280] 17:27:52 SECURITY: Load from host www.hulu.com granted (default)
15560:2691733280] 17:27:53 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
15560:2953850880] 17:27:53 UNIMPLEMENTED: FileAttributes tag in the SWF requests that network access is not granted to this movie (or application?) when loaded from the filesystem. Anyway Gnash won't care; use white/black listing in your .gnashrc instead
15560:2691733280] 17:27:54 UNIMPLEMENTED: System.security.allowDomain
15560:2691733280] 17:27:54 ERROR: Your locale probably can't convert non-ascii characters to upper case. Using a UTF8 locale may fix this.
15560:2691733280] 17:27:54 TRACE: hulupid=CenhHPToxETiRRlM5hs5_Ing3wWeK6wJ
The above is the correctly decoded PID. When I run "wget http://releasegeo.hulu.com/content.selec...ormat=smil," it gives me the SMIL file for the video.
Now (11:30 EST), however, when I run the same command, I get the following output:
Code:RcInitFile: parsing /usr/local/etc/gnashrc
RcInitFile: couldn't open file: /Users/test/.gnashrc
16974:2691733280] 23:29:13 SECURITY: Checking security of URL 'file:///Users/test/Desktop/DecryptPid.swf'
16974:2691733280] 23:29:13 SECURITY: Load of file /Users/test/Desktop/DecryptPid.swf granted (under local sandbox /Users/test/Desktop/)
16974:2691733280] 23:29:13 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
16974:2691733280] 23:29:13 SECURITY: Checking security of URL 'http://www.hulu.com/sec.swf'
16974:2691733280] 23:29:13 SECURITY: Load from host www.hulu.com granted (default)
16974:2691733280] 23:29:13 UNIMPLEMENTED: SWF9 is not fully supported, trying anyway but don't expect it to work
16974:2953850880] 23:29:13 UNIMPLEMENTED: FileAttributes tag in the SWF requests that network access is not granted to this movie (or application?) when loaded from the filesystem. Anyway Gnash won't care; use white/black listing in your .gnashrc instead
16974:2691733280] 23:29:14 UNIMPLEMENTED: System.security.allowDomain
16974:2691733280] 23:29:14 UNIMPLEMENTED: Rectangle_equals
16974:2691733280] 23:29:14 TRACE: hulupid=Die unendliche Geschichte
The locale error has gone away, and the Rectangle_equals line has appeared. The hulupid being equal to the german title of The Neverending Story comes up regardless of what encoded PID I feed into gnash (tried with two different videos). Is this something I could have done wrong? Or has Hulu changed the way they do decoding?
Looking into this more, the function Rectangle_equals in the file "libcore/asobj/flash/geom/Rectangle_as.cpp" is:
Code:static as_value
Rectangle_equals(const fn_call& fn)
{
boost::intrusive_ptr<Rectangle_as> ptr = ensureType<Rectangle_as>(fn.this_ptr);
UNUSED(ptr);
LOG_ONCE( log_unimpl (__FUNCTION__) );
return as_value();
}
I'm guessing that this code means that the function doesn't work and it looks like Hulu is testing to see if the function exists to see if gnash is being used. Sorry I can't say more, I don't know anything about C or Flash.
static as_value
Rectangle_equals(const fn_call& fn)
{
boost::intrusive_ptr<Rectangle_as> ptr = ensureType<Rectangle_as>(fn.this_ptr);
as_value x, y, w, h;
ptr->get_member(NSV::PROP_X, &x);
ptr->get_member(NSV::PROP_Y, &y);
ptr->get_member(NSV::PROP_WIDTH, &w);
ptr->get_member(NSV::PROP_HEIGHT, &h);
std::stringstream ss;
ss << "(x=" << x.to_string()
<< ", y=" << y.to_string()
<< ", w=" << w.to_string()
<< ", h=" << h.to_string()
<< ")";
return as_value(ss.str());
}
15231:3056527680] 03:02:11 UNIMPLEMENTED: System.security.allowDomain
15231:3056527680] 03:02:11 TRACE: hulupid=http://bit.ly/YVCsQ
Avoni Wrote:I changed one function that they were using as a check and just got hit with another one. it seems to be The Never Ending Story indeed. I don't know what they're actually using to return that check now though.
Edit: Found it in System_as.cpp
Code:15231:3056527680] 03:02:11 UNIMPLEMENTED: System.security.allowDomain
15231:3056527680] 03:02:11 TRACE: hulupid=http://bit.ly/YVCsQ
They could change up the unimplemented functions for quite a while without any distress to regular users. :mad:
I've now weeded all the unimplemented functions out and I'm not getting anything in the log about it, but I'm still getting the rick roll pid. Dunno, I'm done for the night though.
class DecryptPid {
var pid:String;
var mainmc:MovieClip;
function DecryptPid(mc:MovieClip) {
this.mainmc = mc;
}
function decrypt(pid:String) {
this.pid = pid;
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
var sec:MovieClip = _root.createEmptyMovieClip("sec", 10)
sec._lockroot = true;
//loader.loadClip("http://www.hulu.com/sec.swf", sec);
loader.loadClip("sec.swf", sec);
}
function onLoadInit(sec:MovieClip) {
var s:String = sec.dec(this.pid);
trace(this.pid + " = " + s)
}
static function main(mc) {
(new DecryptPid(mc)).decrypt(_root.pid);
}
}
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <swfdec/swfdec.h>
#include <swfdec/swfdec_url.h>
#include <swfdec/swfdec_player.h>
static void trace(SwfdecPlayer *player, const char *message, void *data)
{
fprintf(stdout, "%s\n", message);
}
int main (int argc, char *argv[])
{
int ret = 0;
SwfdecPlayer *player;
SwfdecURL *url;
swfdec_init();
if (argc != 3) {
fprintf(stderr, "Usage: %s <swf> pid=<pid>\n", argv[0]);
return 1;
}
player = swfdec_player_new(NULL);
swfdec_player_set_variables(player, argv[2]);
g_signal_connect(player, "trace", G_CALLBACK(trace), NULL);
url = swfdec_url_new_from_input(argv[1]);
swfdec_player_set_url(player, url);
swfdec_url_free(url);
//while (!swfdec_player_is_initialized(player)) {
while (1) {
long next = swfdec_player_get_next_event(player);
if (next < 0)
return 1;
swfdec_player_advance(player, next);
}
g_object_unref(player);
player = NULL;
return ret;
}
$ gcc -o decrypt-pid -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/cairo -I~/swfdec-0.8.4/installed/include/swfdec-0.8 -L~/swfdec-0.8.4/installed/lib -L/opt/local/lib -lswfdec-0.8 -lgobject-2.0 decrypt-pid.c
$ ./decrypt-pid ../DecryptPid.swf pid=f59f3f3cea444f31822baa4430fa4b298c7eddd65d204312649f42cccd2c6f46~5e7f306abe00bb2ee692cb1bb8521bbd119c244eea968997ab8f06cdbe3308f9
f59f3f3cea444f31822baa4430fa4b298c7eddd65d204312649f42cccd2c6f46~5e7f306abe00bb2ee692cb1bb8521bbd119c244eea968997ab8f06cdbe3308f9 = CenhHPToxETiRRlM5hs5_Ing3wWeK6wJ
rectalogic Wrote:Perhaps working more on the Adobe AIR/adl solution is a better approach (at least for Linux, Windows and Mac).
rectalogic Wrote:(AIR also works on AppleTV)
Titanium is another possibility, it's basically an open source implementation of something like AIR, based on WebKit, and supports Python scripting. Integrating this with XBMC could bring some of the capabilities of the closed source Plex Media Server to XBMC.
http://titaniumapp.com/
jonm42 Wrote:Took a quick walk through of this and while it appears to have some potential, there's not a whole lot there yet...
rectalogic Wrote:It's cross platform, fully scriptable WebKit with Flash support - seems like enough to load and control a Hulu fullscreen player.
e.g. similar to their YouTube video player demo Playtanium app
http://titaniumapp.com/demos
But it is kind of early alpha and buggy.
jonm42 Wrote:webkit, then?
xbmc.Player(xbmc.PLAYER_CORE_WEBKITPLAYER).play("http://www.hulu.com/watch/58602/my-name-is-earl-my-name-is-alias")
xbmc.Player(xbmc.PLAYER_CORE_WEBKITPLAYER).executeJS("""
player = document.getElementById('player');
player.parentNode.removeChild(player);
document.body.innerHTML = '';
document.body.appendChild(player);
// do something to trigger fullscreen or resize etc...
""")