Merge pull request #139 from Pennyw0rth/neff-asyncio
Surpress any errors when using rdp and broken python versionmain
commit
f058c2ddf7
|
@ -87,6 +87,16 @@ class rdp(connection):
|
|||
# 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",
|
||||
|
|
Loading…
Reference in New Issue