资源简介
此为 SecureCR+SecureFX 的整合版,并做成了绿色便携版,所有的配置保存在 Data 目录中,在 SecureCR 或 SecureFX 中可以相互调用对方。有32位和64位版本,根据自己的系统版本使用即可~
代码片段和文件信息
# $language = “python“
# $interface = “1.0“
# AddCommentToLogFile.py
#
# Description:
# This example script allows you to add a custom line of text to your
# SecureCRT log file. The user will be prompted for the text to add
# to the log file; logging will be stopped; the text provided by the
# user will be appended to the log file; then SecureCRT logging will
# be restarted.
#
# This method only works with connections associated with a Session
# configuration in which a log file is specified.
#
# Demonstrates:
# - How to prompt for user input using the SecureCRT InputBox() function.
# - How to access Session.LogFileName to determine the log file name
# stored for the current session.
# - How to use the Session.Logging property to determine if logging
# is currently active.
# - How to use the Python replace() method to substitute substrings
# within an existing string.
# - How to use the Python file object to open an existing text file
# and append data.
#
import datetime
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def Main():
# Make this script tab safe
tab = crt.GetscriptTab()
if tab.Session.LogFileName == ““ :
crt.Dialog.MessageBox(“Error.\n\n\
This script requires a session configuration in which a \
log file is defined.\n\n\
Specify a Log file name in Session Options ““Terminal / \
Log File““ and run this script again.“)
return
# 1. Stop logging to free up the log file for writing by our script.
tab.Session.Log(False)
# 2. Prompt the user for the text to add to the log file.
now = str(datetime.datetime.now())
textToAdd = crt.Dialog.Prompt(
“Add comment to log file (use \\r\\n to separate multiple lines):\n\n\
Comment will be prefaced with current timestamp:\n“ + now + “\n“
“Add Comment To SecureCRT Log File\n“ + now + “: “)
# Prompt returns ““ if the user cancels
if textToAdd == ““:
return
# 3. Write data to the file. If you want to include a newline you must
# concatenate a \n character to the end of the line. Note also that you can
# wrap the comment with certain markers and not require the user to enter
# these markers when prompted. Although the prompt function only allows
# one line per entry you can set up a tag that can be used to represent
# a new line such as “\r\n“ and then replace this tag with a \n as we
# have done in this example:
textToAdd = “\n/********************************************/ \n\
* “ + now + “: \n* “ + textToAdd.replace(“\r\n“ “\n* “) + “\n\
/********************************************/ \n“
WriteToFile(tab.Session.LogFileName textToAdd)
# 4. Start up logging again making sure we append rather than overwrite.
tab.Session.Log(True True)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def WriteToFile(filename data):
# filename: Full path to file
# data: data to be written to the
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-01-16 17:29 SecureCRSecureFXPortable32\
目录 0 2012-05-01 19:07 SecureCRSecureFXPortable32\App\
目录 0 2011-12-21 02:36 SecureCRSecureFXPortable32\App\AppInfo\
文件 8734 2011-08-21 17:12 SecureCRSecureFXPortable32\App\AppInfo\appicon.ico
文件 690 2011-12-24 01:28 SecureCRSecureFXPortable32\App\AppInfo\appicon_16.png
文件 1698 2011-12-24 01:28 SecureCRSecureFXPortable32\App\AppInfo\appicon_32.png
文件 585 2012-08-04 00:48 SecureCRSecureFXPortable32\App\AppInfo\appinfo.ini
目录 0 2012-08-04 00:05 SecureCRSecureFXPortable32\App\VanDyke Clients\
文件 570368 2012-07-29 16:06 SecureCRSecureFXPortable32\App\VanDyke Clients\Activator.exe
文件 1132032 2012-07-29 16:58 SecureCRSecureFXPortable32\App\VanDyke Clients\ClientConfigUI70U.dll
文件 326144 2012-07-29 16:58 SecureCRSecureFXPortable32\App\VanDyke Clients\CommonUI70U.dll
文件 694784 2012-07-29 16:58 SecureCRSecureFXPortable32\App\VanDyke Clients\ConnectDialog70U.dll
文件 252416 2012-07-29 16:58 SecureCRSecureFXPortable32\App\VanDyke Clients\FTP.dll
文件 260096 2012-07-29 16:58 SecureCRSecureFXPortable32\App\VanDyke Clients\FTPSSL.dll
目录 0 2012-08-04 00:05 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\
文件 5239 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\CRiSP.key
文件 9953 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\VShell.key
文件 2173 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\doorway.key
文件 1843 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\vt100.key
文件 2070 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\vt220-linux.key
文件 2537 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\vt220.key
文件 3735 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\vt400.key
文件 3957 2004-03-17 14:47 SecureCRSecureFXPortable32\App\VanDyke Clients\Keymaps\wyse50.key
文件 763840 2012-07-29 16:16 SecureCRSecureFXPortable32\App\VanDyke Clients\LicenseHelper.exe
文件 732160 2012-07-29 16:06 SecureCRSecureFXPortable32\App\VanDyke Clients\LicenseUI70U.dll
目录 0 2012-08-04 00:05 SecureCRSecureFXPortable32\App\VanDyke Clients\Menus\
文件 7249 2011-09-12 10:35 SecureCRSecureFXPortable32\App\VanDyke Clients\Menus\Japanese.mnu
文件 6915 2011-09-12 10:35 SecureCRSecureFXPortable32\App\VanDyke Clients\Menus\allsystem.mnu
文件 8726 2012-06-04 12:14 SecureCRSecureFXPortable32\App\VanDyke Clients\Menus\default.mnu
文件 4109 2008-02-08 11:11 SecureCRSecureFXPortable32\App\VanDyke Clients\Menus\example.mnu
文件 3882 2011-09-12 10:35 SecureCRSecureFXPortable32\App\VanDyke Clients\Menus\kiosk.mnu
............此处省略185个文件信息
相关资源
- SecureCRT SecureFX 7.0 注册机 完美破解
- SecureCRSecureFXP-v7.0.0
- SecureCRT+FX v8.5.2-x64破解版-含注册机
- SecureCRT8.5_for_linux.zip
- secureCRT8.5.2+注册机
- secureCRT破解版
- SecureCRT_x86_7.1.1.264_3987绿色版无需安装
- SecureCRT8.1 keygen 绿色版
- SecureCRT 最新8.3.4版本+注册 亲测可用
- SecureCRTSecure
- securecrt 8.5.3 64位官方安装包
- SecureCRT8.0 汉化版
- SecureCRT、SecureFX
- SecureCRT8.0 RPM 版
- SecureCRT 8.3 注册机
- linux远程连接工具SecureCRT
- SecureCRT工具
- securecrt8.5含注册机
- securecrt.pj.zip
- SecureCRT 6.7.2含破解 亲测
- secureCRT win64破解版
- SecureCRT-7.3.3带注册机实测可用
- SecureCRT 7.3.6英文版 32位/64位版 注册码
- SecureCRT7.3.7和SecureFX7.3.7破解版64位支持
- SecureCRT7.0.2完美破解版.zip
- SecureCRT8.3及破解说明.rar
- SecureCRT和注册机
- SecureCRT 8.5.2 x64 + 注册机
- SecureCRT+SecureFX 8.5.3 x64 破解版
- secureCRT7.1破解免安装版
评论
共有 条评论