From 5daa3ecc7f5eb61441cc186538f4bfecb76f389f Mon Sep 17 00:00:00 2001 From: Alexander Neff Date: Thu, 7 Dec 2023 22:01:56 +0100 Subject: [PATCH] Surpress any errors when using rdp and broken python version --- nxc/protocols/rdp.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 8ba5b6f1..e8c40cd2 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -23,6 +23,17 @@ from asyauth.common.constants import asyauthSecret from asysocks.unicomm.common.target import UniTarget, UniProto +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() + + class rdp(connection): def __init__(self, args, db, host): self.domain = None