home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
telecomm
/
storm100
/
genie.bas
< prev
next >
Wrap
BASIC Source File
|
1993-11-03
|
2KB
|
89 lines
'GEnie logon script
'The first time you run it, prompts for account and password
Loop:
FAST ON
acct$ = SET$("STORM","GEnie","Account")
temp$ = SET$("STORM","GEnie","Password")
pwd$ = ""
'A Basic oddity, FOR loop will always be executed once!
'So check length first
'Decrypt it
IF LEN(temp$) > 0 THEN
FOR x = 1 TO LEN(temp$)
pwd$ = pwd$ + CHR$( ASC( MID$(temp$,x,1)) XOR 255)
NEXT x
ENDIF
'
IF LEN(acct$) = 0 OR LEN(pwd$) = 0 THEN
GOSUB Setup
IF LEN(acct$) = 0 OR LEN(pwd$) = 0 THEN
GOTO Loop
ELSE PRINT "GEnie setup Complete"
PRINT "Thank you"
PRINT "========="
END
ENDIF
ENDIF
'Now do actual logon
FAST OFF
TERM OFF
Tries = 1
TOPW 1
'Uncomment lines below if you have problems with HHH getting
'recognized and need a brief delay. e.g. high-speed modems.
'SEND "H";
'SEND "H";
'SEND "H";
'default is single send. Comment this out if you use the 3 lines above.
SEND "HHH";
DUPLEX FULL :'So password doesn't appear on screen
WAIT 20,"U#="
IF WAIT(0) = 0 THEN
Failure:
TOPW 3
PRINT "Logon Failed"; CHR$(7)
TERM ON
END
ENDIF
Password:
IF Tries >= 3 THEN Failure
SEND acct$ + "," + pwd$
WAIT 5,"REENTER"
IF WAIT(0) = 1 THEN Tries = Tries + 1:GOTO Password:'Got glitched
DUPLEX HALF
TERM ON
END
'
'Prompt user for GEnie account and password
'And store information in STORM.INI file, after confirming it.
Setup:
TOPW 3:CLS :PRINT "Welcome to Storm's GEnie Setup Script"
PRINT "==========================================":PRINT
IF LEN(acct$) > 0 THEN GetPassword
RepeatAcct:
PRINT
PRINT "Please enter your account number";
INPUT acct$
IF LEN(acct$) = 0 THEN RepeatAcct
'Since acct was absent, assume password was as well
GetPassword:
PRINT
PRINT "Please enter your password";
INPUT pwd$
IF LEN(pwd$) = 0 THEN RepeatPassword
temp$ = ""
'Simple hack to encrypt password into graphics/foreign characters
FOR x = 1 TO LEN(pwd$)
temp$ = temp$ + CHR$( ASC( MID$(pwd$,x,1)) XOR 255)
NEXT x
PRINT "Your Account is ";acct$
PRINT "Your Password is ";pwd$
PRINT "Is that correct (Y/N)"
INPUT confirm$
confirm$ = UCASE$( LEFT$(confirm$,1))
IF confirm$ <> "Y" THEN RepeatAcct
SET "STORM","GEnie","Password",temp$
SET "STORM","GEnie","Account",acct$
RETURN