Skip to content

Commit

Permalink
Merge pull request #415 from GoSecure/record-fd-close-adjustments
Browse files Browse the repository at this point in the history
Closing recording file descriptors on more occasions
  • Loading branch information
obilodeau authored Oct 28, 2022
2 parents 793eb59 + 8efd2bf commit 3cfcead
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
* Fixed `pyrdp-player` on macOS platforms ({uri-issue}362[#362])
* Fixed `pyrdp-convert` pcap processing when victim IP and MITM IP are the same ({uri-issue}366[#366])
* Fixed NLA redirection problems if original target and NLA redirection target are the same ({uri-issue}342[#342], {uri-issue}343[#343])
* Fixed leak of file descriptors due to missing close on replay file recording ({uri-issue}392[#392], {uri-issue}413[#413])
* Fixed leak of file descriptors due to missing close on replay file recording ({uri-issue}392[#392], {uri-issue}413[#413], {uri-issue}415[#415])
* Added a missing dependency for the GUI on Ubuntu 20.04 LTS ({uri-issue}348[#348], {uri-issue}351[#351], {uri-issue}355[#355])
* No longer assuming every connection will have VirtualChannels ({uri-issue}375[#375])
* Some minor protocol-level fixes ({uri-issue}408[#408])
Expand Down
3 changes: 2 additions & 1 deletion pyrdp/mitm/TCPMITM.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ def onClientDisconnection(self, reason):
if self.recorder.recordFilename:
self.statCounter.logReport(self.log, {"replayFilename":
self.recorder.recordFilename})
self.recorder.finalize()
else:
self.statCounter.logReport(self.log)

self.recorder.finalize()
self.server.disconnect(True)
self.state.clientIp = None

Expand All @@ -123,6 +123,7 @@ def onServerDisconnection(self, reason):
"""

self.recordConnectionClose()
self.recorder.finalize()
self.log.info("Server connection closed. %(reason)s", {"reason": reason.value})
self.client.disconnect(True)

Expand Down

0 comments on commit 3cfcead

Please sign in to comment.