开发者

Harmless hacking: Trick an application into thinking that a local file has actually come from a server

I've got a flash application (not written by me) which is accessing a configuration file which present on a http server. 开发者_开发百科There are a lot of settings in the config file which seem to affect its behaviour.

I'm not interested in decompiling the swf file or getting too deep into this.

Basically I would like to try to alter the behaviour of the application by making it pick up a modified version of the configuration file instead of the one on the server. Is there a way to do this easily (perhaps a firefox extension like firebug?).

Basically when the application requests http://example.com/config.xml I want something that gets in the way and returns ~/myconfig.xml instead.


You may be able to use a web-filtering proxy like Proxomitron to do that for you. I haven't looked at it in a long time, but as I recall it let you define text-matching rules that it applied to http requests and responses. You should be able to use it to redirect that one request to a local file or to a file on a server you control.


If this is simply for debugging and discovery purposes, I would change your host file to have the domain in the http request point to your own machine and then you can put a modified config on your own system.


If you want http://server.com/path/to/config.xml to load your own config.xml:

if you're on windows run: notepad c:\windows\system32\drivers\etc\hosts

in that file add: 127.0.0.1 server.com

This will make any program look for server.com on your machine. If the flash file is also on server.com, load it first, then change hosts.

Install a webserver on your machine (apache) and put config.xml into c:\apache_install_dir\htdocs\path\to\

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜