# $language = "VBScript"
# $interface = "1.0"

Const ForReading = 1
Const ForWriting = 2

Sub Main

  Dim fso, file, str
  Set fso = CreateObject("Scripting.FileSystemObject")

  Set file = fso.OpenTextFile("C:\SIU_ftp_home\SIUCFG\SIU_Trial.txt", ForReading, False)

  crt.Screen.Synchronous = True

  crt.Session.Connect "/TELNET 192.168.1.1 23"

  crt.Screen.WaitForString "ogin:"

  crt.Screen.Send "admin" & vbCr

  crt.Screen.WaitForString "assword:"

  crt.Screen.Send "hidden" & vbCr

  crt.Screen.WaitForString "OSmon>"

  Do While file.AtEndOfStream <> True

    str = file.Readline

    crt.Screen.Send str & Chr(13)
 
    crt.Screen.WaitForString "OSmon>"
  Loop

  crt.Screen.Synchronous = False

End Sub