重写(或劫持)从浏览器中的Flash(SWF)文件发出的绝对URL请求 [英] Rewrite (or hijack) an absolute URL request made from a flash (swf) file in a browser

查看:269
本文介绍了重写(或劫持)从浏览器中的Flash(SWF)文件发出的绝对URL请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以重写(或劫持)浏览器中Flash(swf)文件发出的绝对URL请求?

Is there a way to rewrite (or hijack) an absolute URL request made from a flash (swf) file in a browser?

例如

我有一个Flash应用程序正在请求 http://example.com/ myImage.png

I have a flash application that is requesting http://example.com/myImage.png

Flash应用程序中的代码无法更改,但我希望能够使用其他Flash或某些JavaScript将该URL编写为图片被请求请求-类似于

The code in the flash application cannot be changed but I want to be able to either use another flash or some javascript to write that URL as the image is beging requested - to something like

example.com/myImage.png?u=123456

推荐答案

您正在谈论AS2瑞士法郎的机会可以。 AVM1非常适合这种肮脏的把戏,但AVM2不允许您这样做。

You could have a chance of doing it your are talking about an AS2 swf. The AVM1 is very permissive for that kind of dirty tricks, but AVM2 won't allow you.

因此,假设使用AS2 SWF,您可以编写一个可劫持的包装SWF文件MovieClipLoader或loadMovie或原始swf所使用的任何东西(您可能必须对其进行反编译才能知道)。

So, assuming an AS2 SWF, you could write a wrapper swf that hijacks either MovieClipLoader or loadMovie or whatever the original swf is using (you might have to decompile it to know).

劫持位非常简单,例如:

The hijacking bit would be rather straight forward, something like:

_global['MovieClipLoader'] = MyClass;

一旦MyClass接到电话,您就可以添加所需的内容,然后进行实际的通话。

Once MyClass gets the calls, you add whatever you want and then make the actual call.

话虽如此,我知道_global技巧适用于自定义类,但不确定适用于MovieClipLoader之类的本机类。

Having said that, I know the _global trick works for custom classes, but not sure it does for native classes like MovieClipLoader.

对不起,这是我能提出的最好的建议:/

Sorry, that's the best I can come up with :/

胡安

这篇关于重写(或劫持)从浏览器中的Flash(SWF)文件发出的绝对URL请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆