Wednesday, November 02, 2011

TELNET USING VB

To telnet your server and to execute whatever your commands on server , you can just make a VB script as follows.



    set oShell = CreateObject("WScript.Shell")
    oShell.run"cmd.exe"
    WScript.Sleep 500
    oShell.SendKeys"telnet 10.52.2.1"
    oShell.SendKeys("{Enter}")
    WScript.Sleep 1000
   'Give your password in the next line
    oShell.SendKeys"password"
    oShell.SendKeys("{Enter}")
    WScript.Sleep 500
  
Save it as somename.vbs . double click it  ...:-) done