Skip to content

Encountered an error while attempting to connect to a non-Windows 10 system #470

@Bennett-Y

Description

@Bennett-Y

Hi,
When I attempt to use pyrdp to proxy for non-Windows 10 versions of Windows, such as Windows Server 2003 R2, Windows XP SP3, and Windows 7, I consistently encounter the following errors:

[2024-01-29 16:29:37,173] - INFO - fervent_thompson_3947517 - pyrdp.mitm.connections.tcp - New client connected from 192.168.1.1:24452
[2024-01-29 16:29:37,173] - INFO - fervent_thompson_3947517 - pyrdp.mitm.connections.x224 - No cookie for this connection
[2024-01-29 16:29:37,174] - INFO - fervent_thompson_3947517 - pyrdp.mitm.connections.tcp - Server connected
[2024-01-29 16:29:37,232] - INFO - fervent_thompson_3947517 - pyrdp.mitm.connections.tcp - Server connection closed. Connection to the other side was lost in a non-clean fashion: Connection lost.
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/opt/venv/lib/python3.10/site-packages/twisted/internet/asyncioreactor.py", line 269, in _onTimer
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/opt/venv/lib/python3.10/site-packages/twisted/internet/base.py", line 1090, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/opt/venv/lib/python3.10/site-packages/pyrdp/mitm/RDPMITM.py", line 221, in doClientTls
    cert = self.server.tcp.transport.getPeerCertificate()
  File "/opt/venv/lib/python3.10/site-packages/twisted/protocols/tls.py", line 554, in getPeerCertificate
    return self._tlsConnection.get_peer_certificate()
builtins.AttributeError: 'NoneType' object has no attribute 'get_peer_certificate'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions