home *** CD-ROM | disk | FTP | other *** search
- ; (93-08-20)
- ;
- ; This idea of the PIN is originaly from USA and Scott Carpenter, modified
- ; by Peter Laur / Murphys, Ulf Svanlund / Oasen and Rikard Elofsson / Kemlab.
- ;
- ; The program does 3 separate checks to see if a user has been qualified to
- ; be asked for the PIN code. In this setup the following is default:
- ;
- ; --------------------------------------------------------------------------
- ; Ask for PIN every 50'th call
- ; *or*
- ; When Security Violations exceed 10 in integers
- ; *or*
- ; When Password Failed exceeds 5 in integers
- ; --------------------------------------------------------------------------
- ; (Note: All 3 functions are totaly independent of each other.)
- ;
- ; You can change the defaults below to suit your needs of security. If a user
- ; fails to answer he's PIN, I punish him down to seclevel 8 and refuses him
- ; access to our system until he has been verified by us on phone. To store
- ; the Security Violations & Password Failures we use the Note (PSA) Line 5.
- ; You *must* have the Notes, Statistic & Verification (PSA) installed to use
- ; this PPE...! (Only PCBoard v15.0)
- ;
- ; The menus & PPE in this package must be in c:\pcb\ppe\pin or be changed.
- ; At my system I have Security specific logon files like level 103 and at
- ; the top of the @-menu just add: !C:\PCB\PPE\PIN\PIN.PPE or whatever path
- ; you use after compilation.
- ;
- ; If you make updates or mods, please upload them to Salt Air so we all can
- ; learn and use the new versions...
- ;
- ;
- ; Best wishes: Peter Laur / Murphys PCBoard BBS, Sweden
- ; (2:204/481@fidonet)
- ;
- ; (Compiled with PPLC by Ulf Svanlund at Oasen PCBoard BBS)
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ SET ALL VARIABLES ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- string pin
- string pin2
- string test
- string test2
- string anytext
- string secerr_str
- string pwderr_str
- integer i
- integer pos
- integer logons
- integer secerr
- integer pwderr
- integer number
- integer maxtries
- integer sec_limit
- integer pwd_limit
- integer log_limit
- integer old_secerr
- integer old_pwderr
-
- let maxtries=2 ; Max 3 answer attempts at the PIN questions
- anytext = " 1234567890"
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ SET SECURITY, PASSWORD AND LOGON LIMITS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- sec_limit=10 ; Every 10'th Security Violation starts PIN
- pwd_limit=5 ; Every 5'th Password Failure starts PIN
- log_limit=50 ; Every 50'th Logon from the user starts PIN
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ GET USERINFO ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- getuser
- secerr=u_stat(10)
- pwderr=u_stat(14)
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ READ OLD VALUES FROM NOTES LINE 5 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- pos = instr(U_NOTES(4), "|")
- if (pos = 0) then
- secerr_str = string(secerr)
- pwderr_str = string(pwderr)
- u_notes(4) = secerr_str + "|" + pwderr_str
- putuser
- endif
- if (strip(u_ver," ")="") goto newuser
- old_secerr = mid(U_NOTES(4), 1, pos - 1)
- old_pwderr = mid(U_NOTES(4), pos + 1, 10)
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ COMPARE OLD/NEW VALUES AND TAKE ACTION ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- if (secerr - old_secerr => sec_limit) goto verify
- if (pwderr - old_pwderr => pwd_limit) goto verify
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ CHECK THE USER REGULARLY ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- let logons=u_logons() / log_limit
- if (u_logons() - logons * log_limit = 0) goto verify
- goto end
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ NEWUSER ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :newuser
- dispfile "c:\pcb\ppe\pin\newuser",graph
- newline
- inputstr "Please enter your Personal Identification Number PIN: ",pin,@X0E,4,anytext,echodots
- if (pin="1234") goto nice_try
- if (pin="4321") goto nice_try
- if (pin="1000") goto nice_try
- if (pin="1111") goto nice_try
- if (pin="2000") goto nice_try
- if (pin="2222") goto nice_try
- if (pin="3000") goto nice_try
- if (pin="3333") goto nice_try
- if (pin="4000") goto nice_try
- if (pin="4444") goto nice_try
- if (pin="5000") goto nice_try
- if (pin="5555") goto nice_try
- if (pin="6000") goto nice_try
- if (pin="6666") goto nice_try
- if (pin="7000") goto nice_try
- if (pin="7777") goto nice_try
- if (pin="8000") goto nice_try
- if (pin="8888") goto nice_try
- if (pin="9000") goto nice_try
- if (pin="9999") goto nice_try
- if (pin="0000") goto nice_try
- if (len(pin) <> 4) goto nice_try
- goto check
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ CHECK ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :check
- newline
- newline
- inputstr "Please re-enter your PIN again to compare: ",pin2,@X0E,4,anytext,echodots
- println "@CLS@@X0E"
- if (pin=pin2) then
- goto finish
- else
- goto wrong
- endif
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ NICE TRY! ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :nice_try
- newline
- dispfile "c:\pcb\ppe\pin\nicetry",graph
- goto newuser
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ WRONG ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :wrong
- newline
- println "@CLS@@X00@X0CThe PIN entered do not match!@XFF"
- goto newuser
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ FINISHED ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :finish
- dispfile "c:\pcb\pin\ppe\pinwarn",graph
- let u_ver=pin
- putuser
- goto end
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ VERIFY ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :verify
- newline
- inputstr "Please enter your Personal Identification Number PIN: ",test,@X0E,4,anytext,echodots
-
- if (test=u_ver) then
-
- if (secerr - old_secerr => sec_limit) then
- secerr_str = string(secerr)
- else
- secerr_str = string(old_secerr)
- endif
-
- if (pwderr - old_pwderr => pwd_limit) then
- pwderr_str = string(pwderr)
- else
- pwderr_str = string(old_pwderr)
- endif
-
- u_notes(4) = secerr_str + "|" + pwderr_str
- putuser
- goto end
- else
- log "Invalid PIN entered ("+test+")",false
- goto screwed_up
- endif
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ SCREWED UP ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :screwed_up
- newline
- println "@X00@X0CThe PIN you have entered is incorrect!@XFF"
- newline
- inputstr "Please re-enter your PIN: ",test2,@X0E,4,anytext,echodots
- if ((test2 <> u_ver) & (maxtries > 1)) then
- log "Invalid PIN entered ("+test2+")",false
- dec maxtries
- goto screwed_up
- else if (test2=u_ver)
- goto end
- endif
-
- message 0,"SYSOP",u_name(),"Invalid PIN","R",0,false,false,"c:\pcb\ppe\pin\sysmsg"
- log "Invalid PIN entered ("+test2+")",false
- log "4 Invalid PIN attempts - Automatic Disconnect",false
- dispfile "c:\pcb\ppe\pin\hangup",graph
- let u_sec = 8
- putuser
- delay 200
- hangup
- end
-
- ;──────────────────────────────────────────────────────────────────────────────
- ;▒▒▒▒▒ END ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ;──────────────────────────────────────────────────────────────────────────────
- :end
- end
-