有关adsl的“交互式登陆及运行脚本”的问题(也不知在这里发对不对)

由 budaodao 在 10-11-2002 14:23 发表:

有关adsl的“交互式登陆及运行脚本”的问题(也不知在这里发对不对)

大家请看,这里是我在c:\winnt\system32\ras\*.*的几个脚本,请问我如何用它编一个自动登陆的脚本呢?c:\winnt\system32\ras\它目录下有这几个文件。“cis.scp”“pad.inf”“pppmenu.scp”“slip.scp”“slipmenu.scp”“switch.inf”(按照以上的顺序我把它们内容贴出来大家研究一下)

---------------------------------------------------------------------

cis.scp #对应的文件名字(以下所有文件名都为蓝色字,代码用色字)

;

; This is a script file that demonstrates how

; to establish a PPP connection with Compuserve,

; which requires changing the port settings to

; log in.

;

; Main entry point to script

;

proc main

; Set the port settings so we can wait for

; non-gibberish text.

set port databits 7

set port parity even

transmit "^M"

waitfor "Host Name:"

transmit "CIS^M"

waitfor "User ID:"

transmit $USERID, raw

transmit "/go ppconnect^M"

waitfor "Password: "

transmit $PASSWORD, raw

transmit "^M"

waitfor "One moment please..."

; Set the port settings back to allow successful

; negotiation.

set port databits 8

set port parity none

endproc

---------------------------------------------------------------------

pad.inf

;-----------------------------------------------------------------------------

[Responses]

; This section is temporary.

;-----------------------------------------------------------------------------

[SprintNet, Standard]

DEFAULTOFF=

MAXCARRIERBPS=9600

MAXCONNECTBPS=9600

; The next two lines ignore logon banners

COMMAND=

OK=

   1<ignore>   
   2  
   3  
   4  
   5  
   6  
   7; The @ characters sets the SprintNet PAD for 8 databit communication.   
   8  
   9COMMAND=@   
  10  
  11NoResponse   
  12  
  13  
  14  
  15  
  16  
  17; The D character requests a 9600 speed.   
  18  
  19COMMAND=D<cr>   
  20  
  21; We dont care about the response so we ignore it (unless modem has hung up).   
  22  
  23ERROR_NO_CARRIER=<match>"NO CARRIER"   
  24  
  25OK=<ignore>   
  26  
  27  
  28  
  29  
  30  
  31; A carriage return to initialize the PAD read/write buffers   
  32  
  33COMMAND=<cr>   
  34  
  35ERROR_NO_CARRIER=<match>"NO CARRIER"   
  36  
  37OK=<ignore>   
  38  
  39  
  40  
  41  
  42  
  43; Set X.3 settings on the PAD which make it work well with RAS. Broken into   
  44  
  45; two parts since the line is too long.   
  46  
  47COMMAND=SET 1:0,2:0,3:0,4:1,5:0,6:1,7:0,8:0,9:0,10:0<cr>   
  48  
  49ERROR_NO_CARRIER=<match>"NO CARRIER"   
  50  
  51OK=<ignore>   
  52  
  53  
  54  
  55  
  56  
  57; Set the other half of X.3 parameters   
  58  
  59COMMAND=SET 12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,22:0<cr>   
  60  
  61ERROR_NO_CARRIER=<match>"NO CARRIER"   
  62  
  63OK=<ignore>   
  64  
  65  
  66  
  67  
  68  
  69; Finally try to call RAS X25 server   
  70  
  71COMMAND=C <x25address>*<userdata><cr>   
  72  
  73  
  74  
  75CONNECT=<match>" CONNECT"   
  76  
  77ERROR_NO_CARRIER=<match>"NO CARRIER"   
  78  
  79ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
  80  
  81ERROR_DIAGNOSTICS=<lf><cr><lf><diagnostics>   
  82  
  83  
  84  
  85  
  86  
  87; CONNECT response means that the connection completed fine.   
  88  
  89; ERROR_DIAGNOISTICS response means connection attempt failed - the X25   
  90  
  91; DIAGNOSTIC information will be extracted from the response and sent to the   
  92  
  93; user.   
  94  
  95; ERROR_NO_CARRIER means that the remote modem hung up.   
  96  
  97; ERROR resonses are for generic failures.   
  98  
  99  
 100  
 101;-----------------------------------------------------------------------------   
 102  
 103[SprintNet, Alternate]   
 104  
 105  
 106  
 107; Connections can be made more reliably in some SprintNet locations if   
 108  
 109; there are some delays near the beginning of the pad.inf entry. As a   
 110  
 111; general rule of thumb use this entry with older, slower (2400 bps)   
 112  
 113; locations.   
 114  
 115  
 116  
 117  
 118  
 119DEFAULTOFF=   
 120  
 121MAXCARRIERBPS=9600   
 122  
 123MAXCONNECTBPS=9600   
 124  
 125  
 126  
 127  
 128  
 129; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 130  
 131COMMAND=   
 132  
 133NoResponse   
 134  
 135  
 136  
 137  
 138  
 139; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 140  
 141COMMAND=   
 142  
 143NoResponse   
 144  
 145  
 146  
 147  
 148  
 149; The @ characters sets the SprintNet PAD for 8 databit communication.   
 150  
 151COMMAND=@   
 152  
 153NoResponse   
 154  
 155  
 156  
 157  
 158  
 159COMMAND=   
 160  
 161NoResponse   
 162  
 163  
 164  
 165  
 166  
 167; The D character requests a 9600 speed.   
 168  
 169COMMAND=D<cr>   
 170  
 171; We dont care about the response so we ignore it (unless modem has hung up).   
 172  
 173ERROR_NO_CARRIER=<match>"NO CARRIER"   
 174  
 175OK=<ignore>   
 176  
 177  
 178  
 179  
 180  
 181; A carriage return to initialize the PAD read/write buffers   
 182  
 183COMMAND=<cr>   
 184  
 185ERROR_NO_CARRIER=<match>"NO CARRIER"   
 186  
 187OK=<ignore>   
 188  
 189  
 190  
 191  
 192  
 193; Set X.3 settings on the PAD which make it work well with RAS. Broken into   
 194  
 195; two parts since the line is too long.   
 196  
 197COMMAND=SET 1:0,2:0,3:0,4:1,5:0,6:1,7:0,8:0,9:0,10:0<cr>   
 198  
 199ERROR_NO_CARRIER=<match>"NO CARRIER"   
 200  
 201OK=<ignore>   
 202  
 203  
 204  
 205  
 206  
 207; Set the other half of X.3 parameters   
 208  
 209COMMAND=SET 12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,22:0<cr>   
 210  
 211ERROR_NO_CARRIER=<match>"NO CARRIER"   
 212  
 213OK=<ignore>   
 214  
 215  
 216  
 217  
 218  
 219; Finally try to call RAS X25 server   
 220  
 221COMMAND=C <x25address>*<userdata><cr>   
 222  
 223  
 224  
 225CONNECT=<match>" CONNECT"   
 226  
 227ERROR_NO_CARRIER=<match>"NO CARRIER"   
 228  
 229ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
 230  
 231ERROR_DIAGNOSTICS=<lf><cr><lf><diagnostics>   
 232  
 233  
 234  
 235  
 236  
 237; CONNECT response means that the connection completed fine.   
 238  
 239; ERROR_DIAGNOISTICS response means connection attempt failed - the X25   
 240  
 241; DIAGNOSTIC information will be extracted from the response and sent to the   
 242  
 243; user.   
 244  
 245; ERROR_NO_CARRIER means that the remote modem hung up.   
 246  
 247; ERROR resonses are for generic failures.   
 248  
 249  
 250  
 251;-----------------------------------------------------------------------------   
 252  
 253[InfoNet]   
 254  
 255  
 256  
 257DEFAULTOFF=   
 258  
 259MAXCARRIERBPS=2400   
 260  
 261MAXCONNECTBPS=2400   
 262  
 263  
 264  
 265  
 266  
 267; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 268  
 269COMMAND=   
 270  
 271NoResponse   
 272  
 273  
 274  
 275  
 276  
 277; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 278  
 279COMMAND=   
 280  
 281NoResponse   
 282  
 283  
 284  
 285  
 286  
 287COMMAND=<cr>   
 288  
 289; We dont care about the response so we ignore it (unless modem has hung up).   
 290  
 291ERROR_NO_CARRIER=<match>"NO CARRIER"   
 292  
 293OK=<ignore>   
 294  
 295  
 296  
 297  
 298  
 299COMMAND=<cr>   
 300  
 301ERROR_NO_CARRIER=<match>"NO CARRIER"   
 302  
 303OK=<ignore>   
 304  
 305  
 306  
 307  
 308  
 309COMMAND=X<cr>   
 310  
 311ERROR_NO_CARRIER=<match>"NO CARRIER"   
 312  
 313OK=<ignore>   
 314  
 315  
 316  
 317  
 318  
 319; Set X.3 settings on the PAD which make it work well with RAS. Broken into   
 320  
 321; two parts since the line is too long.   
 322  
 323COMMAND=SET 1:126,2:1,3:0,4:1,5:0,6:1,7:0,8:0,9:0,10:0<cr>   
 324  
 325NoResponse   
 326  
 327  
 328  
 329COMMAND=   
 330  
 331NoResponse   
 332  
 333  
 334  
 335; Set the other half of X.3 parameters   
 336  
 337COMMAND=SET 12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0<cr>   
 338  
 339NoResponse   
 340  
 341  
 342  
 343  
 344  
 345COMMAND=   
 346  
 347NoResponse   
 348  
 349  
 350  
 351; Try to call RAS X25 server   
 352  
 353COMMAND=<x25address><cr><lf>   
 354  
 355  
 356  
 357OK=<match>"COM"   
 358  
 359ERROR_NO_CARRIER=<match>"NO CARRIER"   
 360  
 361ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
 362  
 363  
 364  
 365  
 366  
 367; CONNECT response means that the connection completed fine.   
 368  
 369; ERROR_DIAGNOISTICS response means connection attempt failed - the X25   
 370  
 371; DIAGNOSTIC information will be extracted from the response and sent   
 372  
 373; to the user.   
 374  
 375; ERROR_NO_CARRIER means that the remote modem hung up.   
 376  
 377; ERROR resonses are for generic failures.   
 378  
 379  
 380  
 381  
 382  
 383; Finally set no escape and no echo   
 384  
 385COMMAND=SET 1:0,2:0<cr>   
 386  
 387NoResponse   
 388  
 389  
 390  
 391;-----------------------------------------------------------------------------   
 392  
 393[InfoNet, Alternate]   
 394  
 395  
 396  
 397DEFAULTOFF=   
 398  
 399MAXCARRIERBPS=9600   
 400  
 401MAXCONNECTBPS=9600   
 402  
 403  
 404  
 405  
 406  
 407; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 408  
 409COMMAND=   
 410  
 411NoResponse   
 412  
 413  
 414  
 415  
 416  
 417; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 418  
 419COMMAND=   
 420  
 421NoResponse   
 422  
 423  
 424  
 425  
 426  
 427COMMAND=<cr>   
 428  
 429; We dont care about the response so we ignore it (unless modem has hung up).   
 430  
 431ERROR_NO_CARRIER=<match>"NO CARRIER"   
 432  
 433OK=<ignore>   
 434  
 435  
 436  
 437  
 438  
 439COMMAND=<cr>   
 440  
 441ERROR_NO_CARRIER=<match>"NO CARRIER"   
 442  
 443OK=<ignore>   
 444  
 445  
 446  
 447  
 448  
 449COMMAND=X<cr>   
 450  
 451ERROR_NO_CARRIER=<match>"NO CARRIER"   
 452  
 453OK=<ignore>   
 454  
 455  
 456  
 457  
 458  
 459; Set X.3 settings on the PAD which make it work well with RAS. Broken into   
 460  
 461; two parts since the line is too long.   
 462  
 463;COMMAND=SET 1:126,2:1,3:0,4:1,5:0,6:1,7:0,8:0,9:0,10:0<cr>   
 464  
 465COMMAND=SET 1:126,2:1,3:0,4:1,5:0,6:1,7:2,9:0,10:0<cr>   
 466  
 467ERROR_NO_CARRIER=<match>"NO CARRIER"   
 468  
 469ERROR=<match>"ERR"   
 470  
 471OK=<ignore>   
 472  
 473  
 474  
 475  
 476  
 477; Set the other half of X.3 parameters   
 478  
 479COMMAND=SET 12:0,13:0,14:0,15:0,16:127,17:24,18:18,19:0,20:0,21:0,22:0<cr>   
 480  
 481ERROR_NO_CARRIER=<match>"NO CARRIER"   
 482  
 483ERROR=<match>"ERR"   
 484  
 485OK=<ignore>   
 486  
 487  
 488  
 489; Try to call RAS X25 server   
 490  
 491COMMAND=<x25address><cr><lf>   
 492  
 493OK=<ignore>   
 494  
 495  
 496  
 497OK=<match>"COM"   
 498  
 499ERROR_NO_CARRIER=<match>"NO CARRIER"   
 500  
 501ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
 502  
 503ERROR=<match>"ERR"   
 504  
 505  
 506  
 507  
 508  
 509; CONNECT response means that the connection completed fine.   
 510  
 511; ERROR_DIAGNOISTICS response means connection attempt failed - the X25   
 512  
 513; DIAGNOSTIC information will be extracted from the response and sent   
 514  
 515; to the user.   
 516  
 517; ERROR_NO_CARRIER means that the remote modem hung up.   
 518  
 519; ERROR resonses are for generic failures.   
 520  
 521  
 522  
 523  
 524  
 525; Finally set no escape and no echo   
 526  
 527COMMAND=SET 1:0,2:0<cr>   
 528  
 529NoEcho   
 530  
 531ERROR=<match>"ERR"   
 532  
 533CONNECT=<ignore>   
 534  
 535  
 536  
 537[Transpac]   
 538  
 539  
 540  
 541DEFAULTOFF=   
 542  
 543MAXCARRIERBPS=2400   
 544  
 545MAXCONNECTBPS=2400   
 546  
 547  
 548  
 549  
 550  
 551; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 552  
 553COMMAND=   
 554  
 555NoResponse   
 556  
 557  
 558  
 559; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 560  
 561COMMAND=   
 562  
 563NoResponse   
 564  
 565  
 566  
 567; We dont care about the response so we ignore it (unless modem has hung up).   
 568  
 569ERROR_NO_CARRIER=<match>"NO CARRIER"   
 570  
 571OK=<match>"TRANSPAC"   
 572  
 573  
 574  
 575; Set X.3 settings on the PAD which make it work well with RAS. Broken into   
 576  
 577; two parts since the line is too long.   
 578  
 579COMMAND=SET 1:1,2:1,3:0,4:1,5:0,6:1,7:0,9:0,10:0<cr>   
 580  
 581ERROR_NO_CARRIER=<match>"NO CARRIER"   
 582  
 583ERROR=<match>"ERR"   
 584  
 585OK=<ignore>   
 586  
 587  
 588  
 589  
 590  
 591; Set the other half of X.3 parameters   
 592  
 593COMMAND=SET 12:0,13:0,14:0,15:0,16:127,17:24,18:18,19:0,20:0,21:0,22:0<cr>   
 594  
 595ERROR_NO_CARRIER=<match>"NO CARRIER"   
 596  
 597ERROR=<match>"ERR"   
 598  
 599OK=<ignore>   
 600  
 601  
 602  
 603; Try to call RAS X25 server   
 604  
 605COMMAND=<x25address><cr><lf>   
 606  
 607OK=<ignore>   
 608  
 609  
 610  
 611OK=<match>"COM"   
 612  
 613ERROR_NO_CARRIER=<match>"NO CARRIER"   
 614  
 615ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
 616  
 617  
 618  
 619  
 620  
 621; CONNECT response means that the connection completed fine.   
 622  
 623; ERROR_DIAGNOISTICS response means connection attempt failed - the X25   
 624  
 625; DIAGNOSTIC information will be extracted from the response and sent   
 626  
 627; to the user.   
 628  
 629; ERROR_NO_CARRIER means that the remote modem hung up.   
 630  
 631; ERROR resonses are for generic failures.   
 632  
 633  
 634  
 635  
 636  
 637; Finally set no escape and no echo   
 638  
 639COMMAND=SET 1:0,2:0<cr>   
 640  
 641NoEcho   
 642  
 643CONNECT=<ignore>   
 644  
 645  
 646  
 647  
 648  
 649;-----------------------------------------------------------------------------   
 650  
 651[Eicon X.PAD]   
 652  
 653  
 654  
 655DEVICETYPE=pad   
 656  
 657DEFAULTOFF=   
 658  
 659  
 660  
 661MAXCARRIERBPS=1200   
 662  
 663MAXCONNECTBPS=1200   
 664  
 665  
 666  
 667;   
 668  
 669; INIT section.   
 670  
 671;   
 672  
 673COMMAND_INIT=PAR 2<cr>   
 674  
 675NoEcho   
 676  
 677OK=par 2:<ignore>   
 678  
 679ERROR_DIAGNOSTICS=CLR <diagnostics>   
 680  
 681ERROR=ERR<ignore>   
 682  
 683  
 684  
 685;   
 686  
 687; LISTEN section.   
 688  
 689;   
 690  
 691COMMAND_LISTEN=   
 692  
 693NoEcho   
 694  
 695CONNECT=<match>"COM"   
 696  
 697ERROR_DIAGNOSTICS=CLR <diagnostics>   
 698  
 699ERROR=ERR<ignore>   
 700  
 701  
 702  
 703;   
 704  
 705; CALL section.   
 706  
 707;   
 708  
 709COMMAND_DIAL=<x25address><cr><lf>   
 710  
 711NoEcho   
 712  
 713CONNECT=<match>"COM"   
 714  
 715ERROR_DIAGNOSTICS=CLR CONF <cr><lf>CLR<diagnostics>   
 716  
 717ERROR_DIAGNOSTICS=CLR <diagnostics>   
 718  
 719ERROR=ERR<ignore>   
 720  
 721  
 722  
 723;-----------------------------------------------------------------------------   
 724  
 725[Compuserve]   
 726  
 727  
 728  
 729; Disclaimer:   
 730  
 731; This script has been included for customer convenience, but has NOT been   
 732  
 733; fully verified to work under all circumstances. Microsoft makes NO guarantees   
 734  
 735; as to the performance of this script. Please contact Microsoft   
 736  
 737; PSS NT support if you have problems or questions.   
 738  
 739  
 740  
 741DEFAULTOFF=   
 742  
 743MAXCARRIERBPS=9600   
 744  
 745MAXCONNECTBPS=9600   
 746  
 747  
 748  
 749COMMAND=   
 750  
 751NoResponse   
 752  
 753  
 754  
 755COMMAND=<cr>   
 756  
 757OK=<ignore>   
 758  
 759  
 760  
 761COMMAND=+<cr>   
 762  
 763OK=<match>"Host Name:"   
 764  
 765  
 766  
 767COMMAND=<x25address><cr>   
 768  
 769CONNECT=<match>"Connected"   
 770  
 771ERROR_NO_CARRIER=<match>"NO CARRIER"   
 772  
 773ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
 774  
 775ERROR_DIAGNOSTICS=<lf><cr><lf><diagnostics>   
 776  
 777  
 778  
 779  
 780  
 781;-----------------------------------------------------------------------------------   
 782  
 783[SITA Group Network]   
 784  
 785  
 786  
 787; Disclaimer:   
 788  
 789; This script has been included for customer convenience, but has NOT been   
 790  
 791; fully verified to work under all circumstances. Microsoft makes NO guarantees   
 792  
 793; as to the performance of this script. Please contact Microsoft   
 794  
 795; PSS NT support if you have problems or questions.   
 796  
 797; PLEASE SEE COMMENTS BELOW REGARDING USAGE OF THE "User Data:"   
 798  
 799; and "Facilities:" FIELDS IN RAS WHEN USING THIS SITA SCRIPT.   
 800  
 801  
 802  
 803DEFAULTOFF=   
 804  
 805MAXCARRIERBPS=9600   
 806  
 807MAXCONNECTBPS=9600   
 808  
 809  
 810  
 811COMMAND=...<cr>   
 812  
 813OK=<match>"SITA NETWORK:"   
 814  
 815  
 816  
 817; Enter your NUI number in the Remote Access program's X.25 Settings "User Data:" field.   
 818  
 819COMMAND=<userdata><cr>   
 820  
 821OK=<ignore>   
 822  
 823  
 824  
 825; Enter your x.25 password in the Remote Access program's X.25 Settings "Facilities:" field.   
 826  
 827COMMAND=<facilities><cr>   
 828  
 829OK=<match>"active"   
 830  
 831ERROR_DIAGNOSTICS=<cr><lf><cr><lf><lf><diagnostics>   
 832  
 833ERROR_DIAGNOSTICS=<lf><cr><lf><diagnostics>   
 834  
 835  
 836  
 837COMMAND=PROF 6<cr>   
 838  
 839NoResponse   
 840  
 841  
 842  
 843COMMAND=   
 844  
 845NoResponse   
 846  
 847  
 848  
 849COMMAND=SET 2:1<cr>   
 850  
 851OK=<ignore>   
 852  
 853  
 854  
 855COMMAND=   
 856  
 857NoResponse   
 858  
 859  
 860  
 861COMMAND=SET 4:1,6:1,16:0,17:0,18:0,19:0,21:0<cr>   
 862  
 863OK=<ignore>   
 864  
 865  
 866  
 867COMMAND=   
 868  
 869NoResponse   
 870  
 871  
 872  
 873COMMAND=SET 118:0,119:0,120:0<cr>   
 874  
 875OK=<ignore>   
 876  
 877  
 878  
 879COMMAND=PAR?<cr>   
 880  
 881OK=<ignore>   
 882  
 883  
 884  
 885COMMAND=SET 2:0<cr>   
 886  
 887NoResponse   
 888  
 889  
 890  
 891COMMAND=   
 892  
 893NoResponse   
 894  
 895  
 896  
 897COMMAND=<x25address><cr>   
 898  
 899CONNECT=<match>"connected"   
 900  
 901;CONNECT=<ignore>   
 902  
 903ERROR_DIAGNOSTICS=<cr><lf><cr><lf><lf><diagnostics>   
 904  
 905ERROR_DIAGNOSTICS=<lf><cr><lf><diagnostics>   
 906  
 907  
 908  
 909;-----------------------------------------------------------------------------------   
 910  
 911[Alascom/Tymnet/MCI]   
 912  
 913  
 914  
 915; Disclaimer:   
 916  
 917; This script has been included for customer convenience, but has NOT been   
 918  
 919; fully verified to work under all circumstances. Microsoft makes NO guarantees   
 920  
 921; as to the performance of this script. Please contact Microsoft   
 922  
 923; PSS NT support if you have problems or questions.   
 924  
 925; NOTE: Whether your X.25 account is set up for a single x.121 identifier or a   
 926  
 927; username/password combination, they both are entered in the Remote Access program's   
 928  
 929; "X.25 Settings" dialog box in the "X.121 Address:" field.   
 930  
 931; A username and password combination is entered simply by separating them with a   
 932  
 933; SEMICOLON, e.g.: John;mypass   
 934  
 935; where "John" is the username and "mypass" is the password.   
 936  
 937  
 938  
 939DEFAULTOFF=   
 940  
 941MAXCARRIERBPS=9600   
 942  
 943MAXCONNECTBPS=9600   
 944  
 945  
 946  
 947; The "o" changes the terminal identifer so that the x.25 network responses are   
 948  
 949; readable and don't appear as garbage. No carriage return is required after it.   
 950  
 951COMMAND=o   
 952  
 953OK=<match>"log in:"   
 954  
 955ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
 956  
 957ERROR_DIAGNOSTICS=<lf><cr><lf><diagnostics>   
 958  
 959  
 960  
 961; Note: The "<h08>" represents a Ctrl-H or Backspace character which turns the   
 962  
 963; echo facility in the x.25 network off which interferes with RAS operation.   
 964  
 965COMMAND=<h08><x25address><cr>   
 966  
 967CONNECT=<match>"connected"   
 968  
 969ERROR_NO_CARRIER=<match>"NO CARRIER"   
 970  
 971ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
 972  
 973ERROR_DIAGNOSTICS=<lf><cr><lf><diagnostics>   
 974  
 975  
 976  
 977[Telematics]   
 978  
 979  
 980  
 981DEFAULTOFF=   
 982  
 983MAXCARRIERBPS=19200   
 984  
 985MAXCONNECTBPS=19200   
 986  
 987  
 988  
 989  
 990  
 991; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 992  
 993COMMAND=<cr>   
 994  
 995; The next line will give a delay of 2 secs - allowing the PAD to initialize   
 996  
 997COMMAND=<cr>   
 998  
 999  
1000  
1001;The next line will initiate AUTOBAUD/AUTOPARITY with the   
1002  
1003;Telematics PAD   
1004  
1005COMMAND=..<cr>   
1006  
1007ERROR_NO_CARRIER=<match>"NO CARRIER"   
1008  
1009OK=<match>"*"   
1010  
1011  
1012  
1013  
1014  
1015; Finally try to call RAS X25 server   
1016  
1017COMMAND=<x25address><cr>   
1018  
1019  
1020  
1021CONNECT=<match>"com"   
1022  
1023  
1024  
1025  
1026  
1027[InfoNet X25]   
1028  
1029  
1030  
1031DEFAULTOFF=   
1032  
1033MAXCARRIERBPS=2400   
1034  
1035MAXCONNECTBPS=2400   
1036  
1037  
1038  
1039  
1040  
1041; The next line will give a delay of 2 secs - allowing the PAD to initialize   
1042  
1043COMMAND=   
1044  
1045NoResponse   
1046  
1047  
1048  
1049  
1050  
1051; The next line will give a delay of 2 secs - allowing the PAD to initialize   
1052  
1053COMMAND=   
1054  
1055NoResponse   
1056  
1057  
1058  
1059  
1060  
1061COMMAND=<cr>   
1062  
1063; We dont care about the response so we ignore it (unless modem has hung up).   
1064  
1065ERROR_NO_CARRIER=<match>"NO CARRIER"   
1066  
1067OK=<ignore>   
1068  
1069  
1070  
1071  
1072  
1073COMMAND=<cr>   
1074  
1075ERROR_NO_CARRIER=<match>"NO CARRIER"   
1076  
1077OK=<ignore>   
1078  
1079  
1080  
1081  
1082  
1083COMMAND=SET 2:1<cr>   
1084  
1085NoResponse   
1086  
1087  
1088  
1089COMMAND=X<cr>   
1090  
1091ERROR_NO_CARRIER=<match>"NO CARRIER"   
1092  
1093OK=<ignore>   
1094  
1095  
1096  
1097; Try to call RAS X25 server   
1098  
1099COMMAND=<x25address><cr><lf>   
1100  
1101  
1102  
1103OK=<match>"COM"   
1104  
1105ERROR_NO_CARRIER=<match>"NO CARRIER"   
1106  
1107ERROR_DIAGNOSTICS=<cr><lf><diagnostics>   
1108  
1109  
1110  
1111  
1112  
1113; CONNECT response means that the connection completed fine.   
1114  
1115; ERROR_DIAGNOISTICS response means connection attempt failed - the X25   
1116  
1117; DIAGNOSTIC information will be extracted from the response and sent   
1118  
1119; to the user.   
1120  
1121; ERROR_NO_CARRIER means that the remote modem hung up.   
1122  
1123; ERROR resonses are for generic failures.   
1124  
1125  
1126  
1127\----------------------------------------------------------------------   
1128  
1129  
1130  
1131pppmenu.scp    
1132  
1133  
1134  
1135;   
1136  
1137; This is a script file that demonstrates how   
1138  
1139; to establish a PPP connection with a host   
1140  
1141; that uses a menu system.   
1142  
1143;   
1144  
1145; A script file must have a 'main' procedure.   
1146  
1147; All script execution starts with this 'main'   
1148  
1149; procedure.   
1150  
1151;   
1152  
1153  
1154  
1155  
1156  
1157; Main entry point to script   
1158  
1159;   
1160  
1161proc main   
1162  
1163  
1164  
1165; Change these variables to customize for your   
1166  
1167; specific Internet service provider   
1168  
1169  
1170  
1171integer nTries = 3   
1172  
1173  
1174  
1175; This is the login prompt and timeout values   
1176  
1177  
1178  
1179string szLogin = "username:"   
1180  
1181integer nLoginTimeout = 3   
1182  
1183  
1184  
1185; This is the password prompt and timeout values   
1186  
1187  
1188  
1189string szPW = "password:"   
1190  
1191integer nPWTimeout = 3   
1192  
1193  
1194  
1195; This is the prompt once your password is verified   
1196  
1197  
1198  
1199string szPrompt = "annex:"   
1200  
1201  
1202  
1203; This is the command to send to establish the   
1204  
1205; connection. This script assumes you only need   
1206  
1207; to issue one command to continue. Feel free   
1208  
1209; to add more commands if your provider requires   
1210  
1211; it.   
1212  
1213  
1214  
1215;   
1216  
1217; This provider has a menu list like this:   
1218  
1219;   
1220  
1221; 1 : Our special GUI   
1222  
1223; 2 : Establish slip connection   
1224  
1225; 3 : Establish PPP connection   
1226  
1227; 4 : Establish shell access   
1228  
1229; 5 : Download our software   
1230  
1231; 6 : Exit   
1232  
1233;   
1234  
1235; annex:   
1236  
1237;   
1238  
1239  
1240  
1241string szConnect = "3^M"   
1242  
1243  
1244  
1245; Set this to FALSE if you don't want to get an IP   
1246  
1247; address   
1248  
1249  
1250  
1251boolean bUseSlip = FALSE   
1252  
1253  
1254  
1255  
1256  
1257; -----------------------------------------------------   
1258  
1259  
1260  
1261  
1262  
1263; Delay for 2 seconds first to make sure the   
1264  
1265; host doesn't get confused when we send the   
1266  
1267; two carriage-returns.   
1268  
1269  
1270  
1271delay 2   
1272  
1273transmit "^M^M"   
1274  
1275  
1276  
1277; Attempt to login at most 'nTries' times   
1278  
1279  
1280  
1281while 0 &lt; nTries do   
1282  
1283  
1284  
1285; Wait for the login prompt before entering   
1286  
1287; the user ID, timeout after x seconds   
1288  
1289  
1290  
1291waitfor szLogin then DoLogin   
1292  
1293until nLoginTimeout   
1294  
1295  
1296  
1297TryAgain:   
1298  
1299transmit "^M" ; ping   
1300  
1301nTries = nTries - 1   
1302  
1303  
1304  
1305endwhile   
1306  
1307  
1308  
1309goto BailOut   
1310  
1311  
1312  
1313DoLogin:   
1314  
1315; Enter user ID   
1316  
1317  
1318  
1319transmit $USERID, raw   
1320  
1321transmit "^M"   
1322  
1323  
1324  
1325; Wait for the password prompt   
1326  
1327  
1328  
1329waitfor szPW until nPWTimeout   
1330  
1331if FALSE == $SUCCESS then   
1332  
1333goto TryAgain   
1334  
1335endif   
1336  
1337  
1338  
1339; Send the password   
1340  
1341  
1342  
1343transmit $PASSWORD, raw   
1344  
1345transmit "^M"   
1346  
1347  
1348  
1349; Wait for the prompt   
1350  
1351  
1352  
1353waitfor szPrompt   
1354  
1355  
1356  
1357transmit szConnect   
1358  
1359  
1360  
1361if bUseSlip then   
1362  
1363; An alternative to the following line is   
1364  
1365;   
1366  
1367; waitfor "Your address is "   
1368  
1369; set ipaddr getip   
1370  
1371;   
1372  
1373; if we don't know the order of the IP addresses.   
1374  
1375  
1376  
1377set ipaddr getip 2   
1378  
1379endif   
1380  
1381goto Done   
1382  
1383  
1384  
1385BailOut:   
1386  
1387; Something isn't responding. Halt the script   
1388  
1389; and let the user handle it manually.   
1390  
1391  
1392  
1393set screen keyboard on   
1394  
1395halt   
1396  
1397  
1398  
1399Done:   
1400  
1401  
1402  
1403endproc   
1404  
1405  
1406  
1407  
1408  
1409\---------------------------------------------------------------------   
1410  
1411  
1412  
1413slip.scp    
1414  
1415;   
1416  
1417; This is a script file that demonstrates how   
1418  
1419; to establish a slip connection with a host.   
1420  
1421;   
1422  
1423; A script file must have a 'main' procedure.   
1424  
1425; All script execution starts with this 'main'   
1426  
1427; procedure.   
1428  
1429;   
1430  
1431  
1432  
1433  
1434  
1435; Main entry point to script   
1436  
1437;   
1438  
1439proc main   
1440  
1441  
1442  
1443; Change these variables to customize for your   
1444  
1445; specific Internet service provider.   
1446  
1447  
1448  
1449integer nTries = 3   
1450  
1451  
1452  
1453; This is the login prompt and timeout values   
1454  
1455  
1456  
1457string szLogin = "Userid:"   
1458  
1459integer nLoginTimeout = 3   
1460  
1461  
1462  
1463; This is the password prompt and timeout values   
1464  
1465  
1466  
1467string szPW = "Password?"   
1468  
1469integer nPWTimeout = 3   
1470  
1471  
1472  
1473; This is the prompt once your password is verified   
1474  
1475  
1476  
1477string szPrompt = "InternetLR/E&gt;"   
1478  
1479  
1480  
1481; This is the command to send to establish the   
1482  
1483; connection. This script assumes you only need   
1484  
1485; to issue one command to continue. Feel free   
1486  
1487; to add more commands if your provider requires   
1488  
1489; it.   
1490  
1491  
1492  
1493string szConnect = "slip^M"   
1494  
1495  
1496  
1497; Set this to FALSE if you don't want to get an IP   
1498  
1499; address   
1500  
1501  
1502  
1503boolean bUseSlip = TRUE   
1504  
1505  
1506  
1507  
1508  
1509; Delay for 2 seconds first to make sure the   
1510  
1511; host doesn't get confused when we send the   
1512  
1513; two carriage-returns.   
1514  
1515  
1516  
1517delay 2   
1518  
1519transmit "^M^M"   
1520  
1521  
1522  
1523; Attempt to login at most 'nTries' times   
1524  
1525  
1526  
1527while 0 &lt; nTries do   
1528  
1529  
1530  
1531; Wait for the login prompt before entering   
1532  
1533; the user ID, timeout after x seconds   
1534  
1535  
1536  
1537waitfor szLogin then DoLogin   
1538  
1539until nLoginTimeout   
1540  
1541  
1542  
1543TryAgain:   
1544  
1545transmit "^M" ; ping   
1546  
1547nTries = nTries - 1   
1548  
1549  
1550  
1551endwhile   
1552  
1553  
1554  
1555goto BailOut   
1556  
1557  
1558  
1559DoLogin:   
1560  
1561; Enter user ID   
1562  
1563  
1564  
1565transmit $USERID, raw   
1566  
1567transmit "^M"   
1568  
1569  
1570  
1571; Wait for the password prompt   
1572  
1573  
1574  
1575waitfor szPW until nPWTimeout   
1576  
1577if FALSE == $SUCCESS then   
1578  
1579goto TryAgain   
1580  
1581endif   
1582  
1583  
1584  
1585; Send the password   
1586  
1587  
1588  
1589transmit $PASSWORD, raw   
1590  
1591transmit "^M"   
1592  
1593  
1594  
1595; Wait for the prompt   
1596  
1597  
1598  
1599waitfor szPrompt   
1600  
1601  
1602  
1603transmit szConnect   
1604  
1605  
1606  
1607if bUseSlip then   
1608  
1609; An alternative to the following line is   
1610  
1611;   
1612  
1613; waitfor "Your address is "   
1614  
1615; set ipaddr getip   
1616  
1617;   
1618  
1619; if we don't know the order of the IP addresses.   
1620  
1621  
1622  
1623set ipaddr getip 2   
1624  
1625endif   
1626  
1627  
1628  
1629goto Done   
1630  
1631  
1632  
1633BailOut:   
1634  
1635; Something isn't responding. Halt the script   
1636  
1637; and let the user handle it manually.   
1638  
1639  
1640  
1641set screen keyboard on   
1642  
1643halt   
1644  
1645  
1646  
1647Done:   
1648  
1649  
1650  
1651endproc   
1652  
1653  
1654  
1655\----------------------------------------------------------------------   
1656  
1657slipmenu.scp    
1658  
1659;   
1660  
1661; This is a script file that demonstrates how   
1662  
1663; to establish a SLIP connection with a host   
1664  
1665; that uses a menu system.   
1666  
1667;   
1668  
1669; A script file must have a 'main' procedure.   
1670  
1671; All script execution starts with this 'main'   
1672  
1673; procedure.   
1674  
1675;   
1676  
1677  
1678  
1679  
1680  
1681; Main entry point to script   
1682  
1683;   
1684  
1685proc main   
1686  
1687  
1688  
1689; Change these variables to customize for your   
1690  
1691; specific Internet service provider   
1692  
1693  
1694  
1695integer nTries = 3   
1696  
1697  
1698  
1699; This is the login prompt and timeout values   
1700  
1701  
1702  
1703string szLogin = "username:"   
1704  
1705integer nLoginTimeout = 3   
1706  
1707  
1708  
1709; This is the password prompt and timeout values   
1710  
1711  
1712  
1713string szPW = "password:"   
1714  
1715integer nPWTimeout = 3   
1716  
1717  
1718  
1719; This is the prompt once your password is verified   
1720  
1721  
1722  
1723string szPrompt = "annex:"   
1724  
1725  
1726  
1727; This is the command to send to establish the   
1728  
1729; connection. This script assumes you only need   
1730  
1731; to issue one command to continue. Feel free   
1732  
1733; to add more commands if your provider requires   
1734  
1735; it.   
1736  
1737  
1738  
1739;   
1740  
1741; This provider has a menu list like this:   
1742  
1743;   
1744  
1745; 1 : Our special GUI   
1746  
1747; 2 : Establish slip connection   
1748  
1749; 3 : Establish PPP connection   
1750  
1751; 4 : Establish shell access   
1752  
1753; 5 : Download our software   
1754  
1755; 6 : Exit   
1756  
1757;   
1758  
1759; annex:   
1760  
1761;   
1762  
1763  
1764  
1765string szConnect = "2^M"   
1766  
1767  
1768  
1769; Set this to FALSE if you don't want to get an IP   
1770  
1771; address   
1772  
1773  
1774  
1775boolean bUseSlip = TRUE   
1776  
1777  
1778  
1779  
1780  
1781; -----------------------------------------------------   
1782  
1783  
1784  
1785  
1786  
1787; Delay for 2 seconds first to make sure the   
1788  
1789; host doesn't get confused when we send the&lt;br</diagnostics></lf></cr></match></match></lf></cr></x25address></ignore></match></cr></cr></ignore></match></cr></ignore></match></cr></match></cr></x25address></match></match></cr></cr></cr></diagnostics></lf></cr></lf></diagnostics></lf></cr></match></match></cr></x25address></h08></h08></diagnostics></lf></cr></lf></diagnostics></lf></cr></match></diagnostics></lf></cr></lf></diagnostics></lf></lf></cr></lf></cr></ignore></match></cr></x25address></cr></ignore></cr></ignore></cr></ignore></cr></ignore></cr></cr></diagnostics></lf></cr></lf></diagnostics></lf></lf></cr></lf></cr></match></cr></facilities></ignore></cr></userdata></match></cr></diagnostics></lf></cr></lf></diagnostics></lf></cr></match></match></cr></x25address></match></cr></ignore></cr></ignore></diagnostics></diagnostics></lf></cr></match></lf></cr></x25address></ignore></diagnostics></match></ignore></diagnostics></ignore></cr></ignore></cr></diagnostics></lf></cr></match></match></ignore></lf></cr></x25address></ignore></match></match></cr></ignore></match></match></cr></match></match></ignore></match></cr></match></diagnostics></lf></cr></match></match></ignore></lf></cr></x25address></ignore></match></match></cr></ignore></match></match></cr></cr></ignore></match></cr></ignore></match></cr></ignore></match></cr></cr></diagnostics></lf></cr></match></match></lf></cr></x25address></cr></cr></ignore></match></cr></ignore></match></cr></ignore></match></cr></diagnostics></lf></cr></lf></diagnostics></lf></cr></match></match></cr></userdata></x25address></ignore></match></cr></ignore></match></cr></ignore></match></cr></ignore></match></cr></diagnostics></lf></cr></lf></diagnostics></lf></cr></match></match></cr></userdata></x25address></ignore></match></cr></ignore></match></cr></ignore></match></cr></ignore></match></cr></ignore>
Published At
Categories with 服务器类
Tagged with
comments powered by Disqus