I need to know how to write a script in either VBS or Jscript that will Telnet to an IPgive login name when promptedgive password when promptedthen execute other commandsI'm planning to run this script with secure CRT. I've looked around and haven't been able to find much information. Any help is appreciated.
2/28/2008 2:14:47 PM
I know this isn't what you asked, but expect was written for exactly this sort of thing. It's available for tcl, perl, most real scripting languages
2/28/2008 4:42:30 PM
If you don't know VB or JS it'll be a tough task. In VB you'll have to create a socket and connect using an implementation of TELNET that you will have to create. There's no "telnet" API that will do it for you. In fact, I don't remember what all the restrictions are on VB Script.You don't have to worry about typing or initializing variables. I don't think it supports derived types (UDTs) or class objects, which will make your task really annoying. I don't know whether it supports controls (like the sockets control which would make your job a lot easier).I'd write the code in a programming language and just call it from a script.
2/28/2008 5:21:47 PM
i'm not sure that javascript or vbs is the way you want to go with this. maybe a java applet?
2/28/2008 5:37:07 PM
^^for most telnet servers, a raw TCP/IP socket will be adequatehowever, as soon as you make that assumption, you'll find one that will not talk to you unless you send the control sequences defining your capabilities and acknowledging theirs [Edited on February 28, 2008 at 5:56 PM. Reason : ^]
2/28/2008 5:55:46 PM
http://www.vandyke.com/support/crt/scripting_examples.htmldef use jscript or vbscript. i've actually done securecrt scripting before, let me know if you have any problemsmost of what has been said in this thread is irrelevant. they are thinking about connecting to telnet within a jscript or vbs script itself (with sockets and tcp/ip packets, etc). that's not what you do with securecrt. securecrt has an API to the UI, so you can let securecrt do what it does (connect to telnet sessions) and you just tell it what to type, essentially[Edited on February 28, 2008 at 6:41 PM. Reason : .]
2/28/2008 6:34:13 PM
Yeah, the secure CRT script is no problem. Basically, what I really want to do is automate a lot of the setup I have to do on telephone lines. Basically I have to log into a switch, add certain features to certain lines based on which test case I'm doing. What I really want is some sort of application to prompt me for the DN and then let me select the features. After that, I'd like the program to generate the script to go do it. This may not be the best plan to do this. I'd appreciate suggestions or help. Below is an outline for the larger application we'd like to develop. The plan is to turn this over to an intern this summer and fall. If any of you are interested please let me know. The interface has been developed in Visual J#. It is mainly an exercise in Access database retrieval and storage. Level 1- Is the base application: Estimated Savings: Fewer EmailsUsers must login Provides a means to Broadcast Events and other information to all usersAllows for the addition of new projectsProjects may be customProjects may be selected from ITT DatabaseLevel 2- represents the normal processes that are required in order to set up/close out LEC or Interop Events: Estimated savings per project 5 HrStart new ProjectAssign GWCReserve DNsProvision DNsSelect Test PlanEdit Test Plan: customize with the following itemsAdd Customer NameAdd DN provisioningAdd GWC Provisioning Edit Status SheetAdd Customer NameAdd DN assignmentsSetup 3rd Party Gateway- Must still be done manuallyUn-assign GWCUn-assign DNsPDF Final Test ReportLevel 3- represents tasks that will be automated during the Testing Process: Estimated savings per project- 3-10 HoursAssign and Change DN features based on a particular test caseChange Profiles on GWC based on particular test casesSchedule changes on the GWCs so that other events are not impacted significantlyUpdate Status sheets Add notes to Test ReportAutomatically mail status reportsTrack CRs Level 4- represents the Time Tracking level. Tracks time for Levels 1-3: Estimated saves are 1-2 hr/weekProject Readiness will be updated automatically based on the current process in Level 2Hours will be deducted from those assigned in Level 2 based on the SC Code which is currently selected by the userTime lines will be created to track time of CRs and other eventsA Live view of project hours will be presented to the userSharing of projects and Hours will be allowedUser A can choose to assign 5 hours of his project to User BLevel 5- automates the re-assignment of projects from one user to anotherSharing of projects will be allowedUser A can “pick up” User B’s projectAll current information user A has entered will be SavedLevels 2, 3 and 4 will be presented to the new userUser A can “share” User B’s projectAllows for users to work on the project simultaneously[Edited on February 29, 2008 at 3:46 PM. Reason : additional info]
2/29/2008 3:40:37 PM
2/29/2008 4:50:35 PM