mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
Several
upgraded uds client projects fixed admin js rdp transport work
This commit is contained in:
parent
436fe43098
commit
deff947b03
@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?eclipse-pydev version="1.0"?><pydev_project>
|
<?eclipse-pydev version="1.0"?><pydev_project>
|
||||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
|
||||||
<path>/${PROJECT_DIR_NAME}/src</path>
|
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||||
</pydev_pathproperty>
|
|
||||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
<path>/${PROJECT_DIR_NAME}/src</path>
|
||||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
|
||||||
|
</pydev_pathproperty>
|
||||||
|
|
||||||
|
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||||
|
|
||||||
|
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">system-2.7</pydev_property>
|
||||||
|
|
||||||
</pydev_project>
|
</pydev_project>
|
||||||
|
@ -44,8 +44,6 @@ from uds import VERSION
|
|||||||
|
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import json
|
import json
|
||||||
import sys
|
|
||||||
import six
|
|
||||||
|
|
||||||
from UDSWindow import Ui_MainWindow
|
from UDSWindow import Ui_MainWindow
|
||||||
|
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?eclipse-pydev version="1.0"?><pydev_project>
|
<?eclipse-pydev version="1.0"?><pydev_project>
|
||||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
|
||||||
<path>/${PROJECT_DIR_NAME}/src</path>
|
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||||
</pydev_pathproperty>
|
|
||||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
<path>/${PROJECT_DIR_NAME}/src</path>
|
||||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
|
||||||
|
</pydev_pathproperty>
|
||||||
|
|
||||||
|
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||||
|
|
||||||
|
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">system-2.7</pydev_property>
|
||||||
|
|
||||||
</pydev_project>
|
</pydev_project>
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
"""
|
"""
|
||||||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||||
"""
|
"""
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
from typing import Tuple
|
||||||
|
import logging
|
||||||
|
|
||||||
from django.utils.translation import ugettext_noop as _
|
from django.utils.translation import ugettext_noop as _
|
||||||
|
|
||||||
@ -40,8 +42,6 @@ from uds.core.transports import protocols
|
|||||||
from uds.core.util import encoders
|
from uds.core.util import encoders
|
||||||
from uds.core.util import connection
|
from uds.core.util import connection
|
||||||
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
DIRECT_GROUP = _('Direct')
|
DIRECT_GROUP = _('Direct')
|
||||||
@ -185,7 +185,7 @@ class Transport(Module):
|
|||||||
"""
|
"""
|
||||||
return user.name
|
return user.name
|
||||||
|
|
||||||
def getUDSTransportScript(self, userService, transport, ip, os, user, password, request):
|
def getUDSTransportScript(self, userService, transport, ip, os, user, password, request) -> Tuple[str, str, dict]:
|
||||||
"""
|
"""
|
||||||
If this is an uds transport, this will return the tranport script needed for executing
|
If this is an uds transport, this will return the tranport script needed for executing
|
||||||
this on client
|
this on client
|
||||||
|
File diff suppressed because one or more lines are too long
@ -2,10 +2,10 @@
|
|||||||
// Typescript
|
// Typescript
|
||||||
gettext("yes");
|
gettext("yes");
|
||||||
gettext("no");
|
gettext("no");
|
||||||
gettext("$USERS users, $GROUPS groups");
|
gettext("#USR_NUMBER# users, #GRP_NUMBER# groups");
|
||||||
gettext("$POOLS service pools");
|
gettext("#POOLS_NUMBER# service pools");
|
||||||
gettext("$SERVICES user services");
|
gettext("#SERVICES_NUMBER# user services");
|
||||||
gettext("$RESTRAINED restrained services!");
|
gettext("#RESTRAINED_NUMBER# restrained services!");
|
||||||
gettext("New Network");
|
gettext("New Network");
|
||||||
gettext("Edit Network");
|
gettext("Edit Network");
|
||||||
gettext("Delete Network");
|
gettext("Delete Network");
|
||||||
@ -427,7 +427,7 @@ gettext("Remove all");
|
|||||||
gettext("Add");
|
gettext("Add");
|
||||||
gettext("Cancel");
|
gettext("Cancel");
|
||||||
gettext("Ok");
|
gettext("Ok");
|
||||||
gettext("Close");
|
gettext("Discard & close");
|
||||||
gettext("Save");
|
gettext("Save");
|
||||||
gettext("Logs");
|
gettext("Logs");
|
||||||
gettext("Filter");
|
gettext("Filter");
|
||||||
|
@ -36,6 +36,7 @@ from django.utils.translation import ugettext_noop as _
|
|||||||
from uds.core.ui.UserInterface import gui
|
from uds.core.ui.UserInterface import gui
|
||||||
from uds.core.transports.BaseTransport import Transport
|
from uds.core.transports.BaseTransport import Transport
|
||||||
from uds.core.transports import protocols
|
from uds.core.transports import protocols
|
||||||
|
from typing import Tuple
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -187,7 +188,7 @@ class BaseRDPTransport(Transport):
|
|||||||
def getConnectionInfo(self, service, user, password):
|
def getConnectionInfo(self, service, user, password):
|
||||||
return self.processUserPassword(service, user, password)
|
return self.processUserPassword(service, user, password)
|
||||||
|
|
||||||
def getScript(self, scriptName, osName, params):
|
def getScript(self, scriptName, osName, params) -> Tuple[str, str, dict]:
|
||||||
# Reads script
|
# Reads script
|
||||||
scriptName = scriptName.format(osName)
|
scriptName = scriptName.format(osName)
|
||||||
with open(os.path.join(os.path.dirname(__file__), scriptName)) as f:
|
with open(os.path.join(os.path.dirname(__file__), scriptName)) as f:
|
||||||
|
@ -9,7 +9,6 @@ try:
|
|||||||
import winreg as wreg
|
import winreg as wreg
|
||||||
except ImportError: # Python 2.7 fallback
|
except ImportError: # Python 2.7 fallback
|
||||||
import _winreg as wreg # @UnresolvedImport, pylint: disable=import-error
|
import _winreg as wreg # @UnresolvedImport, pylint: disable=import-error
|
||||||
import os
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from uds.forward import forward # @UnresolvedImport
|
from uds.forward import forward # @UnresolvedImport
|
||||||
from uds.log import logger # @UnresolvedImport
|
from uds.log import logger # @UnresolvedImport
|
||||||
@ -26,7 +25,7 @@ if forwardThread.status == 2:
|
|||||||
tools.addTaskToWait(forwardThread)
|
tools.addTaskToWait(forwardThread)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
thePass = six.binary_type(sp['password'].encode('UTF-16LE'))
|
thePass = six.binary_type(sp['password'].encode('UTF-16LE')) # @UndefinedVariable
|
||||||
password = win32crypt.CryptProtectData(thePass, None, None, None, None, 0x01).encode('hex')
|
password = win32crypt.CryptProtectData(thePass, None, None, None, None, 0x01).encode('hex')
|
||||||
except Exception:
|
except Exception:
|
||||||
# Cannot encrypt for user, trying for machine
|
# Cannot encrypt for user, trying for machine
|
||||||
|
Loading…
Reference in New Issue
Block a user