home *** CD-ROM | disk | FTP | other *** search
/ Carsten's PPE Collection / Carstens_PPE_Collection_2007.zip / S / SHELL10A.ZIP / SHELL.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1993-12-18  |  5KB  |  247 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.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     String   STRING001
  23.     String   STRING002
  24.     String   STRING003
  25.     String   STRING004
  26.     String   STRING005
  27.     String   STRING006
  28.     String   STRING007
  29.     String   STRING008
  30.     String   STRING009
  31.     String   STRING010
  32.     String   STRING011
  33.     String   STRING012
  34.     String   STRING013
  35.     String   STRING014
  36.     String   STRING015
  37.     String   STRING016
  38.     String   STRING017
  39.     String   STRING018
  40.     String   STRING019
  41.     String   STRING020
  42.     String   STRING021
  43.     String   STRING022
  44.     String   STRING023
  45.     String   STRING024
  46.     String   STRING025
  47.  
  48. ;------------------------------------------------------------------------------
  49.  
  50.     STRING018 = "SHELL.CFG"
  51.     STRING019 = " Abort..."
  52.     STRING005 = "(C) 1993 "
  53.     STRING001 = "J"
  54.     STRING002 = "A"
  55.     STRING003 = "S"
  56.     STRING004 = "H"
  57.     STRING006 = "AMMERSEE BBS"
  58.     STRING007 = " 1.0a "
  59.     STRING014 = "+49-8807-91527  HST 14400"
  60.     STRING015 = "+49-8807-93042  ZyX 19200"
  61.     STRING016 = "+49-8807-93041 ISDN 64000"
  62.     STRING017 = "+49-8807-93043  USR 14400"
  63.     STRING021 = "(@X0C@TIMELEFT@ @X0Emin. left@X07) @X0ECommand@X07: (@X0FY@X07)@X0Ees, @X07(@X0FA@X07)@X0Ebort, @X07(@X0FN@X07)@X0Eew program @X0B"
  64.     STRING022 = ReadLine(PCBDat(), 2)
  65.     STRING023 = ReadLine(PCBDat(), 94)
  66.     GetUser
  67.     Log "■ Running " + STRING001 + STRING002 + STRING003 + STRING004 + "'s v" + PPEName() + STRING007, 0
  68.     GetToken STRING024
  69.     If (Exist(PPEPath() + STRING018)) Then
  70.         FOpen 1, PPEPath() + STRING018, 0, 0
  71.         FGet 1, STRING008
  72.         If (STRING008 <> STRING022) Then
  73.             Newlines 1
  74.             PrintLn " @X0C", STRING018, " Line 1 is wrong - notify Sysop.", STRING019
  75.             Stop
  76.         Endif
  77.         FGet 1, STRING009
  78.         If (STRING009 <> STRING023) Then
  79.             Newlines 1
  80.             PrintLn " @X0C", STRING018, " Line 2 is wrong - notify Sysop. ", STRING019
  81.             Stop
  82.         Endif
  83.         FGet 1, STRING010
  84.         If ((((STRING010 == "YES") || (STRING010 == "yes")) || (STRING024 == "YES")) || (STRING024 == "yes")) Then
  85.             INTEGER002 = 1
  86.         ElseIf ((STRING010 == "NO") || (STRING010 == "no")) Then
  87.             INTEGER002 = 0
  88.         Else
  89.             Newlines 1
  90.             PrintLn " @X0C", STRING018, " Line 3 has wrong format - notify Sysop. ", STRING019
  91.             Stop
  92.         Endif
  93.         FGet 1, INTEGER001
  94.         If ((INTEGER001 < 1) || (INTEGER001 > 255)) Then
  95.             Newlines 1
  96.             PrintLn " @X0C", STRING018, " Line 4 has wrong access level format - notify Sysop. ", STRING019
  97.             Stop
  98.         Endif
  99.         FGet 1, STRING011
  100.         FGet 1, STRING012
  101.         FGet 1, STRING013
  102.         If (STRING013 <> "FALSE") Then
  103.             If (STRING013 <> "TRUE") Then
  104.                 Newlines 1
  105.                 PrintLn " @X0C", STRING018, " Line 7 has wrong format - notify Sysop. ", STRING019
  106.                 Stop
  107.             Endif
  108.         Endif
  109.         FClose 1
  110.     Else
  111.         Newlines 1
  112.         PrintLn " @X0C", STRING018, " is missing in path: ", PPEPath(), " - ", STRING019
  113.         Stop
  114.     Endif
  115.     If (CurSec() < INTEGER001) Then
  116.         Newlines 1
  117.         PrintLn "@X0E@FIRSTU@@X0B @X0BMenu Selection @X0E(@X0C@OPTEXT@@X0E)@X0B is @X0CNOT @X0BAVAILABLE!@X07"
  118.         PrintLn "You Do not Have the proper security Level"
  119.         PrintLn "Needed to perform this Menu Selection."
  120.         Stop
  121.     Endif
  122.     :LABEL001
  123.     STRING020 = "Y"
  124.     STRING025 = STRING013
  125.     If (INTEGER002) Then
  126.         Cls
  127.         Newlines 1
  128.         PrintLn " @X03@FIRSTU@, @X0BRun following program now!"
  129.         Newlines 1
  130.         PrintLn " @X0EFile name: @X0F", Upper(STRING011), "  @X03(If not exist then SHELL will be aborted!)"
  131.         PrintLn " @X0EArguments: @X07", STRING012
  132.         PrintLn " @X0ESHELL    : @X0F", Upper(STRING013)
  133.         Newlines 1
  134.         InputStr STRING021, STRING020, 7, 1, "YAN", 8 + 64 + 2 + 4 + 4096
  135.         Select Case (STRING020)
  136.             Case "N"
  137.                 Newlines 1
  138.                 InputStr " Enter a new file name to shell to: @X0B", STRING011, 14, 12, Mask_Ascii(), 64 + 2 + 4
  139.                 Newlines 1
  140.                 PrintLn " @X0EEnter new arguments to pass to @X0B", Upper(STRING011), "@X0F:"
  141.                 InputStr " Arguments: @X07", STRING012, 7, 63, Mask_Ascii(), 64 + 2 + 4
  142.                 Newlines 1
  143.                 PrintLn " @X0EEnter now @X0BTRUE @X0Eif the shell should be made via COMMAND.COM;"
  144.                 InputStr " FALSE @X0Eif it should be shelled to directly! @X07(@X0FSpace@X07)=@X0EChange @X0B", STRING013, 11, 5, "FALSETRU", 64 + 2 + 4
  145.                 If (STRING013 <> "TRUE") Then
  146.                     If (STRING013 <> "FALSE") Then
  147.                         STRING013 = STRING025
  148.                     Endif
  149.                 Endif
  150.                 Goto LABEL001
  151.             Case "A"
  152.             Else
  153.         End Select
  154.         Cls
  155.         Newlines 1
  156.         PrintLn " @X0CRunning @X0B", STRING011, "@X0C ..."
  157.         Delay 30
  158.         Log "■ Starting " + STRING001 + STRING002 + STRING003 + STRING004 + "'s v" + PPEName() + STRING007 + " (" + STRING011 + ")", 0
  159.         Shell STRING013, INTEGER003, STRING011, STRING012
  160.         Cls
  161.         If (INTEGER002) Then
  162.         Endif
  163.         Newlines 2
  164.         PrintLn " @X07", PPEName(), " Version ", STRING007, STRING005, STRING001, STRING002, STRING003, STRING004
  165.         Newline
  166.         PrintLn " Support ", STRING001, STRING002, STRING003, STRING004, " ", STRING006
  167.         PrintLn " ", STRING014
  168.         PrintLn " ", STRING015
  169.         PrintLn " ", STRING016
  170.         PrintLn " ", STRING017
  171.     Endif
  172.     End
  173.  
  174. ;------------------------------------------------------------------------------
  175. ;
  176. ; Usage report (before postprocessing)
  177. ;
  178. ; ■ Statements used :
  179. ;
  180. ;    1       End
  181. ;    3       Cls
  182. ;    21      Goto 
  183. ;    21      Let 
  184. ;    22      PrintLn 
  185. ;    15      If 
  186. ;    1       FOpen 
  187. ;    1       FClose 
  188. ;    7       FGet 
  189. ;    1       GetUser
  190. ;    2       Log 
  191. ;    4       InputStr 
  192. ;    1       Delay 
  193. ;    1       Newline
  194. ;    15      Newlines 
  195. ;    1       GetToken 
  196. ;    1       Shell 
  197. ;    7       Stop
  198. ;
  199. ;
  200. ; ■ Functions used :
  201. ;
  202. ;    29      +
  203. ;    8       ==
  204. ;    6       <>
  205. ;    2       <
  206. ;    1       >
  207. ;    15      !
  208. ;    5       ||
  209. ;    3       Upper()
  210. ;    2       Mask_Ascii()
  211. ;    2       PCBDat()
  212. ;    3       PPEPath()
  213. ;    2       ReadLine()
  214. ;    1       CurSec()
  215. ;    1       Exist()
  216. ;    3       PPEName()
  217. ;
  218. ;------------------------------------------------------------------------------
  219. ;
  220. ; Analysis flags : Sd
  221. ;
  222. ; S - Shell to DOS ■ 5
  223. ;     This may be normal if the PPE need to execute an external command,
  224. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  225. ;     or usefull (sorting, maintenance,...). Check!
  226. ;     ■ Search for : SHELL
  227. ;
  228. ; d - Access PCBOARD.DAT ■ 2
  229. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  230. ;     for many PPE so they can find various informations on the system
  231. ;     (system paths, max number of lines in messages, ...) but it may also
  232. ;     be a way to gather vital informations.
  233. ;     ■ Search for : PCBDAT()
  234. ;
  235. ;------------------------------------------------------------------------------
  236. ;
  237. ; Postprocessing report
  238. ;
  239. ;    0       For/Next
  240. ;    0       While/EndWhile
  241. ;    13      If/Then or If/Then/Else
  242. ;    1       Select Case
  243. ;
  244. ;------------------------------------------------------------------------------
  245. ;                 AEGiS Corp - Break the routines, code against the machines!
  246. ;------------------------------------------------------------------------------
  247.