Skip to content

Instantly share code, notes, and snippets.

@wesleyit
Created February 26, 2019 13:55
Show Gist options
  • Save wesleyit/78c99272179cc8d68cbfbe4456ca6455 to your computer and use it in GitHub Desktop.
Save wesleyit/78c99272179cc8d68cbfbe4456ca6455 to your computer and use it in GitHub Desktop.
This python script will call a PCOIP client window and give all necessary parameters for a connection.
# pip install pyuserinput
import subprocess
import sys
import time
import pykeyboard
if len(sys.argv) > 1:
ubiqui = sys.argv[1]
else:
ubiqui = input('Touch the ubiqui device: ')
user = 'youruser'
password = 'YourVerySecurePassword'
pin = 'YourP1n'
workspace = 'RegCodeOfYourWorkSpace'
k = pykeyboard.PyKeyboard()
TAB = k.tab_key
ENTER = k.enter_key
subprocess.Popen(['pcoip-client', '-h', workspace])
time.sleep(3)
k.type_string(user)
k.tap_key(TAB)
k.type_string(password)
k.tap_key(TAB)
k.type_string(pin)
k.type_string(ubiqui)
k.tap_key(ENTER)
time.sleep(5)
k.type_string(password)
k.tap_key(ENTER)
print('Finished!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment