我和#34;扭曲"学习它.. 我想用扭曲的双向桥。 我的目的是分析我的电脑上带有wireshark的两台机器之间的通信...... 我写了这个,但它不起作用:可能有人可以帮助我吗?
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)