[Tutor] listen in on other program's tcp connections
lie.1296 at gmail.com
Tue Dec 16 17:16:46 CET 2008
On Tue, 16 Dec 2008 02:55:55 -0600, W W wrote:
> On Tue, Dec 16, 2008 at 12:57 AM, xbmuncher <xboxmuncher at gmail.com>
>> On windows XP, I'm running a program that sends TCP connections on port
>> 5039. I'v ran wireshark to determine this. I want to create a simple
>> program that listens for these connections and intercepts and then
>> turns the data transferred into a string. From there I'd obviously like
>> my program to act and manipulate those strings, but for now just
>> spitting out that intercepted TCP data is good enough.
>> I was reading up on Twisted. http://twistedmatrix.com/ Can someone get
>> me started on how to do this with twisted framework or anything else?
> I've never done anything like this specifically... but my guess is that
> it's pretty similar to creating a proxy.
In the case of proxy, I think the program have to voluntarily send the
data to the proxy. I think you've got to go round your head around
wireshark. I don't know wireshark enough to know whether it is possible
for wireshark to intercept the packet and send it to an external program.
 or if you're on windows, you could hack the HOSTS file so data sent
by the program would instead be redirected to 127.0.0.1 (i.e. localhost,
i.e. your own computer)
More information about the Tutor