socket programming

tiddlerdeja at my-deja.com tiddlerdeja at my-deja.com
Tue May 16 14:07:18 EDT 2000


Thanks for that.

An obvious solution to a simple problem.

In article <mCbU4.20707$HG1.527747 at nnrp1.uunet.ca>,
  "Warren Postma" <embed at geocities.com> wrote:
>
> <tiddlerdeja at my-deja.com> wrote in message
> news:8fr4vf$k96$1 at nnrp1.deja.com...
> > A server application can bind to a socket and listen for connections
> > (e.g. smtp:25). Is it possible, say for testing purposes,  for
another
> > program to bind to the same socket at the same time and monitor the
> > data i/o ?
>
> Why not write a Python program to be a server on port 25, which just
opens
> another port
> and relays the data. Then reconfigure your original server (say SMTP)
to go
> somewhere else,
> like 8881, and your Python program can redirect (with a small delay)
as well
> as dumping out
> what comes in?
>
> You can't leave your server app on the port and let anyone else use
it, but
> you can fake it
> with a relay+dumping program. You could also (on Windows NT/2000 but
not on
> Unix) "hook" the
> Winsock DLL functions. For more on how to build DLL hooks, go to the
> Microsoft Research web
> page and look for "DLL hooks".
>
> Warren
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list