home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / zcm_scrp.zip / CALLBACK.T < prev    next >
Text File  |  1989-11-21  |  1KB  |  45 lines

  1.     echo "CallBack"
  2. :: Demonstration callback script.  This replaces CHALLENG.T to perform 
  3. :: seurity controlled callback access control.  More comments at end.
  4.     pat; set remote CHALLENG.T
  5. x300:    ena -S; echo "Callback Demonstration"; purgek
  6.     on !c set remote LOGFAIL; fail
  7.     goto foo
  8. foop:    echo "Please no special characters"
  9. foo:    accept remote "Name (first AND last) Please: "
  10.     if "%remote<3" echo "Name is too short"; goto foo
  11.     if Cremote goto foop
  12.     if "Jremote,01234567890][}{\\|=+-_)(*&^%$#@!~`;:'<>/?" goto foop
  13.     mput "Is '%remote' Correct (y/n) ?"
  14.     if !y goto foo
  15.     open %lib/callback
  16. loop:    set s3 ""
  17.     grab    s0
  18.     grab    s1
  19.     grab    s2
  20.     obey    "if is0,%remote set s3 OK"
  21.     lput "s0=%s0 s1=%s1 s2=%s2 s3=%s3\r\n"
  22.     if t&&!%s3 goto loop
  23.     if !t set s1 "\r"
  24.     closetx
  25.     demand %s1
  26.     if !c fail
  27.     on
  28.     echo "Please set Auto Answer mode on your Modem"
  29.     del /tmp/AAAA.xx
  30.     kill; purgek; pv0
  31.     >/tmp/AAAA.xx
  32.     echof " del /tmp/AAAA.xx"
  33.     echof " call %s2"
  34.     >
  35.     bye
  36.     echo "Should be disconnected now"
  37.     fail
  38. :: This expects to read a file "callback" consisting of triplets of lines.
  39. :: The first of each triplet is match to the name the caller gives when
  40. :: calling.  The second is the password that person must give.  The third
  41. :: if the directory entry name to be executed after the caller has given
  42. :: the correct name and passowrd.  Note the script is written so the caller
  43. :: does not get an obvious indication whether he has hit upon a valid
  44. :: user name.
  45.