China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-27 11:51
中国DOS联盟论坛 » 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. View 2,679 Replies 20
Original Poster Posted 2007-04-17 04:07 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
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?
Floor 2 Posted 2007-04-17 05:42 ·  中国 辽宁 丹东 联通
初级用户
★★
Credits 116
Posts 56
Joined 2007-03-07 04:53
19-year member
UID 80966
Gender Male
Status Offline
ftp -s:
Upload ftp?
QQ=3391617
Floor 3 Posted 2007-04-17 06:03 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
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?
Floor 4 Posted 2007-04-17 22:31 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
If there are friends who know, please help. Is there a telnet parameter similar to ftp -s?
Floor 5 Posted 2007-04-18 00:24 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
I don't know, I use nc
Floor 6 Posted 2007-04-18 00:46 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
Excuse me, Brother vkill, what is nc?
Floor 7 Posted 2007-04-18 01:09 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
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
Floor 8 Posted 2007-04-18 01:12 ·  中国 广东 广州 海珠区 电信
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
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 :)
知,不觉多。不知,乃求知
Floor 9 Posted 2007-04-18 01:27 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
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
Floor 10 Posted 2007-04-18 01:31 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
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
Floor 11 Posted 2007-04-18 02:46 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
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.
Floor 12 Posted 2007-04-18 03:45 ·  中国 浙江 宁波 电信
初级用户
★★
职业灌水者
Credits 118
Posts 62
Joined 2007-04-16 05:45
19-year member
UID 85353
Gender Male
Status Offline
Ah, I saw it, but I didn't understand it.
Floor 13 Posted 2007-04-18 04:12 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
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?
Floor 14 Posted 2007-04-18 09:51 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
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.
Floor 15 Posted 2007-04-18 22:39 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
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.
Forum Jump: