0

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)
Harvey
  • 135
  • 1
  • 10
  • What do you mean "does not work"? http://www.catb.org/esr/faqs/smart-questions.html – Jean-Paul Calderone Sep 05 '17 at 23:09
  • One board is sending to my PC on 192.168.1.83 but I doesn't see any IP frame going to 10.25.67.246 as expected – Harvey Sep 06 '17 at 07:13
  • Board? IP frame? Please add more context to your question. I still don't understand what you're doing. – Jean-Paul Calderone Sep 06 '17 at 14:29
  • My purpose is to analyze the communication between two machines with wireshark on my pc. The two machine use IP to communicate on port 2101. I want to open this connection and put my pc in the middle. I have to reconnect the communication through a proxy forwarding or a port bridge. – Harvey Sep 06 '17 at 15:40
  • What two machines? Does one of them run this program? What does the other one run? Why are there two servers? – Jean-Paul Calderone Sep 06 '17 at 20:00

0 Answers0