• 大小: 43.32M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-02
  • 语言: 其他
  • 标签: 其他  

资源简介

Xshell.zip

资源截图

代码片段和文件信息

def Main():
xsh.Session.Open(“C:\...\NetSarang\Xshell\Sessions\New Session.xsh“)
xsh.Screen.Synchronous = True #True or False
xsh.Session.Sleep(1000)

#*** WaitForString ***
xsh.Screen.WaitForString(“aaa“) # input “aaa“ in Terminal

#*** Send ***
xsh.Screen.Send(“cat /etc/passwd“)
xsh.Screen.Send(‘\r‘)
xsh.Session.Sleep(1000)

#*** Get Clear ***
ScreenRow = xsh.Screen.CurrentRow - 1
ReadLine = xsh.Screen.Get(ScreenRow 1 ScreenRow 40)
Items = ReadLine.split(‘:‘);
xsh.Dialog.MsgBox(Items[2])
xsh.Screen.Clear()

#*** Property ***
xsh.Screen.Synchronous = False
MsgProp = “Col:“ + str(xsh.Screen.CurrentColumn) + “ “
MsgProp = MsgProp + “Row:“ + str(xsh.Screen.CurrentRow) + “ “
MsgProp = MsgProp + “TermCol:“ + str(xsh.Screen.Columns) + “ “
MsgProp = MsgProp + “TermRow:“ + str(xsh.Screen.Rows) 
xsh.Dialog.MsgBox(MsgProp)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-09-27 09:40  Xshell5_1\
     文件      158936  2015-04-09 19:06  Xshell5_1\CrashRpt.dll
     文件      977112  2015-04-09 19:06  Xshell5_1\CrashSender.exe
     目录           0  2017-09-27 09:40  Xshell5_1\Languages\
     文件      284672  2015-04-09 19:04  Xshell5_1\Languages\XagentCHS.dll
     文件      285184  2015-04-09 19:04  Xshell5_1\Languages\XagentCHT.dll
     文件      296960  2015-04-09 19:04  Xshell5_1\Languages\XagentDEU.dll
     文件      297472  2015-04-09 19:04  Xshell5_1\Languages\XagentESN.dll
     文件      297984  2015-04-09 19:04  Xshell5_1\Languages\XagentFRA.dll
     文件      288256  2015-04-09 19:04  Xshell5_1\Languages\XagentJPN.dll
     文件      286720  2015-04-09 19:04  Xshell5_1\Languages\XagentKOR.dll
     文件      366592  2015-04-09 19:06  Xshell5_1\Languages\XshellCHS.dll
     文件      367104  2015-04-09 19:06  Xshell5_1\Languages\XshellCHT.dll
     文件      716800  2015-04-09 19:05  Xshell5_1\Languages\XshellCoreCHS.dll
     文件      717824  2015-04-09 19:05  Xshell5_1\Languages\XshellCoreCHT.dll
     文件      787456  2015-04-09 19:05  Xshell5_1\Languages\XshellCoreDEU.dll
     文件      791552  2015-04-09 19:05  Xshell5_1\Languages\XshellCoreESN.dll
     文件      793600  2015-04-09 19:05  Xshell5_1\Languages\XshellCoreFRA.dll
     文件      735744  2015-04-09 19:05  Xshell5_1\Languages\XshellCoreJPN.dll
     文件      730624  2015-04-09 19:05  Xshell5_1\Languages\XshellCoreKOR.dll
     文件      396800  2015-04-09 19:06  Xshell5_1\Languages\XshellDEU.dll
     文件      398336  2015-04-09 19:06  Xshell5_1\Languages\XshellESN.dll
     文件      399360  2015-04-09 19:06  Xshell5_1\Languages\XshellFRA.dll
     文件      374272  2015-04-09 19:06  Xshell5_1\Languages\XshellJPN.dll
     文件      372224  2015-04-09 19:05  Xshell5_1\Languages\XshellKOR.dll
     文件      254976  2015-04-09 19:05  Xshell5_1\Languages\XtransportCHS.dll
     文件      254976  2015-04-09 19:05  Xshell5_1\Languages\XtransportCHT.dll
     文件      256512  2015-04-09 19:05  Xshell5_1\Languages\XtransportDEU.dll
     文件      256512  2015-04-09 19:05  Xshell5_1\Languages\XtransportESN.dll
     文件      257024  2015-04-09 19:05  Xshell5_1\Languages\XtransportFRA.dll
     文件      255488  2015-04-09 19:05  Xshell5_1\Languages\XtransportJPN.dll
............此处省略36个文件信息

评论

共有 条评论