home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
db3secur.zip
/
SECURE.PRG
< prev
next >
Wrap
Text File
|
1987-04-01
|
6KB
|
193 lines
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Program....: SECURE.PRG *
* Author.....: Juan L. Romero *
* Date.......: April 1, 1987. *
* Version....: dBASE III,dBASE III+,FOXPLUS *
* Notes......: Security programm for dBASE III files. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SET TALK OFF
SET STATUS OFF
SET BELL OFF
SET ECHO OFF
SET SCOREBOARD OFF
PUBLIC iid
RESTORE FROM secfiles ADDITIVE
SET PROCEDURE TO secure.prg && Call Screen Layout Proc.
DO screen
try=1
DO WHILE try <=3
SET COLOR TO GR+,W+
@ 10,58 SAY DATE()
@ 13,58 SAY TIME()
SET ESCAPE OFF
STORE SPACE(8) TO iid
SET COLOR TO G+,GR+
@ 10,28 GET iid PICTURE '!!!!!!!!'
READ
STORE TRIM(iid) TO iid
IF iid <= " "
? CHR(7)
SET COLOR TO W+
@ 4,4
@ 4,4 SAY 'SECURITY ACCESS ABORTED'
QUIT
ENDIF idd <= " "
SET COLOR TO W+,W+
@ 11,27 SAY ' '
SET CONSOLE OFF
ACCEPT SPACE(27) TO ipass
@ 13,27 SAY ' '
ACCEPT SPACE(27) TO inpass
SET CONSOLE ON
iid=UPPER(iid)
ipass=UPPER(ipass)
inpass=UPPER(inpass)
USE &active
SET EXACT ON
LOCATE FOR id=iid .AND. password=ipass
IF EOF()
?? CHR(7)
SET COLOR TO W+
STORE "SECURITY VIOLATION NO. " TO mess
STORE mess+STR(try,1) TO mess
@ 4,4
@ 4,4 SAY mess
STORE "TRY #"+STR(try,1) TO istatus
USE &write
APPEND BLANK
REPLACE id WITH iid,status WITH istatus
t1=TIME()
REPLACE date WITH DATE(),in_time WITH TIME()
USE
try=try+1
LOOP try < 4
ELSE
IF LEN(inpass) <> 0
SET COLOR TO W+
STORE ' ' TO ans
@ 4,4
@ 4,4 SAY 'PLEASE CONFIRM PASSWORD UPDATE (Y/N) ';
GET ans PICTURE '!'
READ
IF ans='Y'
@ 4,4
@ 4,4 SAY 'PASSWORD UPDATED'
USE &active
REPLACE password WITH inpass
USE
ENDIF ans='Y'
ENDIF LEN(inpass) <> 0
STORE "ACCESS GRANTED" TO grant
SET COLOR TO W+
@ 4,4
@ 4,4 SAY grant
USE &write
APPEND BLANK
REPLACE id WITH iid
STORE TIME() TO itime
REPLACE date WITH DATE(),in_time WITH TIME()
STORE "IN" TO istatus
REPLACE status WITH istatus
SET SAFETY OFF
SAVE TO securent ALL LIKE iid,itime
SET SAFETY ON
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* IMPORTANT Access is allowed,enter file to chain below.*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* DO [filename]
ENDIF EOF()
ENDDO try <=3 && Third Access Violation has been achieved.
SET COLOR TO W+
@ 4,4
@ 4,4 SAY 'YOU HAVE VIOLATED SECURITY ACCESS'
QUIT && Access to dBASE III has been denied - returning to DOS.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Program.: SECSCRN.PRG *
* Author..: Juan L. Romero *
* Date....: March 31, 1987. *
* Notes...: Screen Layout for SECURE dBASE III Security Program. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PROCEDURE screen
SET COLOR TO W+/ , /
CLEAR
SET COLOR TO GR+/
@ 4,1 SAY ">"
@ 5,1 SAY ">"
@ 6,1 SAY "....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...."
SET COLOR TO BG+/
@ 7,1 SAY "│││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││"
@ 8,1 SAY "│││││││││"
@ 8,71 SAY "│││││││││"
@ 9,1 SAY "│││││││││"
@ 9,71 SAY "│││││││││"
@ 10,1 SAY "│││││││││"
SET COLOR TO W+/
@ 10,15 SAY "KEY"
@ 10,50 SAY "DATE"
SET COLOR TO BG+/
@ 10,71 SAY "│││││││││"
@ 11,1 SAY "│││││││││"
SET COLOR TO W+/
@ 11,15 SAY "PASSWORD"
SET COLOR TO BG+/
@ 11,71 SAY "│││││││││"
@ 12,1 SAY "│││││││││"
@ 12,71 SAY "│││││││││"
@ 13,1 SAY "│││││││││"
SET COLOR TO W+/
@ 13,15 SAY "NEW PASSWORD"
@ 13,50 SAY "TIME"
SET COLOR TO BG+/
@ 13,71 SAY "│││││││││"
@ 14,1 SAY "│││││││││"
@ 14,71 SAY "│││││││││"
@ 15,1 SAY "│││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││"
@ 16,1 SAY "││││││││││ ││││││ │││ ││││ ││ │││ │││││ │││││"
@ 17,1 SAY "││││││││"
@ 17,12 SAY "│││││││││ ││││││││ ││││││││ ││ │││ │││ │││ │││││││││││"
@ 18,1 SAY "│││││││"
@ 18,11 SAY "│││││││││ ││││││││ ││││││││ ││ │││ │││ │││ ││││││││││││"
@ 19,1 SAY "│││││││ ││││ │││ ││││││││ ││ │││"
@ 19,61 SAY "│││ ││││││││"
@ 20,1 SAY "│││││││││││ │││ ││││││││ ││││││││ ││ │││ ││ ││││ ││││││││││││││"
@ 21,1 SAY "││││││││││ │││ │││││││││ ││││││││ ││ │││ │││ ││││ ││││││││││││││││"
@ 22,1 SAY "││││ │││ ││││ │││ ││││ │││ │││ │││"
SET COLOR TO W+/
@ 22,72 SAY "1.0"
SET COLOR TO BG+/
@ 22,75 SAY "│││││"
@ 23,1 SAY "│││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││││"
STORE "SECURE by J. L. Romero, 1987." TO logo
SET COLOR TO GR+
@ 24,1 SAY " SECURE by J.L. Romero, 1987. "
SET COLOR TO W+/ , /W
RETURN
* END-OF-PROCEDURE-screen
* END-OF-PROGRAM