Wednesday, April 15, 2020

Macro-Script

How to used Macro Script(Terateam) to do studd like console:

Example 1 using telnet method to login cisco server or router: 
File name: telnet_cisco.ttl
timeout = 10
connect '192.168.1.252:23 /nossh /T=1'
;Wait a prompt message to login
wait 'Username:'
; Send username
sendln 'cisco'
;Wait for a keyword to enter password
wait 'Password:'
; Send password
sendln 'cisco'
File name: cisco.bat
@echo off
cd C:\Program Files (x86)\teraterm
TTERMPRO /m=D:\Macro_script\telnet_cisco.ttl
pause
How to used it:
Just run the cisco.bat, it will automatic telnet  for you.

Example 2: using serial comport to login your console 
File name: comport.ttl
pause 5
;sendin command
sendln "pacm "
pause 2
;closett will close the screen
closett

File name: comport.bat
@echo off
cd C:\Program Files (x86)\teraterm
TTERMPRO /C=3 /BAUD=115200 /c=3 /m=D:\comport.ttl
pause
How to used it:
Just run the comport.bat, it will automatic accees using terateam to open com-port3 to your DUT console. If  you have different com-port just changed the c=3 to correct com-port. My console port is 3, so I set to 3.


No comments:

Post a Comment