# -*- coding: utf-8 -*- import os,sys,urllib,re import win32api import subprocess import time print "AirSSH 线路连接器(出现using username<用户名>表示连接成功:" username=raw_input("输入Air SSH用户名:") password=raw_input("输入Air SSH密码:") host='vps.airssh.com' pathdir=sys.argv[0][0:sys.argv[0].rfind('//')+1] pathroot1=sys.argv[0] pathroot1=pathroot1[0:1] pathroot1=pathroot1.lower() pathroot2=sys.argv[0] pathroot2=pathroot2[:10] pathroot2=pathroot2[3:] pathroot2=pathroot2.lower() re1="/" re2="////" pathroot2=re.sub(re2,re1,pathroot2) pathroot3=sys.argv[0] pathroot3=pathroot3[:-9] pathroot3=pathroot3.lower() confdir="/cygdrive/"+pathroot1+"/"+pathroot2+"/etc" conffile="/cygdrive/"+pathroot1+"/"+pathroot2+"/etc/config" openfile=pathroot3+"/etc/config" plink=pathroot3+"/sbin/plink.exe" os.system(plink+' -N -C -D 1010 -ssh '+username+'@'+host+' -pw '+password) time.sleep(3) win32api.WinExec("TaskKill /F /t /im plink.exe",0) win32api.WinExec("TaskKill /F /t /im start.exe",0)
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/8471.html