tags:

views:

157

answers:

3

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://server/config.xml I want something that gets in the way and returns ~/myconfig.xml instead.

+3  A: 

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.

Ferruccio
Thanks, I'll take a quick look at this tool and get back.
Alterlife
Unfortunately this does not seem to have the feature that I need. There's a lot of filtering options, but I can find only blocking options and not 'redirect'...
Alterlife
I found this particular application which does what I want: http://www.fiddler2.com/fiddler2/ . Thanks for putting me on the right track wrt search terms.
Alterlife
A: 

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.

Matt Wrock
The problem here is.. if you only need to redirect that one file. What if the SWF is on the same server?
snicker
You could grab the .swf file put it on your own server as well.
Ferruccio
A: 

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\

Conrad
I did think of this... unfortunately the swf application file is on the same server... along with a number of other files which I don't have access to... For sure there must be a way to just replace only config xml without having to mirror the entire server.
Alterlife