Skip to content

Commit

Permalink
fake server: only import FakeServer if it is actually needed
Browse files Browse the repository at this point in the history
  • Loading branch information
spameier committed Dec 14, 2022
1 parent 41e9b31 commit ecd5d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyrdp/mitm/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from pyrdp.pdu import ClientChannelDefinition
from pyrdp.security import RC4CrypterProxy, SecuritySettings
from pyrdp.mitm import MITMConfig
from pyrdp.mitm.FakeServer import FakeServer


class RDPMITMState:
Expand Down Expand Up @@ -135,6 +134,7 @@ def useRedirectionHost(self):
self.effectiveTargetPort = self.config.redirectionPort

def useFakeServer(self):
from pyrdp.mitm.FakeServer import FakeServer
self.fakeServer = FakeServer()
self.effectiveTargetHost = "127.0.0.1"
self.effectiveTargetPort = self.fakeServer.port
Expand Down

0 comments on commit ecd5d15

Please sign in to comment.