From ccc65545b10bb9e445e69db20efef7e765259546 Mon Sep 17 00:00:00 2001 From: gabrielg5 Date: Fri, 16 Aug 2024 08:07:44 -0300 Subject: [PATCH] Opportunistic enhancement: showing listening ports for SMBRelayServer and WCFRelayServer --- impacket/examples/ntlmrelayx/servers/smbrelayserver.py | 2 +- impacket/examples/ntlmrelayx/servers/wcfrelayserver.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/impacket/examples/ntlmrelayx/servers/smbrelayserver.py b/impacket/examples/ntlmrelayx/servers/smbrelayserver.py index 4be3d95150..982a057fd8 100644 --- a/impacket/examples/ntlmrelayx/servers/smbrelayserver.py +++ b/impacket/examples/ntlmrelayx/servers/smbrelayserver.py @@ -923,6 +923,6 @@ def _start(self): self.server.server_close() def run(self): - LOG.info("Setting up SMB Server") + LOG.info("Setting up SMB Server on port %s" % self.server.server_address[1]) self._start() diff --git a/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py b/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py index 201e7cc4eb..e01ea20c2f 100644 --- a/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py +++ b/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py @@ -348,13 +348,13 @@ def __init__(self, config): self.server = None def run(self): - LOG.info("Setting up WCF Server") - if self.config.listeningPort: wcfport = self.config.listeningPort else: wcfport = 9389 # ADWS + LOG.info("Setting up WCF Server on port %s" % wcfport) + # changed to read from the interfaceIP set in the configuration self.server = self.WCFServer((self.config.interfaceIp, wcfport), self.WCFHandler, self.config)