中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 07:17
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Please provide the specific Chinese text content of the script so that I can translate it to English. Currently, the content you provided is just a question "求脚本中telnet类似ftp -s:的调用命令", and there is no specific script content. Please supply the relevant script content.
Printable Version  2,869 / 20
Floor1 lililulula Posted 2007-04-17 04:07
中级用户 Posts 138 Credits 302
Please enter the text you want to translate here. Please make sure to follow the translation requirements accurately.
May I ask how to implement a command similar to ftp -s:filename.txt in telnet mode? Is there such a calling command in the batch script?
Floor2 3391617 Posted 2007-04-17 05:42
初级用户 Posts 56 Credits 116
ftp -s:
Upload ftp?
Floor3 lililulula Posted 2007-04-17 06:03
中级用户 Posts 138 Credits 302
Bump up, reply to the upstairs, it's calling the login text. Which great god knows what parameters telnet can use to call the login text?
Floor4 lililulula Posted 2007-04-17 22:31
中级用户 Posts 138 Credits 302
If there are friends who know, please help. Is there a telnet parameter similar to ftp -s?
Floor5 vkill Posted 2007-04-18 00:24
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
I don't know, I use nc
Floor6 lililulula Posted 2007-04-18 00:46
中级用户 Posts 138 Credits 302
Excuse me, Brother vkill, what is nc?
Floor7 everest79 Posted 2007-04-18 01:09
金牌会员 Posts 1,127 Credits 2,564
Simple telnet doesn't have this function. It requires file support, but corresponding localization and remote configuration are needed. It's said that nc is used by hackers, heh heh
Floor8 flyinspace Posted 2007-04-18 01:12
银牌会员 Posts 517 Credits 1,206
nc cannot simply be said to be for hackers.

This software has no help information.. but it can help with many things.
Much better than the one built into Windows.

It can be said to be an essential weapon :)
Floor9 lililulula Posted 2007-04-18 01:27
中级用户 Posts 138 Credits 302
Thanks to the explanations of the above friends, does that mean I can't use batch scripts to automatically execute the shell of telnet now? If there is a way to achieve it, please give me some pointers, thank you
Floor10 everest79 Posted 2007-04-18 01:31
金牌会员 Posts 1,127 Credits 2,564
Under Windows, you can use VBS scripts to log in.

I found one here, you can take a look.

tel.cmd
@ECHO OFF
ECHO .
ECHO .
ECHO .
ECHO .
ECHO Note: The remote batch configuration is about to start. Please close other executable programs.
ECHO Note: Do not use the mouse or keyboard during the configuration.
ECHO .
ECHO .
ECHO .
ECHO .
ECHO Press any key to start EIA remote batch configuration
pause>nul
for /f %%i in (list.txt) do start telnet 202.76.56.107 && cscript //nologo telsvr.vbs %%i && echo %%i done!>>log.txt

ECHO Batch configuration completed
pause>nul

telsh.vbs
set tel=WScript.CreateObject("WScript.Shell")
temp=WScript.Arguments.Item(0)
WScript.Sleep 5000
tel.SendKeys "admin{ENTER}"
WScript.Sleep 1500
tel.SendKeys "admin{ENTER}"
WScript.Sleep 1500
tel.SendKeys "en{ENTER}"
WScript.Sleep 1500
tel.SendKeys "+6"
tel.SendKeys "config{ENTER}"
WScript.Sleep 1500
tel.SendKeys "proxy "
tel.SendKeys temp
tel.SendKeys "{ENTER}"
WScript.Sleep 3000
tel.SendKeys "en{ENTER}"
WScript.Sleep 2000
tel.SendKeys "me{ENTER}"
WScript.Sleep 3000
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "Y{ENTER}"
WScript.Sleep 1500
tel.SendKeys "212.172.165.136{ENTER}"
WScript.Sleep 2000
tel.SendKeys "61{ENTER}"
WScript.Sleep 1500
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "{ENTER}"
WScript.Sleep 1500
tel.SendKeys "Y{ENTER}"
WScript.Sleep 1500
tel.SendKeys "exit{ENTER}"
WScript.Sleep 1500
tel.SendKeys "exit{ENTER}"
WScript.Sleep 1500
tel.SendKeys "exit{ENTER}"
WScript.Sleep 1500
Floor11 lililulula Posted 2007-04-18 02:46
中级用户 Posts 138 Credits 302
Thanks to everest79 for the help, I'll study this slowly. I asked a few vbs for the previous few batches. It seems that batches and vbs need to be together to solve the problem.
Floor12 siai88 Posted 2007-04-18 03:45
初级用户 Posts 62 Credits 118
Ah, I saw it, but I didn't understand it.
Floor13 lililulula Posted 2007-04-18 04:12
中级用户 Posts 138 Credits 302
I've tried it earlier and it didn't work. I have a few questions and would like to ask brother everest79.

for /f %%i in (list.txt) do start telnet 202.76.56.107 && cscript //nologo telsvr.vbs %%i && echo %%i done!>>log.txt

What is the role of list.txt? There is no content of list.txt in the code.

If for /f %%i in ('"cscript //nologo telsvr.vbs"') do start telnet 202.76.56.107

Does it mean that it calls the login command in telsvr.vbs to log in via telnet?
Floor14 everest79 Posted 2007-04-18 09:51
金牌会员 Posts 1,127 Credits 2,564
This is for batch modifying EOIP devices. list.txt is the list of remote devices, and I don't have it; otherwise, it wouldn't be a big deal. You can directly execute telnet IP &&cscript //nologo telsvr.vbs. The subsequent parameters are not needed either; they are used to pass the device name. Since this is sensitive to the window, it is recommended that you don't perform other operations when executing it. A simple method is that you open a notepad, then double-click the VBS script and activate the notepad window, so you can test it.
Floor15 lililulula Posted 2007-04-18 22:39
中级用户 Posts 138 Credits 302
Brother everest79 made a simple test. I have succeeded, but when executing telnet IP &&cscript //nologo telsvr.vbs. Theoretically, if all my text or input windows are closed, this sentence should achieve the effect of automatically logging in to telnet with the content of vbs. But I seem not to succeed. After telnet, the vbs login command is not automatically executed. Also, the second sentence of vbs will report an error of subscript out of range. This sentence can be executed normally if removed. I don't know the function of this sentence.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023