diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 8ba5b6f15..5988cab8a 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -87,6 +87,16 @@ def __init__(self, args, db, host): # if hasattr(self.args, 'module') and self.args.module: def proto_logger(self): + import platform + if platform.python_version() in ["3.11.5", "3.11.6", "3.12.0"]: + import sys + + class DevNull: + def write(self, msg): + pass + + sys.stderr = DevNull() + self.logger = NXCAdapter( extra={ "protocol": "RDP",