X-Git-Url: http://xvm.mit.edu/gitweb/invirt/scripts/vnc-client.git/blobdiff_plain/c33a5118f3fba10649780b1af78ea6e881900d96..8cc2b788c3ff63960e115848c689a52e21287128:/invirt-vnc-client diff --git a/invirt-vnc-client b/invirt-vnc-client index ad5cce2..a7b87e9 100755 --- a/invirt-vnc-client +++ b/invirt-vnc-client @@ -159,12 +159,12 @@ def main(): sys.exit(2) from subprocess import PIPE, Popen try: - p = Popen(["remctl", "remote", "control", args[0], "vnctoken"], + p = Popen(["remctl", "xvm-remote.mit.edu", "control", args[0], "vnctoken"], stdout=PIPE) except OSError: if verbose: print "remctl not found in path. Trying remctl locker." p = Popen(["athrun", "remctl", "remctl", - "remote", "control", args[0], "vnctoken"], + "xvm-remote.mit.edu", "control", args[0], "vnctoken"], stdout=PIPE) authtoken = p.communicate()[0] if p.returncode != 0: @@ -175,9 +175,7 @@ def main(): # Unpack authentication token try: - token_outer = base64.urlsafe_b64decode(authtoken) - token_outer = pickle.loads(token_outer) - token_inner = pickle.loads(token_outer["data"]) + token_inner = pickle.loads(base64.urlsafe_b64decode((authtoken.split("."))[0])) machine = token_inner["machine"] connect_host = token_inner["connect_host"] connect_port = token_inner["connect_port"]