mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-10 01:17:59 +03:00
Changed order so now on mac CorD is tried first
This commit is contained in:
parent
2e0972b71e
commit
a47df49ca8
@ -9,21 +9,18 @@ import urllib
|
|||||||
|
|
||||||
from uds import tools # @UnresolvedImport
|
from uds import tools # @UnresolvedImport
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
theFile = '''{m.r.as_file}'''
|
theFile = '''{m.r.as_file}'''
|
||||||
|
|
||||||
# First, try to locate Remote Desktop Connection (version 2, from Microsoft website, not the app store one)
|
# First, try to locate Remote Desktop Connection (version 2, from Microsoft website, not the app store one)
|
||||||
|
|
||||||
|
|
||||||
filename = tools.saveTempFile(theFile)
|
filename = tools.saveTempFile(theFile)
|
||||||
msrdc = '/Applications/Remote Desktop Connection.app/Contents/MacOS/Remote Desktop Connection'
|
msrdc = '/Applications/Remote Desktop Connection.app/Contents/MacOS/Remote Desktop Connection'
|
||||||
cord = "/Applications/CoRD.app/Contents/MacOS/CoRD"
|
cord = "/Applications/CoRD.app/Contents/MacOS/CoRD"
|
||||||
|
|
||||||
if os.path.isfile(msrdc):
|
if os.path.isfile(cord):
|
||||||
executable = msrdc
|
|
||||||
elif os.path.isfile(cord):
|
|
||||||
executable = cord
|
executable = cord
|
||||||
|
elif os.path.isfile(msrdc):
|
||||||
|
executable = msrdc
|
||||||
else:
|
else:
|
||||||
executable = None
|
executable = None
|
||||||
|
|
||||||
@ -39,6 +36,7 @@ def onExit():
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if executable is None:
|
if executable is None:
|
||||||
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
|
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
|
||||||
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
|
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
|
||||||
|
@ -10,16 +10,14 @@ from uds.forward import forward # @UnresolvedImport
|
|||||||
|
|
||||||
from uds import tools # @UnresolvedImport
|
from uds import tools # @UnresolvedImport
|
||||||
|
|
||||||
import six
|
# First, try to locate Remote Desktop Connection (version 2, from Microsoft website, not the app store one)
|
||||||
|
|
||||||
# First, try to locate Remote Desktop Connection (version 2, from Microsoft website, not the app store one)
|
|
||||||
msrdc = '/Applications/Remote Desktop Connection.app/Contents/MacOS/Remote Desktop Connection'
|
msrdc = '/Applications/Remote Desktop Connection.app/Contents/MacOS/Remote Desktop Connection'
|
||||||
cord = "/Applications/CoRD.app/Contents/MacOS/CoRD"
|
cord = "/Applications/CoRD.app/Contents/MacOS/CoRD"
|
||||||
|
|
||||||
if os.path.isfile(msrdc):
|
if os.path.isfile(cord):
|
||||||
executable = msrdc
|
|
||||||
elif os.path.isfile(cord):
|
|
||||||
executable = cord
|
executable = cord
|
||||||
|
elif os.path.isfile(msrdc):
|
||||||
|
executable = msrdc
|
||||||
else:
|
else:
|
||||||
executable = None
|
executable = None
|
||||||
|
|
||||||
@ -35,6 +33,7 @@ def onExit():
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if executable is None:
|
if executable is None:
|
||||||
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
|
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
|
||||||
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
|
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
|
||||||
@ -48,7 +47,6 @@ if executable is None:
|
|||||||
|
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
|
||||||
forwardThread, port = forward('{m.tunHost}', '{m.tunPort}', '{m.tunUser}', '{m.tunPass}', '{m.ip}', 3389, waitTime={m.tunWait}) # @UndefinedVariable
|
forwardThread, port = forward('{m.tunHost}', '{m.tunPort}', '{m.tunUser}', '{m.tunPass}', '{m.ip}', 3389, waitTime={m.tunWait}) # @UndefinedVariable
|
||||||
|
|
||||||
if forwardThread.status == 2:
|
if forwardThread.status == 2:
|
||||||
|
Loading…
Reference in New Issue
Block a user