Advertisement
Guest User

Untitled

a guest
Mar 1st, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. # pip install pyuserinput
  2.  
  3. import subprocess
  4. import sys
  5. import time
  6.  
  7. import pykeyboard
  8.  
  9. if len(sys.argv) > 1:
  10. ubiqui = sys.argv[1]
  11. else:
  12. ubiqui = input('Touch the ubiqui device: ')
  13. user = 'youruser'
  14. password = 'YourVerySecurePassword'
  15. pin = 'YourP1n'
  16. workspace = 'RegCodeOfYourWorkSpace'
  17.  
  18. k = pykeyboard.PyKeyboard()
  19. TAB = k.tab_key
  20. ENTER = k.enter_key
  21.  
  22. subprocess.Popen(['pcoip-client', '-h', workspace])
  23. time.sleep(3)
  24.  
  25. k.type_string(user)
  26. k.tap_key(TAB)
  27.  
  28. k.type_string(password)
  29. k.tap_key(TAB)
  30.  
  31. k.type_string(pin)
  32. k.type_string(ubiqui)
  33. k.tap_key(ENTER)
  34.  
  35. time.sleep(5)
  36. k.type_string(password)
  37. k.tap_key(ENTER)
  38.  
  39. print('Finished!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement