Rewite(或劫持)浏览器中的flash(swf)文件的绝对URL请求 [英] Rewite (or hijack) an absolute URL request made from a flash (swf) file in a browser

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

问题描述

有没有办法在浏览器中重新(或劫持)从flash(swf)文件中创建的绝对URL请求?

例如



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



Flash应用程序中的代码无法更改,但我希望能够使用另一个Flash或一些JavaScript将该URL编写为这个图像是被请求的 - 比如像



example.com/myImage.png?u=123456


有一个机会,你正在谈论一个AS2瑞士法郎。 AVM1是非常容许这种肮脏的技巧,但AVM2不会允许你。

因此,假设一个AS2 SWF,你可以写一个包装SWF劫持无论是MovieClipLoader或loadMovie或者任何原始的swf使用的(你可能需要反编译才能知道)。
$ b 劫持位是相当直接的,就像:

  _global ['MovieClipLoader'] = MyClass; 

一旦MyClass获得调用,就可以添加任何你想要的,然后进行实际的调用。 >

话虽如此,我知道_global技巧适用于自定义类,但不确定它适用于像MovieClipLoader这样的本地类。



<对不起,这是最好的,我可以拿出:/ $ / $>

胡安


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

Eg

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

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

解决方案

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.

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;

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

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 :/

Juan

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

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