dynamics 关联SecureCRT,以及SecureCRT基本设置Python小脚本

本文介绍了如何修改dynagen.ini配置文件以关联SecureCRT,并通过Python脚本进行自动化设置。内容包括注释putty,指定SecureCRT路径和Python脚本位置,以及在SecureCRT中使用Python和VBScript的条件。此外,还提供了Windows环境下自动登录服务器的bat脚本示例。
摘要由CSDN通过智能技术生成

##一.修改dynagen.ini配置文件

  #1.注释掉原本telnet使用的putty

#telnet = start ../bin/putty/putty %h %p
 #2.添加SecureCRT启动信息

telnet = start C:\SecureCRT\SecureCRT.exe /SCRIPT C:\Users\dell\Desktop\Dynamips@EDURainbow\bin\dynagen/crt_py.py /T  /telnet %h %p

C:\SecureCRT\SecureCRT.exe  ->>SecureCRT所在位置

C:\Users\dell\Desktop\Dynamips@EDURainbow\bin\dynagen/crt_py.py  ->>python小脚本所在位置

/T  ->>在同一个标签下打开

python脚本:crt_py.py

# $language = "Python"
# $interface = "1.0"

#Connected to Dynamips VM "R1" (ID 0, type c7200) - Console port
def main():
	crt.Screen.Synchronous = True
        if crt.Screen.WaitForString("Console port"):
		crt.Screen.Send('\r')
	prompt=crt.Screen.Get(1,0,2,80
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值