重写(或劫持)从浏览器中的 flash (swf) 文件发出的绝对 URL 请求
有没有办法重写(或劫持)浏览器中从 Flash (swf) 文件发出的绝对 URL 请求?
例如,
我有一个 Flash 应用程序正在请求 http://example.com/myImage.png
代码在 Flash 应用程序中无法更改,但我希望能够使用另一个 Flash 或某些 javascript 在请求图像时将该 URL 写入 - 类似于
example.com/myImage.png?u=123456< /强>
Is there a way to rewrite (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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能有机会这样做,您正在谈论 AS2 swf。 AVM1 非常允许这种肮脏的伎俩,但 AVM2 不允许。
因此,假设是 AS2 SWF,您可以编写一个包装器 swf 来劫持 MovieClipLoader 或 loadMovie 或原始 swf 正在使用的任何内容(您可能需要反编译它才能知道)。
劫持部分相当简单,例如:
一旦 MyClass 收到调用,您可以添加所需的任何内容,然后进行实际的调用。
话虽如此,我知道 _global 技巧适用于自定义类,但不确定它是否适用于像 MovieClipLoader 这样的本机类。
抱歉,这是我能想到的最好的办法:/
Juan
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:
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