Macro Script for terateam(ttl)
There are many remote tool used for serial comport, ssh client, telnet client, and etc, such as putty, terateam, xshell, and more. Today I would like to show how to used terateam in a different way. I will involve these:
- manual way: used to connect serial com port(console redirection)
- write ttl, and load .ttl scipt
- use bat script to automatic run it
Why should we used it and what benefit would it bring to us? Well if you are Network security security penetration or system administration, i believe you often use these types of tool. If you have some many router or telnet/ssh server you have to type in account and password, which waster a lot of time. you can use python to write, but there is more easier way yo establish this by automatic login, that is writing a macro script. I am only going to show you easier way, if you are interest on it, you can refer to the documentation.
prerequisite
- For people who wants to use comport, please installed dirver
- Please install terateam
Part 1: Manual Way of using Tera Team
[Serial Com port]
- Got to your device management to make sue it installed driver, and copy com port. (option)
2. Open Tera Team and select file>newconnection
[ssh/telnet]
Part 2 Write a ttl script and load in from terateam
- open a new file name XX.ttl (xx can rename any name you like)
- Serial Port example:
pause 5
sendln "ifconfig "
pause 2
closett
3. Telnet method:
timeout = 10
connect '192.168.1.252:23 /nossh /T=1'
;Wait a prompt message to login
wait 'Username:'
; Send username
sendln 'guest'
;Wait for a keyword to enter password
wait 'Password:'
; Send password
sendln 'guest'
; OK I am login
; Wait for timeout
; waitevent 5
note: ; =>comment
4. save the file
5. open terateam and load the ttl file
As you can see, you have to load the ttl file in order to do it, which is not really efficient.
Part3 use bat automatic run it self (recommend)
This is the most efficient way, i hightly recommend you people use this way.
- Put your .ttl file in any directory
- create a bat file
[serial com port]
@echo off
cd C:\Program Files (x86)\teraterm
c:
set /p COMPORT="Enter your COM-PORT:"
ttermpro /C=%COMPORT% /BAUD=115200 /m=D:\comport.ttl
pause
you can also remove user enter com port, it just i think it’s better for user to type which com port they want. Without user enter comport use like this:
@echo off
cd C:\Program Files (x86)\teraterm
c:
ttermpro /C=4 /BAUD=115200 /m=D:\comport.ttl
pause
[telnet conenction]
@echo off
cd C:\Program Files (x86)\teraterm
c:
TTERMPRO /m=D:\telnet-192.168.1.251.ttl
pause
Conclusion
After using this way you can eailer access without opening teratream and remember you account user name or password.