views:

74

answers:

2

Hello everyone,

For the specific needs of a project, I have to interface some of my code with other closed-source code. My idea is to understand how the original application communicates and then mimic the behaviour. I have already done the first step, which is analysing some HTTP exchanges (done using POST request and XML replies) with Wireshark. At the end of the exchange, the server produces an output that I need to record.

Now, my question is: what is the easiest way to replicate the client behaviour with my input? ie the one that involves less coding? Basically I don't need much "programming" power, just the ability to parse some variables in the server responses and re-use them in the successive request.

I've already done a similar job replicating the client behaviour with a command-line PHP script, but it's rather tedious and the code is hardly readable and hence maintainable.

Any suggestion is welcome!! Thanks

A: 

These two work with Firefox:

Tamper Data

fiddler

none
-1 Fiddler is an absolute disaster. I would NEVER install it on my PC.
George Edison
Fiddler works very well in my experience.
Franci Penov
+1  A: 

If you don't need a scalable solution, and your app needs to deal with particular requests/response only, you can precreate several requests as XML blobs and just update any variables in them, send them and do basic XML parsing to get the values of the XML elements with the response. Essentially, your app will act as a repeater of an conversation you've recorded with Wireshark and tweak to change couple of values.

Franci Penov
Thanks for your answer!!That's what I ended up doing in the end, although I was hoping to find a method involving less coding or at least more maintainable (ie greater separation between the code itself and the data structure exchanged).Thanks anyway!!!
Federico