资源简介
免安装永久免费版SecureCRT,图形化界面操作linux服务器,拖拉文件简便,使项目部署更加方便,切记,第一次打开FX工具,点击视图菜单勾选本地视图,此时你还是看不到本地视图,这是因为它与传输队列视图挤压到一起了,拖动下视图,你就会找到它
代码片段和文件信息
# $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: “ + now
“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
# concat 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 szFile
f = fil
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.131.217[10.10.131.217]22.pub
文件 664 2015-03-25 14:34 SecureCRT_ha\Known Hosts\10.10.131.218[10.10.131.218]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.38.135[10.10.38.135]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.38.181[10.10.38.181]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.38.196[10.10.38.196]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.38.198[10.10.38.198]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.38.213[10.10.38.213]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.38.221[10.10.38.221]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.62.50[10.10.62.50]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.73.33[10.10.73.33]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.73.42[10.10.73.42]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.73.64[10.10.73.64]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.73.81[10.10.73.81]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.73.84[10.10.73.84]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.74.40[10.10.74.40]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.74.70[10.10.74.70]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.10.74.73[10.10.74.73]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.147.1.182[10.147.1.182]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.147.5.51[10.147.5.51]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.46.103.129[10.46.103.129]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.46.103.130[10.46.103.130]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.46.103.131[10.46.103.131]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\10.46.103.132[10.46.103.132]22.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\211.137.214.98[211.137.214.98]7777.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\211.143.212.214[211.143.212.214]221.pub
文件 664 2015-03-04 16:18 SecureCRT_ha\Known Hosts\42.121.123.185[42.121.123.185]22.pub
文件 1656 2015-03-25 14:34 SecureCRT_ha\Known Hosts\hostsmap.txt
文件 422400 2010-11-16 16:17 SecureCRT_ha\SecureCRT_CN\SecureCRT\Activator.exe
文件 1708032 2008-12-16 12:29 SecureCRT_ha\SecureCRT_CN\SecureCRT\ccme_ba
文件 382 2008-12-16 12:29 SecureCRT_ha\SecureCRT_CN\SecureCRT\ccme_ba
............此处省略121个文件信息
相关资源
- ME909S-821 Linux驱动及说明
- 博创ARM2410@linux实验指导书
- Linux网络编程 宋敬彬 孙海滨 PDF书 P
- arm-linux-gcc-3.4.1.tar.bz2
- Linux高性能服务器编程高清PDF(带书签
- cmake-3.14.0-Linux-x86_64
- SynergyPro_1.11.1_局域网共享键盘鼠标方
- hyperledger-fabric-linux-amd64-1.1.0.tar.gz
- SecureCRT8.0中文版+注册机+汉化补丁
- 韦东山学员决狐疑第三期第一个项目
- SecureCRT解压版
- [最新]SecureCRT+SecureFX.Bundle.v8.5-x64附注
- 我的嵌入式Linux应用开发之路(第二版
- linux 编程白皮书 linux 编程白皮书
- Linux命令行与Shell脚本编程大全
- RTL8188EUS_RTL8189ES_linux_v4.1.7_9024.2013091
- Linux环境编程图文指南.林世霖(带书
- rhci-5.8-1.iso Linux系统安装引导
- yafeilinux教程-qt学习必备-PDF版
- 东北大学linux教学资料
- SecureCRT+FX 8.5.3x64-Build1867汉化补丁完美
- linux2.6.1内核源码注释
- SecureCRT 7.3.4破解版(含注册机)
- 全新SecureCRT8.064位+注册机,经典
- Linux内核设计与实现_第三版_清晰中文
- USB2.0网卡驱动(windows mac linux)AX887
- eclipse-inst-linux32.tar.gz
-
嵌入式Linux基础教程em
bedded Linux pr - Linux内核设计的艺术:图解Linux操作系
- SecureCRT、SecureFX 7.3.6 for MAC
评论
共有 条评论