资源简介
SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,简单地说是Windows下登录UNIX或Linux服务器主机的软件。
SecureFX是一款由VanDyke Software, Inc.(中文译为:范戴克软件公司)研发生产的支持普通FTP标准和安全数据传输标准(SFTP 或者 在SSH2 上的FTP)的FTP客户端软件,有着易用的、类似于资源管理器的用户界面。
代码片段和文件信息
# $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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 724480 2012-07-29 16:07 SecureCRT\Activator.exe
文件 1827328 2008-12-16 12:29 SecureCRT\ccme_ba
文件 384 2008-12-16 12:29 SecureCRT\ccme_ba
文件 1462272 2012-07-29 17:01 SecureCRT\ClientConfigUI70U.dll
文件 413184 2012-07-29 17:01 SecureCRT\CommonUI70U.dll
文件 889856 2012-07-29 17:01 SecureCRT\ConnectDialog70U.dll
文件 1891840 2008-12-16 12:29 SecureCRT\cryptocme2.dll
文件 384 2008-12-16 12:29 SecureCRT\cryptocme2.dll.manifest
文件 1607 2008-12-16 12:29 SecureCRT\cryptocme2.sig
文件 300032 2012-07-29 17:01 SecureCRT\FTP.dll
文件 310272 2012-07-29 17:01 SecureCRT\FTPSSL.dll
文件 5239 2004-03-17 14:47 SecureCRT\Keymaps\CRiSP.key
文件 2173 2004-03-17 14:47 SecureCRT\Keymaps\doorway.key
文件 9953 2004-03-17 14:47 SecureCRT\Keymaps\VShell.key
文件 1843 2004-03-17 14:47 SecureCRT\Keymaps\vt100.key
文件 2070 2004-03-17 14:47 SecureCRT\Keymaps\vt220-linux.key
文件 2537 2004-03-17 14:47 SecureCRT\Keymaps\vt220.key
文件 3735 2004-03-17 14:47 SecureCRT\Keymaps\vt400.key
文件 3957 2004-03-17 14:47 SecureCRT\Keymaps\wyse50.key
文件 889792 2012-07-07 00:41 SecureCRT\LicenseHelper.exe
文件 798720 2012-07-29 16:07 SecureCRT\LicenseUI70U.dll
文件 6915 2011-09-12 10:35 SecureCRT\Menus\allsystem.mnu
文件 8726 2012-06-04 12:14 SecureCRT\Menus\default.mnu
文件 4109 2008-02-08 11:11 SecureCRT\Menus\example.mnu
文件 7249 2011-09-12 10:35 SecureCRT\Menus\Japanese.mnu
文件 3882 2011-09-12 10:35 SecureCRT\Menus\kiosk.mnu
文件 0 2011-09-12 10:35 SecureCRT\Menus\nzp16C.tmp
文件 0 2012-06-04 12:14 SecureCRT\Menus\nzp16D.tmp
文件 0 2008-02-08 11:11 SecureCRT\Menus\nzp16E.tmp
文件 0 2011-09-12 10:35 SecureCRT\Menus\nzp16F.tmp
............此处省略69个文件信息
相关资源
- OPC.服务器模拟器
- carte子服务器配置软件:yajsw-stable-1
- 基于STM32F407的web服务器,可进行设备
- OPC服务器测试软件
- 鸟哥的Linux私房菜-服务器架设篇(第
- DELL机架式服务器最新Viso模具
- HelixServerUnlimite(Helix server 11 for Wind
- 基于workerman做的一套软硬件相结合的
- HP服务器远程管理 iLO4_v2.72固件升级包
- OPC UA客户端程序,可测试OPCUA服务器
- 斗鱼弹幕抽奖器1.1(新服务器).rar
- 1521批量抓服务器教程
- DevOps故障排除:Linux服务器运维最佳实
- IEC-61850标准[中文.完整版]+服务器软件
- linux多线程服务器编程
- [JBoss实战:服务器配置指南].(杰米等
- 控制装置标准化通信 OPC服务器开发设
- IBM服务器的visio形状
- opc-ua统一标准客户端/服务器测试工具
- Linux应用大全:服务器架设
- keil使用TortoiseSVN版本控制服务器与本
- 手机wifi热点服务器搭建
- 根据wsdl使用gsoap生成的服务器和客户
- CobaltStrike3.13 MacOS客户端+服务器端
- 安卓点餐系统源码服务器和客户端
- SpringMVC 跨服务器文件上传
- 安卓和客户端http通信demo
- Kiwi Syslog 8.3.28 破解版
- Magic Winmail Server V4.4邮件服务器
- zigbee读取传感器组网上传服务器
评论
共有 条评论