views:

58

answers:

3

Is it possible (for example with C++, but it does not really matter) to create a bridge/proxy application to get the data requested by another application? To be more detailed, I'm talking about a Adobe Air based game. (I want to create a report with stats based on the data acquired, but that is not actually part of this question.) Rather than simple "boolean" answer please provide some link to example/documentation. Thanks

+2  A: 

It would always be possible, and depending on the your target operating system, may require a fair amount of effort, which begs the question - is there a reason you cannot use Fiddler or some packet sniffing software for your target OS?

Rowland Shaw
Fiddler unfortunately only fiddles with http/s, and that's not what the application I'm working with uses.
Mikulas Dite
+1  A: 

You can write a proxy by hand, in python can be quite easy. All you have to do is to set localhost as proxy, then forward the request and pass it back to the calling socket.

I've started writing something like this some times ago. The idea was to write a simple replacement for dansguardian.

I've uploaded it on github so you can give it a look if it can help.

I do not remember well (I've started writing it the last year) but maybe with some modification can fit well your requests.

Enrico Carlesso
+1  A: 

Conceptually, this is your configuration:

app_client -> [app_channel] -> proxy ->  [server_channel] -> app_server

Your proxy starts a server socket, the app_client connects to it. This is our app_channel. Now your proxy creates a connection to the app_server. This is your server_channel.

Now start 2 threads, one which reads from the app_channel and writes to the server_channel, the other reads from the server_channel and writes to the app_channel.

This will create a transparent connection to the app_server via your proxy. You can extract the data as you wish. If the data is encrypted though, there's very little you can actually do by way of analysis.

Gearoid Murphy
Thanks for the answer. Too bad I can't reward bounty twice; however the other answer had a useful example so I've marked __it__.
Mikulas Dite