From 53afb77f05d888b7181a4c377dfb719081e9eb55 Mon Sep 17 00:00:00 2001 From: Cap-Levi Date: Sun, 27 Jul 2025 04:16:14 +0500 Subject: [PATCH 1/3] Added fix(recorder): replace colons in filenames to ensure Windows compatibility --- pyrdp/recording/recorder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyrdp/recording/recorder.py b/pyrdp/recording/recorder.py index 41d7220d0..ef3bd1c22 100644 --- a/pyrdp/recording/recorder.py +++ b/pyrdp/recording/recorder.py @@ -105,6 +105,8 @@ def __init__(self, fileName: Union[str, Path]): self.pending = b'' self.filename = fileName + self.filename = str(self.filename).replace(":", "_") + self.fd: BufferedIOBase = None def sendBytes(self, data: bytes): From 2f11142e7835c9a7a8fec15a3d50a91caad34264 Mon Sep 17 00:00:00 2001 From: Cap-Levi Date: Sun, 27 Jul 2025 07:22:16 +0500 Subject: [PATCH 2/3] Fixed the integration.sh by changing the hardcoded filenames. --- test/integration.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration.sh b/test/integration.sh index b74985f8a..16e70a2af 100755 --- a/test/integration.sh +++ b/test/integration.sh @@ -64,8 +64,8 @@ echo echo =================================================== echo Verify the PCAP to JSON file -./test/validate_json.sh "20200319000716_192.168.38.1:20989-192.168.38.1:3389.json" -rm "20200319000716_192.168.38.1:20989-192.168.38.1:3389.json" +./test/validate_json.sh "20200319000716_192.168.38.1_20989-192.168.38.1_3389.json" +rm "20200319000716_192.168.38.1_20989-192.168.38.1_3389.json" echo echo =================================================== @@ -75,8 +75,8 @@ echo echo =================================================== echo Verify that the replay file exists -file -E "20200319000716_192.168.38.1:20989-192.168.38.1:3389.pyrdp" -rm "20200319000716_192.168.38.1:20989-192.168.38.1:3389.pyrdp" +file -E "20200319000716_192.168.38.1_20989-192.168.38.1_3389.pyrdp" +rm "20200319000716_192.168.38.1_20989-192.168.38.1_3389.pyrdp" echo =================================================== echo pyrdp-convert.py regression issue 428 From 9f4a2ee7869e6ba6fd1457ab9392415365211627 Mon Sep 17 00:00:00 2001 From: Cap-Levi Date: Sun, 27 Jul 2025 07:49:51 +0500 Subject: [PATCH 3/3] sanitize sessionID by replacing colons in filenames --- pyrdp/convert/PCAPConverter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyrdp/convert/PCAPConverter.py b/pyrdp/convert/PCAPConverter.py index 2ccbff932..7f87ad130 100644 --- a/pyrdp/convert/PCAPConverter.py +++ b/pyrdp/convert/PCAPConverter.py @@ -104,6 +104,7 @@ def processStream(self, startTimeStamp: int, stream: PCAPStream): "src": stream.client, "dst": stream.server }) + sessionID = sessionID.replace(":", "_") handler, _ = createHandler(self.format, self.outputPrefix + sessionID) replayer = RDPReplayer(handler, self.outputPrefix, sessionID)