
/*-----------------------------------------------------------------------*/
/*                       R I N G 0,    I S S U E   # 1                   */
/*-----------------------------------------------------------------------*/

                     dial-up .

                                        by Alex D. Sergeev aka Rook/UINC


                                  -    "  "
                                  -   ?
                                  -  .
                                  - ,  .
                                  -  .
                                    "", .  

:
[1.] .
[2.] .
[3.]  .
[4.] ,    .
[5.] DUN.
[6.] .
[7.] .

[1.] .
        "   
  dial-up  ?"         ,  BBS, 
       ,    
x.25.     ,  ,
    Dial-Up  Scripting  Command  Language  For Dial-Up
Networking  Scripting  Support.       
   SPb Code|NET.
       dial-up ?   
  /   ,  
            .      
    ,    IP  
        Internet ,    
               BBS,          
  ,         
    ,       ( 
    Spb  Code|NET).       ,
       .   
             
   "Dial-up scripting".
          BASIC,    
  .

[2.] .
      .  
                 
  - "_",         
"_".          
,          .
     :

	integer		 
	string		 
	boolean		 


    :
[] [ ]=[  ]
:

integer attempt = 3
;   attempt  integer   3
string szLogin = "username:"
;   szLogin  string   username:

       string        
(),  :

	^char		    ascii 
	<cr>		 
	<lf>		 
	\\		 
	\^		 ^


:

transmit "^M"
;    
transmit "Rook^M"
;  ,      
; .
transmit ""
waitfor ""
;    

      ,     
          dial-up    
.    :

	$userid		 
	$password	
	$success	  
	$failure	  


          ,      
   .
:

transmit $USERID
transmit $PASSWORD
;        .

:        
.

[3.]  .
    -        
,           .
                 .  
     (
    ):

	 
	-		 
	!		
	 
	*,/		, 	Integer
	+,-		, 	Integer, String, Boolean
	<,>,>=,<=			Integer
	==,!=				Integer, String
	and		 ""		Boolean
	or		 ""	Boolean

:

transmit "Hello from "+$USERID
delay 64/(32-(3+4*3))

              real      
.


[4.] ,    .
         -   ,  
        ,     
,      .    
dial-up     :
;
      ,    ,   ,    
   .
:
;  
integer a
;  

AND
 ""
:

boolean a
boolean b

if !a and b then
endif


BOOLEAN
       
:

boolean name [ =value ]


DATABITS
. set

DELAY nSeconds
     ,   nSeconds.
:

integer seconds=5

delay 10
delay Seconds+2


DO
c. while

ENDIF
. if

ENDPROC
   

ENDWHILE
. whille
EVEN
. set port parity

FALSE
  ,  ,     
  

GETIP [value]
  ,     IP    .
      IP  ,       
,      IP   
value.
:

szAddress = getip
;    IP    szAddress
szAddress = getip 2
;    IP    szAddress


GOTO label
       label   
   .
:

IF $SUCCESS then
goto _out
endif
Transmit "bbs^M"
Goto end
_out:
transmit "err^M"
end:


:           ,
    goto,      .

HALT
  ,     . 
     .

IF condition THEN
 
ENDIF
    then  endif,  condition=true;
:

If $USERID == "Rook" then
transmit "CODENET.MEMBER.SENIOR.rook^M"
endif

INTEGER
       .
 :

integer name [ =value ]


IPADDR
. set

KEYBOARD
. set

MARK
. set port parity

MATCHCASE
. waitfor

NONE
. set port parity

ODD
. set port parity

OFF
. set screen keyboard

ON
. set screen keyboard

OR
 ""

PARITY
. set

PORT
. set

PROC name
     .     
main,        .   
  :
proc main
 

 
endproc

RAW
. transmit

SCREEN
. set

SET
SET PORT DATABITS 5|6|7|8
        ,     
.          ,    
 .
:
set port databits 7

SET PORT PARITY none|odd|even|mark|space
         
 .     ,   
 .
:
set port parity even

SET PORT STOPBITS 1|2
    -      .      
 ,     .
:
set port stopbits 2

SET PORT SCREEN KEYBOARD on|off
        .
:
set screen keyboard on

SET IPADDR _string
 IP    .     
 IP .
:
_ipaddress="11.83.23.1"
set ipadd _ipaddress
set ipaddr "11.83.23.1"
set ipaddr getip

SPACE
. set port parity

STOPBITS
. set

STRING
       .
 :

string name [ =value ]


THEN
. if

TRANSMIT _string [,raw]
    _string     .  
    escape     ,  
  raw.  raw ,  
$USERID    $PASSWORD        ,
           .   
   abc^Mddea    abc^M.
:

transmit "SLIP^M"
transmit $USERID, raw


TRUE
  ,  ,     
  .

UNTIL
. waitfor

WAITFOR string [,matchcase][then label {,string1[,matchcase]then
label1}][until time]
            ,  
    string,  string1      .    sting  
    ,          matchcase.  
             then
label,                label.    until
      ,  
   ,      
.
:

Waitfor "Login:"
;  ,      Login:
waitfor
"Login:" then _login
"Password:" then _password
until 15



WHILE condition DO
 
ENDWHILE
  ,   condition   .
:

integer attempt=3
integer n=0
while n transmit "^M"
waitfor "Login: " until 15
if $SUCCESS then
goto _login
endif
n=n+1
endwhile


[5.] DUN
                
         ,  
        .   ,   
          ,    
drag&drp           ,   
     ( ):
; aanet.ru.dun
[Entry]
Entry_Name=AANET.RU
Import_Name=AANET 3
Multilink=no

[Phone]
Dial_As_Is=no
Phone_Number=XXXXXXX
Area_Code=
Country_Code=7
Country_ID=7

[Device]
Type=modem
Name=LT Win Modem
Settings_Size=108
Settings=1C000100130101100100180060100001010102001C02020002C22102122200
2000400A500100180200311340050000600600060034000000300000003000000030000
00000000000000000003C000000000000000000000001000000D3010000000000000000
0000000000000C

[Server]
Type=PPP
SW_Compress=no
PW_Encrypt=no
Network_Logon=no
SW_Encrypt=no
Negotiate_NetBEUI=no
Negotiate_IPX/SPX=no
Negotiate_TCP/IP=yes

[TCP/IP]
Specify_IP_Address=no
Specify_Server_Address=yes
DNS_address=XXX.XXX.XXX.XX
DNS_Alt_address=XXX.XXX.XXX.XX
WINS_address=0.0.0.0
WINS_Alt_address=0.0.0.0
IP_Header_Compress=yes
Gateway_On_Remote=yes

[Scripting]
Name=Pppmenu.scp

[Script_File]
0=;
1=; This is a script file that demonstrates how
2=; to establish a PPP connection with a host
3=; that uses a menu system.
4=;
5=; A script file must have a 'main' procedure.
6=; All script execution starts with this 'main'
7=; procedure.
8=;
9=
10=
11=; Main entry point to script
12=;
13=proc main
14=
15=; Change these variables to customize for your
16=; specific Internet service provider
17=
18=integer nTries = 3
19=
20=; This is the login prompt and timeout values
21=
22=string szLogin = "username:"
23=integer nLoginTimeout = 3
24=
25=; This is the password prompt and timeout values
26=
27=string szPW = "password:"
28=integer nPWTimeout = 3
29=
30=; This is the prompt once your password is verified
31=
32=string szPrompt = "annex:"
33=
34=; This is the command to send to establish the
35=; connection.  This script assumes you only need
36=; to issue one command to continue.  Feel free
37=; to add more commands if your provider requires
38=; it.
39=
40=;
41=; This provider has a menu list like this:
42=;
43=;   1  : Our special GUI
44=;   2  : Establish slip connection
45=;   3  : Establish PPP connection
46=;   4  : Establish shell access
47=;   5  : Download our software
48=;   6  : Exit
49=;
50=;   annex:
51=;
52=
53=string szConnect = "3^M"
54=
55=; Set this to FALSE if you don't want to get an IP
56=; address
57=
58=boolean bUseSlip = FALSE
59=
60=
61=; -----------------------------------------------------
62=
63=
64=; Delay for 2 seconds first to make sure the
65=; host doesn't get confused when we send the
66=; two carriage-returns.
67=
68=delay 2
69=transmit "^M^M"
70=
71=; Attempt to login at most 'nTries' times
72=
73=while 0 < nTries do
74=
75=; Wait for the login prompt before entering
76=; the user ID, timeout after x seconds
77=
78=waitfor szLogin then DoLogin
79=until nLoginTimeout
80=
81=TryAgain:
82=transmit "^M"  ; ping
83=nTries = nTries - 1
84=
85=endwhile
86=
87=goto BailOut
88=
89=DoLogin:
90=; Enter user ID
91=
92=transmit $USERID, raw
93=transmit "^M"
94=
95=; Wait for the password prompt
96=
97=waitfor szPW until nPWTimeout
98=if FALSE == $SUCCESS then
99=goto TryAgain
100=endif
101=
102=; Send the password
103=
104=transmit $PASSWORD, raw
105=transmit "^M"
106=
107=; Wait for the prompt
108=
109=waitfor szPrompt
110=
111=transmit szConnect
112=
113=if bUseSlip then
114=; An alternative to the following line is
115=;
116=;     waitfor "Your address is "
117=;     set ipaddr getip
118=;
119=; if we don't know the order of the IP addresses.
120=
121=set ipaddr getip 2
122=endif
123=goto Done
124=
125=BailOut:
126=; Something isn't responding.  Halt the script
127=; and let the user handle it manually.
128=
129=set screen keyboard on
130=halt
131=
132=Done:
133=
134=endproc
135=

       ,      DUN,     [Script_File],
 Dial-up        . 
  [Scripting]       ,   
,          
 .

[6.] .
 Windows 9x/Me     -    DUN
  3  :
1.      .
2.       ,          
 (   ).
3.   ,      :

				[ ]
		http://uinc.ru:8101/articles/27/remote.gif

    -     ,     ,
    - rook@uinc.ru

[7.] .
 Omire,       

