home *** CD-ROM | disk | FTP | other *** search
/ Carsten's PPE Collection / Carstens_PPE_Collection_2007.zip / T / THTTP2B3.ZIP / ALL.PPE (.txt) next >
PCBoard Programming Language Executable  |  1994-07-28  |  8KB  |  466 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 2.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.     Real     REAL001
  27.     Real     REAL002
  28.     Real     REAL003
  29.     Real     REAL004
  30.     Real     REAL005
  31.     Real     REAL006
  32.     Real     REAL007
  33.     Real     REAL008
  34.     Real     REAL009
  35.     String   STRING001
  36.     String   STRING002
  37.     String   STRING003
  38.     String   STRING004
  39.     String   STRING005
  40.     String   STRING006
  41.     String   STRING007
  42.     String   STRING008
  43.     String   STRING009
  44.     String   STRING010
  45.     String   TSTRING011(50)
  46.  
  47. ;------------------------------------------------------------------------------
  48.  
  49.     If (!OnLocal()) CdChkOff
  50.     If (!OnLocal()) DtrOff
  51.     If (!OnLocal()) Delay 10
  52.     If (!OnLocal()) DtrOn
  53.     If (!OnLocal()) Delay 5
  54.     If (!OnLocal()) SendModem "ATH1"
  55.     INTEGER001 = 1
  56.     If (Exist(PPEPath() + PPEName() + "d.log")) Goto LABEL005
  57.     PrintLn "@X0F Creating All Time Data Files, One Second Please!!"
  58.     FCreate 1, PPEPath() + PPEName() + "u.log", 1, 0
  59.     FCreate 2, PPEPath() + PPEName() + "d.log", 1, 0
  60.     :LABEL001
  61.     GetAltUser INTEGER001
  62.     If (CurUser() == -1) Goto LABEL004
  63.     REAL001 = U_Bul()
  64.     REAL003 = U_Bdl()
  65.     REAL002 = U_Ful()
  66.     REAL004 = U_Fdl()
  67.     Inc INTEGER001
  68.     If ((U_Alias == "") || (U_Alias == "                         ")) Then
  69.         Alias 0
  70.     Else
  71.         Alias 1
  72.     Endif
  73.     If (REAL001 <> 0) Then
  74.         If (Alias() == 1) Then
  75.             FPutLn 1, U_Alias + " " + String(REAL001) + " " + String(REAL002)
  76.             Goto LABEL002
  77.         Endif
  78.         FPutLn 1, U_Name() + " " + String(REAL001) + " " + String(REAL002)
  79.     Endif
  80.     :LABEL002
  81.     If (REAL003 <> 0) Then
  82.         If (Alias() == 1) Then
  83.             FPutLn 2, U_Alias + " " + String(REAL003) + " " + String(REAL004)
  84.             Goto LABEL003
  85.         Endif
  86.         FPutLn 2, U_Name() + " " + String(REAL003) + " " + String(REAL004)
  87.     Endif
  88.     :LABEL003
  89.     Goto LABEL001
  90.     :LABEL004
  91.     FClose 1
  92.     FClose 2
  93.     :LABEL005
  94.     If (Exist(PPEPath() + PPEName() + ".loc")) Goto LABEL005
  95.     FCreate 1, PPEPath() + PPEName() + ".loc", 1, 0
  96.     FClose 1
  97.     STRING006 = "ALLU"
  98.     GetUser
  99.     If ((U_Alias == "") || (U_Alias == "                         ")) Then
  100.         Alias 0
  101.     Else
  102.         Alias 1
  103.     Endif
  104.     If (Exist(PPEPath() + "upcrrun." + String(PcbNode()))) Then
  105.         PrintLn "@X0F Updating the @X0BTHT-TOP @X0FData files for @X0CUploads@X0F, Thanks!!@X07"
  106.         :LABEL006
  107.         REAL003 = 0
  108.         REAL004 = 0
  109.         REAL005 = 0
  110.         REAL006 = 0
  111.         FOpen 1, PPEPath() + "upcr" + String(PcbNode()) + ".tmp", 0, 0
  112.         FGet 1, STRING007
  113.         Tokenize STRING007
  114.         GetToken REAL005
  115.         GetToken REAL006
  116.         FClose 1
  117.         If (Exist(PPEPath() + STRING006 + ".log")) Goto LABEL007
  118.         FCreate 1, PPEPath() + STRING006 + ".log", 1, 0
  119.         FClose 1
  120.         :LABEL007
  121.         If (Exist(PPEPath() + STRING006 + ".log")) FOpen 2, PPEPath() + STRING006 + ".log", 0, 0
  122.         BOOLEAN001 = 0
  123.         If (Exist(PPEPath() + STRING006 + ".log")) FCreate 3, PPEPath() + STRING006 + ".tmp", 1, 0
  124.         :LABEL008
  125.         If (Ferr(2)) Goto LABEL011
  126.         FGet 2, STRING005
  127.         If (STRING005 == "") Goto LABEL011
  128.         If (Alias() == 1) Then
  129.             INTEGER002 = Len(U_Alias)
  130.             Goto LABEL009
  131.         Endif
  132.         INTEGER002 = Len(U_Name())
  133.         :LABEL009
  134.         If ((Mid(STRING005, 1, INTEGER002) == U_Name()) || (Mid(STRING005, 1, INTEGER002) == U_Alias)) Then
  135.             BOOLEAN001 = 1
  136.             Tokenize STRING005
  137.             If (TokCount() == 5) Then
  138.                 GetToken STRING008
  139.                 GetToken STRING009
  140.                 GetToken STRING010
  141.                 GetToken REAL003
  142.                 GetToken REAL004
  143.             Endif
  144.             If (TokCount() == 4) Then
  145.                 GetToken STRING008
  146.                 GetToken STRING009
  147.                 GetToken REAL003
  148.                 GetToken REAL004
  149.             Endif
  150.             If (TokCount() == 3) Then
  151.                 GetToken STRING008
  152.                 GetToken REAL003
  153.                 GetToken REAL004
  154.             Endif
  155.             REAL003 = REAL003 + REAL005
  156.             REAL004 = REAL004 + REAL006
  157.             FPutLn 3, Mid(STRING005, 1, INTEGER002) + " " + String(REAL003) + " " + String(REAL004)
  158.             Goto LABEL010
  159.         Endif
  160.         FPutLn 3, STRING005
  161.         :LABEL010
  162.         Goto LABEL008
  163.         :LABEL011
  164.         If (BOOLEAN001 == 0) Then
  165.             If (Alias() == 1) Then
  166.                 FPutLn 3, U_Alias + " " + String(REAL005) + " " + String(REAL006)
  167.                 Goto LABEL012
  168.             Endif
  169.             FPutLn 3, U_Name() + " " + String(REAL005) + " " + String(REAL006)
  170.         Endif
  171.         :LABEL012
  172.         FClose 4
  173.         FClose 3
  174.         FClose 1
  175.         FClose 2
  176.         If (STRING006 == "ALLU") Then
  177.             If (Exist(PPEPath() + PPEName() + "u.tmp")) Copy PPEPath() + PPEName() + "u.tmp", PPEPath() + PPEName() + "u.log"
  178.             If (Exist(PPEPath() + PPEName() + "u.tmp")) Delete PPEPath() + PPEName() + "u.tmp"
  179.             If (Exist(PPEPath() + "ALLU.log")) FOpen 2, PPEPath() + "ALLU.log", 0, 0
  180.             If (Exist(PPEPath() + "ALLU.log")) FCreate 3, PPEPath() + "topU.tmp", 1, 0
  181.             Gosub LABEL020
  182.             STRING006 = "UPCR"
  183.             Goto LABEL006
  184.         Endif
  185.         If (STRING006 == "UPCR") Then
  186.             If (Exist(PPEPath() + "UPcr.tmp")) Copy PPEPath() + "UPcr.tmp", PPEPath() + "UPcr.log"
  187.             If (Exist(PPEPath() + "UPcr.tmp")) Delete PPEPath() + "UPcr.tmp"
  188.             If (Exist(PPEPath() + "UPCR.log")) FOpen 2, PPEPath() + "UPCR.log", 0, 0
  189.             If (Exist(PPEPath() + "upcr.log")) FCreate 3, PPEPath() + "WEEK1.tmp", 1, 0
  190.             Gosub LABEL020
  191.             STRING006 = "UPCR" + String(Month(Date()))
  192.             Goto LABEL006
  193.         Endif
  194.         If (Exist(PPEPath() + "UPcr" + String(Month(Date())) + ".tmp")) Copy PPEPath() + "UPcr" + String(Month(Date())) + ".tmp", PPEPath() + "UPcr" + String(Month(Date())) + ".log"
  195.         If (Exist(PPEPath() + "UPcr" + String(Month(Date())) + ".tmp")) Delete PPEPath() + "UPcr" + String(Month(Date())) + ".tmp"
  196.         If (Exist(PPEPath() + "UPCR" + String(Month(Date())) + ".log")) FOpen 2, PPEPath() + "UPCR" + String(Month(Date())) + ".log", 0, 0
  197.         If (Exist(PPEPath() + "upcr" + String(Month(Date())) + ".log")) FCreate 3, PPEPath() + "monthu.tmp", 1, 0
  198.         Gosub LABEL020
  199.         If (Exist(PPEPath() + "upcr" + String(PcbNode()) + ".tmp")) Delete PPEPath() + "upcr" + String(PcbNode()) + ".tmp"
  200.     Endif
  201.     If (Exist(PPEPath() + "dncrrun." + String(PcbNode()))) Then
  202.         STRING006 = "ALLD"
  203.         PrintLn "@X0F Updating the @X0BTHT-TOP @X0FData files for @X04Downloads@X0F!!"
  204.         :LABEL013
  205.         REAL003 = 0
  206.         REAL004 = 0
  207.         REAL005 = 0
  208.         REAL006 = 0
  209.         FOpen 1, PPEPath() + "dncr" + String(PcbNode()) + ".tmp", 0, 0
  210.         FGet 1, STRING007
  211.         Tokenize STRING007
  212.         GetToken REAL005
  213.         GetToken REAL006
  214.         FClose 1
  215.         If (Exist(PPEPath() + STRING006 + ".log")) Goto LABEL014
  216.         FCreate 1, PPEPath() + STRING006 + ".log", 1, 0
  217.         FClose 1
  218.         :LABEL014
  219.         If (Exist(PPEPath() + STRING006 + ".log")) FOpen 2, PPEPath() + STRING006 + ".log", 0, 0
  220.         BOOLEAN001 = 0
  221.         If (Exist(PPEPath() + STRING006 + ".log")) FCreate 3, PPEPath() + STRING006 + ".tmp", 1, 0
  222.         :LABEL015
  223.         If (Ferr(2)) Goto LABEL018
  224.         FGet 2, STRING005
  225.         If (STRING005 == "") Goto LABEL018
  226.         If (Alias() == 1) Then
  227.             INTEGER002 = Len(U_Alias)
  228.             Goto LABEL016
  229.         Endif
  230.         INTEGER002 = Len(U_Name())
  231.         :LABEL016
  232.         If ((Mid(STRING005, 1, INTEGER002) == U_Name()) || (Mid(STRING005, 1, INTEGER002) == U_Alias)) Then
  233.             BOOLEAN001 = 1
  234.             Tokenize STRING005
  235.             If (TokCount() == 5) Then
  236.                 GetToken STRING008
  237.                 GetToken STRING009
  238.                 GetToken STRING010
  239.                 GetToken REAL003
  240.                 GetToken REAL004
  241.             Endif
  242.             If (TokCount() == 4) Then
  243.                 GetToken STRING008
  244.                 GetToken STRING009
  245.                 GetToken REAL003
  246.                 GetToken REAL004
  247.             Endif
  248.             If (TokCount() == 3) Then
  249.                 GetToken STRING008
  250.                 GetToken REAL003
  251.                 GetToken REAL004
  252.             Endif
  253.             REAL003 = REAL003 + REAL005
  254.             REAL004 = REAL004 + REAL006
  255.             FPutLn 3, Mid(STRING005, 1, INTEGER002) + " " + String(REAL003) + " " + String(REAL004)
  256.             Goto LABEL017
  257.         Endif
  258.         FPutLn 3, STRING005
  259.         :LABEL017
  260.         Goto LABEL015
  261.         :LABEL018
  262.         If (BOOLEAN001 == 0) Then
  263.             If (Alias() == 1) Then
  264.                 FPutLn 3, U_Alias + " " + String(REAL005) + " " + String(REAL006)
  265.                 Goto LABEL019
  266.             Endif
  267.             FPutLn 3, U_Name() + " " + String(REAL005) + " " + String(REAL006)
  268.         Endif
  269.         :LABEL019
  270.         FClose 4
  271.         FClose 3
  272.         FClose 1
  273.         FClose 2
  274.         If (STRING006 == "ALLD") Then
  275.             If (Exist(PPEPath() + PPEName() + "d.tmp")) Copy PPEPath() + PPEName() + "d.tmp", PPEPath() + PPEName() + "d.log"
  276.             If (Exist(PPEPath() + PPEName() + "d.tmp")) Delete PPEPath() + PPEName() + "d.tmp"
  277.             If (Exist(PPEPath() + "alld.log")) FOpen 2, PPEPath() + "alld.log", 0, 0
  278.             If (Exist(PPEPath() + "alld.log")) FCreate 3, PPEPath() + "topd.tmp", 1, 0
  279.             Gosub LABEL020
  280.             STRING006 = "DNCR"
  281.             Goto LABEL013
  282.         Endif
  283.         If (STRING006 == "DNCR") Then
  284.             If (Exist(PPEPath() + "dncr.tmp")) Copy PPEPath() + "dncr.tmp", PPEPath() + "dncr.log"
  285.             If (Exist(PPEPath() + "dncr.tmp")) Delete PPEPath() + "dncr.tmp"
  286.             If (Exist(PPEPath() + "dncr.log")) FOpen 2, PPEPath() + "dncr.log", 0, 0
  287.             If (Exist(PPEPath() + "dnCR.log")) FCreate 3, PPEPath() + "WEEK.tmp", 1, 0
  288.             Gosub LABEL020
  289.             STRING006 = "DNCR" + String(Month(Date()))
  290.             Goto LABEL013
  291.         Endif
  292.         If (Exist(PPEPath() + "dncr" + String(Month(Date())) + ".tmp")) Copy PPEPath() + "dncr" + String(Month(Date())) + ".tmp", PPEPath() + "dncr" + String(Month(Date())) + ".log"
  293.         If (Exist(PPEPath() + "dncr" + String(Month(Date())) + ".tmp")) Delete PPEPath() + "dncr" + String(Month(Date())) + ".tmp"
  294.         If (Exist(PPEPath() + "dncr" + String(Month(Date())) + ".log")) FOpen 2, PPEPath() + "dncr" + String(Month(Date())) + ".log", 0, 0
  295.         If (Exist(PPEPath() + "dnCR" + String(Month(Date())) + ".log")) FCreate 3, PPEPath() + "monthd.tmp", 1, 0
  296.         Gosub LABEL020
  297.         Goto LABEL024
  298.         :LABEL020
  299.         FOpen 0, PPEPath() + "exclude.lst", 0, 0
  300.         FGet 0, INTEGER004
  301.         For INTEGER005 = 1 To INTEGER004
  302.             FGet 0, TSTRING011(INTEGER005)
  303.         Next
  304.         FClose 0
  305.         REAL007 = 0
  306.         REAL008 = 0
  307.         REAL009 = 0
  308.         :LABEL021
  309.         If (Ferr(2)) Goto LABEL023
  310.         :LABEL022
  311.         FGet 2, STRING001
  312.         Tokenize STRING001
  313.         If (TokCount() == 3) Then
  314.             GetToken STRING002
  315.             GetToken REAL007
  316.             GetToken REAL008
  317.             INTEGER003 = Len(REAL007)
  318.             REAL009 = REAL009 + REAL007
  319.             For INTEGER005 = 1 To INTEGER004
  320.                 If (STRING002 == TSTRING011(INTEGER005)) Goto LABEL022
  321.             Next
  322.             FPutLn 3, Space(13 - INTEGER003) + String(REAL007) + Space(1) + STRING002 + Space(1) + String(REAL008)
  323.         Endif
  324.         If (TokCount() == 4) Then
  325.             GetToken STRING002
  326.             GetToken STRING003
  327.             GetToken REAL007
  328.             GetToken REAL008
  329.             INTEGER003 = Len(REAL007)
  330.             REAL009 = REAL009 + REAL007
  331.             For INTEGER005 = 1 To INTEGER004
  332.                 If (STRING002 + " " + STRING003 == TSTRING011(INTEGER005)) Goto LABEL022
  333.             Next
  334.             FPutLn 3, Space(13 - INTEGER003) + String(REAL007) + Space(1) + STRING002 + " " + STRING003 + Space(1) + String(REAL008)
  335.         Endif
  336.         If (TokCount() == 5) Then
  337.             GetToken STRING002
  338.             GetToken STRING003
  339.             GetToken STRING004
  340.             GetToken REAL007
  341.             GetToken REAL008
  342.             INTEGER003 = Len(REAL007)
  343.             REAL009 = REAL009 + REAL007
  344.             For INTEGER005 = 1 To INTEGER004
  345.                 If (STRING002 + " " + STRING003 + " " + STRING004 == TSTRING011(INTEGER005)) Goto LABEL022
  346.             Next
  347.             FPutLn 3, Space(13 - INTEGER003) + String(REAL007) + Space(1) + STRING002 + " " + STRING003 + " " + STRING004 + Space(1) + String(REAL008)
  348.         Endif
  349.         Goto LABEL021
  350.         :LABEL023
  351.         FClose 3
  352.         FClose 2
  353.         REAL009 = REAL009 / 1024000
  354.         INTEGER006 = REAL009
  355.         FCreate 2, PPEPath() + STRING006 + ".tot", 1, 0
  356.         FPutLn 2, INTEGER006
  357.         FClose 2
  358.         Return
  359.     Endif
  360.     :LABEL024
  361.     If (Exist(PPEPath() + "dncr" + String(PcbNode()) + ".tmp")) Delete PPEPath() + "dncr" + String(PcbNode()) + ".tmp"
  362.     If (Exist(PPEPath() + "dncrrun." + String(PcbNode()))) Delete PPEPath() + "dncrrun." + String(PcbNode())
  363.     If (Exist(PPEPath() + "upcrrun." + String(PcbNode()))) Delete PPEPath() + "upcrrun." + String(PcbNode())
  364.     Delete PPEPath() + PPEName() + ".loc"
  365.  
  366. ;------------------------------------------------------------------------------
  367. ;
  368. ; Usage report (before postprocessing)
  369. ;
  370. ; ■ Statements used :
  371. ;
  372. ;    69      Goto 
  373. ;    50      Let 
  374. ;    3       PrintLn 
  375. ;    84      If 
  376. ;    14      FCreate 
  377. ;    11      FOpen 
  378. ;    19      FClose 
  379. ;    7       FGet 
  380. ;    16      FPutLn 
  381. ;    1       GetUser
  382. ;    11      Delete 
  383. ;    6       Gosub 
  384. ;    1       Return
  385. ;    1       DtrOn
  386. ;    1       DtrOff
  387. ;    1       CdChkOff
  388. ;    2       Delay 
  389. ;    1       SendModem 
  390. ;    1       Inc 
  391. ;    5       Tokenize 
  392. ;    40      GetToken 
  393. ;    4       Alias 
  394. ;    6       Copy 
  395. ;    1       GetAltUser 
  396. ;
  397. ;
  398. ; ■ Functions used :
  399. ;
  400. ;    1       -
  401. ;    1       /
  402. ;    245     +
  403. ;    3       -
  404. ;    35      ==
  405. ;    2       <>
  406. ;    4       <
  407. ;    4       <=
  408. ;    8       >=
  409. ;    44      !
  410. ;    8       &&
  411. ;    8       ||
  412. ;    7       Len(
  413. ;    6       Mid()
  414. ;    9       Space()
  415. ;    3       Ferr()
  416. ;    18      Date()
  417. ;    8       U_Name()
  418. ;    1       U_Ful()
  419. ;    1       U_Fdl()
  420. ;    1       U_Bdl()
  421. ;    1       U_Bul()
  422. ;    18      Month()
  423. ;    56      String()
  424. ;    86      PPEPath()
  425. ;    12      PcbNode()
  426. ;    6       OnLocal()
  427. ;    38      Exist()
  428. ;    16      PPEName()
  429. ;    9       TokCount()
  430. ;    6       Alias()
  431. ;    1       CurUser()
  432. ;
  433. ;------------------------------------------------------------------------------
  434. ;
  435. ; Analysis flags : RBM
  436. ;
  437. ; R - Read user ■ 5
  438. ;     User records are read, this may signify that someone wants to get
  439. ;     various informations about a user (for example his password), but
  440. ;     this may also be normal for a program accessing user records (for
  441. ;     example a User Editor)
  442. ;     ■ Search for : GETALTUSER
  443. ;
  444. ; B - Brute hangup ■ 1
  445. ;     Program hangup without notification. This may be a good way to
  446. ;     disconnect a user, but if used randomly, may be very nasty
  447. ;     ■ Search for : HANGUP, DTROFF
  448. ;
  449. ; M - Send text to modem only ■ 4
  450. ;     Some informations are sent only to the modem, not to the local
  451. ;     screen, this is a well known way to make stealth backdoors, Check!
  452. ;     ■ Search for : SENDMODEM, MPRINT, MPRINTLN
  453. ;
  454. ;------------------------------------------------------------------------------
  455. ;
  456. ; Postprocessing report
  457. ;
  458. ;    4       For/Next
  459. ;    0       While/EndWhile
  460. ;    29      If/Then or If/Then/Else
  461. ;    0       Select Case
  462. ;
  463. ;------------------------------------------------------------------------------
  464. ;                 AEGiS Corp - Break the routines, code against the machines!
  465. ;------------------------------------------------------------------------------
  466.