Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add listenAddress, listenPort and hostIp to JSON logs on MITM start #447

Merged
merged 3 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading