home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 005 / callb_28.zip / CALLBLOC.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-08-25  |  8KB  |  424 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Boolean  BOOLEAN001
  20.     Integer  INTEGER001
  21.     Integer  INTEGER002
  22.     Integer  INTEGER003
  23.     Integer  INTEGER004
  24.     Integer  INTEGER005
  25.     Integer  INTEGER006
  26.     Integer  INTEGER007
  27.     Integer  INTEGER008
  28.     Integer  INTEGER009
  29.     Integer  INTEGER010
  30.     Integer  INTEGER011
  31.     Integer  INTEGER012
  32.     String   STRING001
  33.     String   STRING002
  34.     String   STRING003
  35.     String   STRING004
  36.     String   STRING005
  37.     String   STRING006
  38.     String   STRING007
  39.     String   STRING008
  40.     String   STRING009
  41.     String   STRING010
  42.     String   STRING011
  43.     String   STRING012
  44.     String   STRING013
  45.     String   STRING014
  46.     String   STRING015
  47.     String   STRING016
  48.     String   STRING017
  49.     String   STRING018
  50.     String   STRING019
  51.     String   STRING020
  52.     String   STRING021
  53.     String   STRING022
  54.     String   STRING023
  55.     String   STRING024
  56.     String   STRING025
  57.     String   STRING026
  58.     String   STRING027
  59.     String   STRING028
  60.  
  61. ;------------------------------------------------------------------------------
  62.  
  63.     STRING003 = PPEPath() + "BAD-MSG"
  64.     STRING005 = PPEPath() + PPEName() + ".LOG"
  65.     STRING006 = PPEPath() + PPEName() + ".CFG"
  66.     STRING012 = PPEPath() + "BAD"
  67.     STRING019 = PPEPath() + "OVERRIDE.NUM"
  68.     STRING021 = PPEPath() + "BADCALL.NUM"
  69.     STRING024 = PPEPath() + "BLOK"
  70.     STRING025 = PPEPath() + "PRIV-MSG"
  71.     STRING026 = PPEPath() + "RECL"
  72.     STRING002 = "ANON"
  73.     BOOLEAN001 = 0
  74.     STRING004 = ""
  75.     STRING010 = ""
  76.     INTEGER003 = 10
  77.     INTEGER004 = 1
  78.     STRING014 = "------------------- [ Valid User Logon ] -------------------"
  79.     STRING013 = "============================================================"
  80.     STRING015 = "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
  81.     STRING018 = "O"
  82.     STRING023 = "P"
  83.     STRING028 = "************************************************************"
  84.     PrintLn "@X0A...Searching Phone Records...Please Standby!...@X07"
  85.     PrintLn "@X0B....CALLBLOC v2.8 (c) 1993/94  by Al Segura....@X07"
  86.     DbgLevel 1
  87.     If (Exist(STRING006)) Then
  88.         FOpen 1, STRING006, 0, 0
  89.         Newline
  90.         SPrintLn "...Loading CID Records...(CALLBLOC.PPE)."
  91.         Newline
  92.         FGet 1, INTEGER005
  93.         FGet 1, INTEGER001
  94.         FGet 1, INTEGER012
  95.         FGet 1, INTEGER002
  96.         FGet 1, STRING016
  97.         FGet 1, STRING011
  98.         FGet 1, STRING001
  99.         FGet 1, INTEGER006
  100.         FGet 1, INTEGER003
  101.         FGet 1, INTEGER007
  102.         FClose 1
  103.     Else
  104.         Log "CALLBLOC.PPE using built-in defaults!", 1
  105.         INTEGER005 = 1
  106.         INTEGER001 = 0
  107.         INTEGER012 = 0
  108.         INTEGER002 = 1
  109.         STRING016 = "1"
  110.         STRING011 = "@X0EWhat is your FIRST name"
  111.         STRING001 = "SYSOP"
  112.         INTEGER006 = 0
  113.         INTEGER003 = 10
  114.         INTEGER007 = 0
  115.     Endif
  116.     If (OnLocal()) Then
  117.         Newline
  118.         PrintLn "@X0F...CALLBLOC.PPE is bypassed in LOCAL mode!@X07"
  119.         Log "LOCAL mode detected, CALLBLOC.PPE bypassed!", 1
  120.         Newline
  121.     Else
  122.         Select Case (STRING016)
  123.             Case "1"
  124.                 STRING009 = "NMBR = "
  125.             Case "2"
  126.                 STRING009 = "NUMBER: "
  127.             Case Else
  128.                 STRING009 = STRING016
  129.         End Select
  130.         STRING010 = CallId()
  131.         If (STRING010 == "") Then
  132.             Log "No CALLERID info available!..(CALLBLOC.PPE)", 1
  133.             If (INTEGER006) Goto LABEL006
  134.             STRING022 = "BLANK!"
  135.             Goto LABEL008
  136.         Endif
  137.         INTEGER010 = InStr(STRING010, STRING009)
  138.         INTEGER008 = Len(STRING009)
  139.         If (INTEGER008 == 0) Then
  140.             Log "Your CID Key is BLANK! (CALLBLOC.PPE).", 1
  141.             Log "Verify proper CID Key for your modem!", 1
  142.             Goto LABEL008
  143.         ElseIf (INTEGER010 == 0) Then
  144.             Log "Could not find CID key: " + STRING009 + " (CALLBLOC.PPE).", 1
  145.             Log "Verify proper CID Key for your modem!", 1
  146.             Goto LABEL008
  147.         Endif
  148.         STRING022 = Upper(Trim(Mid(STRING010, INTEGER010 + INTEGER008, INTEGER003), " "))
  149.         If (Left(STRING022, 1) == STRING018) Then
  150.             Gosub LABEL010
  151.         Else
  152.             If (Len(STRING022) <> INTEGER003) Then
  153.                 Log "CID Number not = " + String(INTEGER003) + " digits. (CALLBLOC.PPE).", 1
  154.                 Goto LABEL008
  155.             Endif
  156.             For INTEGER010 = 1 To INTEGER003
  157.                 If (InStr(Mask_Num(), Mid(STRING022, INTEGER010, 1)) == 0) Then
  158.                     Log "Garbage found in CID number! (CALLBLOC.PPE).", 1
  159.                     Goto LABEL008
  160.                 Endif
  161.             Next
  162.             If ((Left(STRING022, 1) == STRING023) || InStr(Upper(STRING022), STRING002)) Then
  163.                 Message 0, STRING001, "CALLBLOC.PPE", "Blocked Number User", "R", 0, 0, 0, STRING025
  164.                 STRING014 = "<<<<<<<<<<<<<<<<<< [ BLOCKED User Logon ] >>>>>>>>>>>>>>>>>>"
  165.                 Gosub LABEL010
  166.                 If (Exist(STRING024)) Then
  167.                     DispFile STRING024, 4 + 2 + 1
  168.                 Else
  169.                     Log "File BLOK is missing! (CALLBLOC.PPE).", 1
  170.                 Endif
  171.                 If (INTEGER012) Goto LABEL011
  172.             Else
  173.                 If (Exist(STRING021)) Then
  174.                     FOpen 2, STRING021, 0, 0
  175.                     Newlines 2
  176.                     FGet 2, STRING027
  177.                     Gosub LABEL007
  178.                     :LABEL001
  179.                     If (Ferr(2)) Goto LABEL005
  180.                     FGet 2, STRING027
  181.                     If ((Len(STRING027) <> INTEGER003) && (STRING027 <> "")) Then
  182.                         Log "Number in BADCALL.NUM is not correct digits! (CALLBLOC).", 1
  183.                         Log "# read is: " + STRING027 + " (CALLBLOC).", 1
  184.                     Endif
  185.                     If (InStr(STRING027, STRING022)) Then
  186.                         Goto LABEL009
  187.                     ElseIf (InStr(Upper(STRING027), "XXXX")) Then
  188.                         If (InStr(STRING027, Left(STRING022, Len(STRING027) - 4))) Then
  189.                             If (Exist(STRING019)) Then
  190.                                 FOpen 1, STRING019, 0, 0
  191.                                 :LABEL002
  192.                                 If (Ferr(1)) Goto LABEL003
  193.                                 FGet 1, STRING020
  194.                                 If ((Len(STRING020) <> INTEGER003) && (STRING020 <> "")) Then
  195.                                     Log "Number in OVERRIDE.NUM is not correct digits! (CALLBLOC).", 1
  196.                                     Log "# read is: " + STRING020 + " (CALLBLOC).", 1
  197.                                 Endif
  198.                                 If (InStr(STRING020, STRING022)) Then
  199.                                     FClose 1
  200.                                     Log "Exchange Override number detected! (CALLBLOC.PPE)", 0
  201.                                     Goto LABEL004
  202.                                 Endif
  203.                                 Goto LABEL002
  204.                                 :LABEL003
  205.                                 FClose 1
  206.                             Endif
  207.                             Log "Exchange-Lockout number detected! (CALLBLOC.PPE)", 1
  208.                             Goto LABEL009
  209.                         Endif
  210.                     Endif
  211.                     :LABEL004
  212.                     If (INTEGER007 == 0) FGet 2, STRING004
  213.                     Goto LABEL001
  214.                     :LABEL005
  215.                     FClose 2
  216.                 Else
  217.                     Log "Can't find file BADCALL.NUM..(CALLBLOC.PPE).", 1
  218.                     Newlines 2
  219.                     PrintLn "@X0C....TELL SYSOP BADCALL.NUM file is missing!@X07"
  220.                     Newlines 2
  221.                     Goto LABEL006
  222.                 Endif
  223.                 Gosub LABEL010
  224.                 Newline
  225.                 SPrintLn "CALLBLOC.PPE Successfully Completed!"
  226.             Endif
  227.         Endif
  228.     Endif
  229.     :LABEL006
  230.     DbgLevel 0
  231.     Newlines 2
  232.     Print STRING011
  233.     End
  234.     :LABEL007
  235.     If (STRING027 == "1234567890") Then
  236.         SPrintLn 
  237.         SPrintLn "..CallerID file integrity passed...(CALLBLOC.PPE)."
  238.         SPrintLn 
  239.     Else
  240.         Sound 440
  241.         Delay 24
  242.         Sound 0
  243.         Delay 8
  244.         SPrintLn 
  245.         SPrintLn "..CallerID file integrity FAILED!!...(CALLBLOC.PPE)."
  246.         SPrintLn 
  247.         Log "CallerID file integrity FAILED! (CALLBLOC.PPE)", 1
  248.         Log STRING028, 1
  249.         FClose 2
  250.         Goto LABEL006
  251.     Endif
  252.     Return
  253.     :LABEL008
  254.     Log "CALLBLOC CID info faulty: " + STRING022, 1
  255.     STRING014 = "//////////////////// [ GARBAGE CID #  ] \\\\\\\\\\\\\\\\\\\\"
  256.     Gosub LABEL010
  257.     If (Exist(STRING026)) Then
  258.         Newlines 6
  259.         StartDisp 1
  260.         DispFile STRING026, 4 + 2 + 1
  261.         Newlines 2
  262.     Else
  263.         Newlines 2
  264.         PrintLn "Tell SysOp file RECL is missing! (CALLBLOC.PPE)"
  265.         Newlines 2
  266.         Log "File RECL is now missing..(CALLBLOC.PPE).", 1
  267.     Endif
  268.     If (INTEGER002) Goto LABEL011
  269.     Goto LABEL006
  270.     :LABEL009
  271.     If (INTEGER007 == 0) FGet 2, STRING004
  272.     BOOLEAN001 = 1
  273.     FClose 2
  274.     CdChkOff
  275.     STRING014 = "****************** [ Invalid User Logon ] ******************"
  276.     Gosub LABEL010
  277.     Message 0, STRING001, "CALLBLOC.PPE", "BADBOY Called", "R", 0, 0, 0, STRING003
  278.     Log "BADBOY called again! Check Logs..(CALLBLOC.PPE).", 1
  279.     Cls
  280.     If (Exist(STRING012)) Then
  281.         Newlines 6
  282.         StartDisp 1
  283.         DispFile STRING012, 4 + 2 + 1
  284.         Newlines 2
  285.     Else
  286.         Log "The file BAD is missing..(CALLBLOC.PPE).", 1
  287.     Endif
  288.     CdChkOn
  289.     Goto LABEL011
  290.     :LABEL010
  291.     STRING017 = String(Date()) + " / " + String(Time())
  292.     INTEGER011 = InStr(STRING010, "NAME")
  293.     INTEGER009 = Len(STRING010) - INTEGER011 + 1
  294.     If (INTEGER011 > 0) Then
  295.         STRING007 = Left(STRING010, INTEGER011 - 1)
  296.         STRING008 = Mid(STRING010, INTEGER011, INTEGER009)
  297.         INTEGER004 = 2
  298.     Else
  299.         STRING007 = STRING010
  300.     Endif
  301.     If (!Exist(STRING005) && INTEGER005) Then
  302.         FCreate 1, STRING005, 2, 0
  303.         FPutLn 1, STRING015
  304.         FPutLn 1, "@@                CALLBLOC.PPE  Log File                  @@"
  305.         FPutLn 1, STRING015
  306.         FPutLn 1, STRING014
  307.         FPutLn 1, Modem()
  308.         FPutLn 1, STRING007
  309.         If (INTEGER004 == 2) FPutLn 1, STRING008
  310.         FPutLn 1, STRING017
  311.         If ((BOOLEAN001 == 1) && (INTEGER007 == 0)) FPutLn 1, STRING004
  312.         FPutLn 1, STRING013
  313.         FClose 1
  314.     ElseIf (INTEGER005) Then
  315.         FAppend 1, STRING005, 2, 0
  316.         FPutLn 1, STRING014
  317.         FPutLn 1, Modem()
  318.         FPutLn 1, STRING007
  319.         If (INTEGER004 == 2) FPutLn 1, STRING008
  320.         FPutLn 1, STRING017
  321.         If ((BOOLEAN001 == 1) && (INTEGER007 == 0)) FPutLn 1, STRING004
  322.         FPutLn 1, STRING013
  323.         FClose 1
  324.     Endif
  325.     If (INTEGER001 == 1) Then
  326.         Log STRING007, 1
  327.         If (INTEGER004 == 2) Log STRING008, 1
  328.     Endif
  329.     Return
  330.     :LABEL011
  331.     Log STRING028, 1
  332.     DbgLevel 0
  333.     Hangup
  334.     End
  335.  
  336. ;------------------------------------------------------------------------------
  337. ;
  338. ; Usage report (before postprocessing)
  339. ;
  340. ; ■ Statements used :
  341. ;
  342. ;    2       End
  343. ;    1       Cls
  344. ;    63      Goto 
  345. ;    52      Let 
  346. ;    1       Print 
  347. ;    5       PrintLn 
  348. ;    40      If 
  349. ;    3       DispFile 
  350. ;    1       FCreate 
  351. ;    3       FOpen 
  352. ;    1       FAppend 
  353. ;    8       FClose 
  354. ;    15      FGet 
  355. ;    17      FPutLn 
  356. ;    2       StartDisp 
  357. ;    1       Hangup
  358. ;    26      Log 
  359. ;    6       Gosub 
  360. ;    2       Return
  361. ;    1       CdChkOn
  362. ;    1       CdChkOff
  363. ;    2       Delay 
  364. ;    5       Newline
  365. ;    10      Newlines 
  366. ;    2       Message 
  367. ;    2       Sound 
  368. ;    8       SPrintLn 
  369. ;    3       DbgLevel 
  370. ;
  371. ;
  372. ; ■ Functions used :
  373. ;
  374. ;    31      +
  375. ;    3       -
  376. ;    19      ==
  377. ;    5       <>
  378. ;    1       <
  379. ;    1       <=
  380. ;    1       >
  381. ;    2       >=
  382. ;    31      !
  383. ;    7       &&
  384. ;    2       ||
  385. ;    6       Len(
  386. ;    3       Upper()
  387. ;    3       Mid()
  388. ;    4       Left()
  389. ;    2       Ferr()
  390. ;    8       InStr()
  391. ;    1       Trim()
  392. ;    1       Date()
  393. ;    1       Time()
  394. ;    3       String()
  395. ;    1       Mask_Num()
  396. ;    9       PPEPath()
  397. ;    1       OnLocal()
  398. ;    1       CallId()
  399. ;    7       Exist()
  400. ;    2       PPEName()
  401. ;    2       Modem()
  402. ;
  403. ;------------------------------------------------------------------------------
  404. ;
  405. ; Analysis flags : B
  406. ;
  407. ; B - Brute hangup ■ 1
  408. ;     Program hangup without notification. This may be a good way to
  409. ;     disconnect a user, but if used randomly, may be very nasty
  410. ;     ■ Search for : HANGUP, DTROFF
  411. ;
  412. ;------------------------------------------------------------------------------
  413. ;
  414. ; Postprocessing report
  415. ;
  416. ;    1       For/Next
  417. ;    0       While/EndWhile
  418. ;    25      If/Then or If/Then/Else
  419. ;    1       Select Case
  420. ;
  421. ;------------------------------------------------------------------------------
  422. ;                 AEGiS Corp - Break the routines, code against the machines!
  423. ;------------------------------------------------------------------------------
  424.