two-way bridge using twisted

100 views Asked by At

I'm playing a little bit with "twisted" to learn it.. I wanted to make a two-way bridge using twisted. My purpose is to analyze the communication between two machines with wireshark on my pc ... I wrote this, but it does not work : May be someone could help me ?

from twisted.protocols.portforward import ProxyFactory
from twisted.application import internet,service

src1_ip = "10.25.75.25"
src1_port = 2101
dst1_ip = "192.168.1.100"
dst1_port = 2101

src2_ip = "192.168.1.83"
src2_port = 2101
dst2_ip = "10.25.67.246"
dst2_port = 2101

application = service.Application("Proxy")
server1 = ProxyFactory(dst1_ip, dst1_port)
ps1 = internet.TCPServer(src1_port,server1,50,src1_ip)
ps1.setServiceParent(application)

server2 = ProxyFactory(dst2_ip, dst2_port)
ps2 = internet.TCPServer(src2_port,server2,50,src2_ip)
ps2.setServiceParent(application)
0

There are 0 answers