Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

james (1129)

  (email not shown publicly)


Journal of james (1129)

Monday June 17, 2002
11:54 AM

Protocol hacking

[ #5711 ]

I've got to write a reasonably large chunk of code for a server that talks to a client using a protocol I have no control over, and have little specification for. This protocol (like so many others) sits on top of HTTP and based on what I do know about it, the protocol is not very pretty.

My first thought was "write a proxy server" to get a good idea about what data the client is sending and what the server is responding with.

I think however, that there is a Better Way. I find myself doing this sort of thing all the time and I'm not sure its the right way to do it. When Pierre wrote WSDL::Generator he gave me the ideea.

WSDL::Generator works by examining data between your calling code, and your called code over a long period of time, and then using that knowledge to slowly learn what what the called code considers valid input.

I think that I can probably write a proxy that learns what the protocol looks like (in both request and response form) and build me a reasonably complete framework of code to use in a tuned-by-hand version.

Of course I might just be smoking too much crack...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Pierre Denis' CPAN directory is called PDENIS. When I first saw it I was convinced that it was PENIS :)

    I was wondering if the powers to be would grant such a name and if I need more or less coffee to survive the afternoon...