|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『楼 主』:
求脚本中telnet类似ftp -s:的调用命令
使用 LLM 解释/回答一下
请问在telnet模式下如何实现类似ftp -s:filename.txt的调用命令?
批处理脚本中是否有这样的调用命令?
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?
|
|
2007-4-17 04:07 |
|
|
3391617
初级用户
 
积分 116
发帖 56
注册 2007-3-7
状态 离线
|
|
2007-4-17 05:42 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
顶一下,回楼上,是调用登陆文本,哪位大大知道telnet跟什么参数能够调用登陆文本?
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?
|
|
2007-4-17 06:03 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
如果有朋友知道还请帮忙,是否有类似ftp -s的telnet参数?
If there are friends who know, please help. Is there a telnet parameter similar to ftp -s?
|
|
2007-4-17 22:31 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
|
2007-4-18 00:24 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
请问vkill兄,nc是???
Excuse me, Brother vkill, what is nc?
|
|
2007-4-18 00:46 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
单纯的telnet不带有这个功能,是有文件支持,不过需要相应的本地化与远程配置
nc听说是黑客用的,嘿嘿
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
|
|
2007-4-18 01:09 |
|
|
flyinspace
银牌会员
    
积分 1206
发帖 517
注册 2007-3-25
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
nc也不能单纯的说是黑客用的。
这个软件不带帮助信息。。但可以帮忙处理好多事情呢。
比windows自带的好用很多。
可以说是必备的武器:)
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 :)
|

知,不觉多。不知,乃求知 |
|
2007-4-18 01:12 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
谢谢以上朋友的解释,也就是说我现在无法用批处理脚本实现telnet的shell自动执行,是吗?如果有方法可以实现,请指点一二,谢谢
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
|
|
2007-4-18 01:27 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
win下你可以用VBS脚本来登录
我这里找到一个,你可以看看
tel.cmd
@ECHO OFF
ECHO .
ECHO .
ECHO .
ECHO .
ECHO 注意:即将开始远程批配置请关闭其它可执行程序
ECHO 注意:配置过程中不要使用鼠标及键盘
ECHO .
ECHO .
ECHO .
ECHO .
ECHO 按任意键开始EIA远程批配置
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 批量配置完成
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 "{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
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
|
|
2007-4-18 01:31 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
谢谢everest79的帮助,东西我慢慢研究下,我之前几个批也请教了几个vbs,看来批和vbs同在才能解决问题啊.
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.
|
|
2007-4-18 02:46 |
|
|
siai88
初级用户
  职业灌水者
积分 118
发帖 62
注册 2007-4-16
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
啊看了 不过没看懂啊
Ah, I saw it, but I didn't understand it.
|
|
2007-4-18 03:45 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
前面实验了下,没有成功,有几点疑问还想问下everest79兄
for /f %%i in (list.txt) do start telnet 202.76.56.107 && cscript //nologo telsvr.vbs %%i && echo %%i done!>>log.txt
其中list.txt什么作用?代码中无list.txt内容
如果for /f %%i in ('"cscript //nologo telsvr.vbs"') do start telnet 202.76.56.107
是否就是调用了telsvr.vbs中的登陆命令telnet登陆?
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?
|
|
2007-4-18 04:12 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
这个是批量修改EOIP设备的,list.txt是远程设备列表,我可没有的,要不然不是发大了,你可以直接执行
telnet IP &&cscript //nologo telsvr.vbs
后边的参数也不需要,那是用来传递设备名称的
这个因为对窗口敏感,建议在执行时不要再执行其它操作
简单的方法是你打开一个记事本,然后双击VBS脚本,并将记事本窗口激活,这样就可以测试了
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.
|
|
2007-4-18 09:51 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
everest79兄简单测试 我已经成功,但是执行telnet IP &&cscript //nologo telsvr.vbs
理论上我所有文本或可输入窗口都关闭的话,这句应该是达到能够以vbs内容自动登陆telnet的效果,但是我好象没成功,telnet后并未自动执行vbs登陆命令,还有就是vbs第二句会报下标越界的错误,此句去除可以正常执行,不知道此句的作用.
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.
|
|
2007-4-18 22:39 |
|