Add UDP support

This commit is contained in:
George Hughey 2020-02-17 21:26:42 -08:00
parent 586f6c8174
commit 72e1b8c185
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ class WindowsEngine(GenericEngine):
self.logger.debug("Initializing Divert")
self.divert = pydivert.WinDivert("tcp.DstPort == %d || tcp.SrcPort == %d" % (int(self.server_port), int(self.server_port)))
self.divert = pydivert.WinDivert("tcp.DstPort == %d || tcp.SrcPort == %d || udp.DstPort == %d || udp.SrcPort == %d" \
% (int(self.server_port), int(self.server_port), int(self.server_port), int(self.server_port)))
self.divert.open()
self.divert_thread = threading.Thread(target=self.run_divert)
self.divert_thread.start()