Merge pull request #139 from Pennyw0rth/neff-asyncio

Surpress any errors when using rdp and broken python version
main
Marshall Hallenbeck 2024-01-22 15:50:00 -05:00 committed by GitHub
commit f058c2ddf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -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",