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 support for Enhanced Security Direct Connection #212

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions pyrdp/layer/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from pyrdp.logging import LOGGER_NAMES, getSSLLogger
from pyrdp.parser.tcp import TCPParser
from pyrdp.pdu import PDU
from pyrdp.mitm import MITMConfig


TLS_RECORD = 0x16
Expand Down Expand Up @@ -46,7 +45,7 @@ class TwistedTCPLayer(IntermediateLayer, Protocol):
TCP observers are notified when a connection is made.
"""

def __init__(self, config: MITMConfig):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure you can just put quotes around the class name to avoid importing it.

def __init__(self, config):
self.log = logging.getLogger(LOGGER_NAMES.PYRDP)
super().__init__(TCPParser())
self.connectedEvent = asyncio.Event()
Expand Down
4 changes: 2 additions & 2 deletions pyrdp/mitm/layerset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
#

from pyrdp.enum import SegmentationPDUType
from pyrdp.mitm import MITMConfig
from pyrdp.layer import FastPathLayer, LayerChainItem, MCSLayer, SecurityLayer, SegmentationLayer, SlowPathLayer, \
TPKTLayer, TwistedTCPLayer, X224Layer
# from pyrdp.mitm.config import MITMConfig


class RDPLayerSet:
"""
Class that handles initialization of regular (non-virtual channel) RDP layers.
"""

def __init__(self, config: MITMConfig):
def __init__(self, config):
self.tcp = TwistedTCPLayer(config)
self.segmentation = SegmentationLayer()
self.tpkt = TPKTLayer()
Expand Down