Skip to content

Commit

Permalink
Merge pull request #447 from GoSecure/fix-mitm-hostip-logs
Browse files Browse the repository at this point in the history
Add listenAddress, listenPort and hostIp to JSON logs on MITM start
  • Loading branch information
obilodeau authored Dec 1, 2023
2 parents 6b56617 + 7e647b8 commit 83b2e81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[

* Support for RDP version 10.11 ({uri-issue}433[#433])
* Support for Python 3.11 by updating PyAV to get pre-built binary wheels ({uri-issue}437[#437], {uri-issue}438[#438])
* MITM start and termination log messages are now part of the JSON logs ({uri-issue}447[#447])

=== Bug fixes

Expand Down
6 changes: 3 additions & 3 deletions bin/pyrdp-mitm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

def main():
config = configure()
logger = logging.getLogger(LOGGER_NAMES.PYRDP)
logger = logging.getLogger(LOGGER_NAMES.MITM_CONNECTIONS)

# Create a listening socket to accept connections.
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Expand All @@ -50,8 +50,8 @@ def main():
params = {"address": config.listenAddress, "port": config.listenPort}

if "HOST_IP" in os.environ:
message += ". Host IP: %(host_ip)s"
params["host_ip"] = os.environ["HOST_IP"]
message += ". Host IP: %(hostIp)s"
params["hostIp"] = os.environ["HOST_IP"]

logger.info(message, params)

Expand Down

0 comments on commit 83b2e81

Please sign in to comment.