Sample Telnet Line Mode Network Virtual Terminal message generation deck
Below is a sample Telnet Line Mode Network Virtual Terminal message
generation deck:
Telnet Line Mode Network Virtual Terminal Simulation Message Generation Deck
*----------------------------------------------------------------------*
* The Message Generation deck for the Telnet Line Mode NVT. *
* *
* This deck calls WAITSCRN to wait for the application logon screen *
* and issues a Write To Operator message acknowledging that the device *
* has successfully connected. A USERID is selected from the id user *
* table defined below to attempt to logon. The device then calls *
* WAITPWD to wait for "Password" and then send the password from the *
* password user table below. After receiving the "$" prompt, the *
* device logs off. *
* *
*----------------------------------------------------------------------*
HOST1 MSGTXT
CALL NAME=WAITSCRN
WTO ($DEVID$ ESTABLISHED TELNET SESSION, LOGGING ON)
SET DC1=NSEQ
SET NSEQ=+1
TEXT ($UTBL,IDS,DC1$'0D25')
ENTER
CALL NAME=WAITPWD
WTO (GOT PASSWORD)
TEXT ($UTBL,PWS,DC1$'0D25')
ENTER
CALL NAME=WAIT$
TEXT (LOGOUT)
WTO (GOT $$ PROMPT)
ENDTXT
*----------------------------------------------------------------------*
WAITSCRN MSGTXT
*----------------------------------------------------------------------*
* * <== The TEXT operand below must *
* * be changed to reflect the *
* * appropriate logon screen. *
*----------------------------------------------------------------------*
0 IF WHEN=IN,LOC=B+0,TEXT=(login:),SCAN=YES,THEN=CONT
WAIT
ENDTXT
*-----------------------------------------------------------------------
WAITPWD MSGTXT
*----------------------------------------------------------------------*
* * <== The TEXT operand below must *
* * be changed to reflect the *
* * appropriate password message *
*----------------------------------------------------------------------*
0 IF LOC=B+0,TEXT=(Password),SCAN=YES,THEN=CONT
WAIT
ENDTXT
*-----------------------------------------------------------------------
WAIT$ MSGTXT
*-----------------------------------------------------------------------
* * <== The TEXT operand below must *
* * be changed to reflect the *
* * appropriate prompt message *
*-----------------------------------------------------------------------
0 IF LOC=B+0,TEXT=($$),SCAN=YES,THEN=CONT
WAIT
CLEAR
ENDTXT
*-----------------------------------------------------------------------
* * <== The USERIDs and passwords
* * below must be changed to
* * valid names
*-----------------------------------------------------------------------
IDS MSGUTBL (USER1),(USER2),(USER3)
PWS MSGUTBL (PASSWD1),(PASSWD2),(PASSWD3)