Rewrite (or hijack) an absolute URL request made f

2019-09-03 23:16发布

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

1条回答
放荡不羁爱自由
2楼-- · 2019-09-04 00:14

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

查看更多
登录 后发表回答