home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Buyer 1996 May
/
buyer-0596.iso
/
wincim
/
scripts.lib
/
SECLOG.SCR
< prev
next >
Wrap
Text File
|
1995-12-05
|
2KB
|
86 lines
!
! Copyright (c) 1995
! by CompuServe Incorporated, Columbus, Ohio
!
! The information in this software is subject to change without
! notice and should not be construed as a commitment by CompuServe.
!
! SECLOG:
! Handles secure login. Returns 0=Success,1=Cancel,2=Failure,3=No Carrier
!
!+V
! "3.8.1"
!-V
on cancel goto SecureCancel;
define %SecFailTemp = "";
wait
%mdm_Failure goto No_Carrier,
"." goto Host_Challenge_Received
until 200;
goto Timeout;
Host_Challenge_Received:
HostChallenge = %Scanned;
send "RB:^M^J" & %MicroChallenge & ".^M^J";
define %UserResponse = "";
encode HostChallenge, %MicroChallenge, %Password, %UserResponse;
if %UserResponse <> "" goto Send_Micro_Response;
send "^C";
define %SecFailTemp = "Incorrect User ID or password";
define %ErrorCode = 33;
exit 2;
Send_Micro_Response:
send "UR:^M^J" & %UserResponse & ".^M^J";
wait
"No." goto Response_Refused,
"HR:" goto Handle_Host_Response,
%mdm_Failure goto No_Carrier
until 200;
goto Timeout;
Response_Refused:
define %SecFailTemp = "Incorrect User ID or password";
define %ErrorCode = 34;
exit 2;
Handle_Host_Response:
wait
%mdm_Failure goto No_Carrier,
"." goto Host_Response_Received
until 200;
Timeout:
define %SecFailTemp = "Host not responding to login request";
define %ErrorCode = 32;
exit 2;
Host_Response_Received:
define %HostResponse = %Scanned;
define %Approved = 0;
approve HostChallenge, %MicroChallenge, %Password, %HostResponse, %Approved;
if %Approved <> 0 goto Host_Response_Approved;
define %SecFailTemp = "Secure response from host was invalid";
define %ErrorCode = 35;
exit 2;
No_Carrier:
exit 3;
Host_Response_Approved:
exit 0;
SecureCancel:
exit 1;