home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / AGSDOS0!.ZIP / ADOS.PPS < prev    next >
Text File  |  1994-10-01  |  4KB  |  193 lines

  1. string dirname
  2. string k
  3. string backcommand
  4. string command
  5. string work
  6. integer a
  7. integer slashcount
  8.  
  9. fappend 1, PPEPath()+ "A-DOS.LOG", O_RW, S_DN
  10. fputln 1, "------------------------------------------------------------------------------"
  11. fputln 1, string(Date()), " ", string(Time()), " ", U_Name(), " entered in A-DOS :))"
  12. fputln 1
  13. fputln 1, "Command used :"
  14. fputln 1
  15.  
  16.  
  17.  
  18. Startdisp FNS
  19.  
  20.  
  21. dirname = "PCB"
  22. color @X07
  23. cls
  24. delay 20
  25. dispfile ppepath()+"shell.txt",DEFS
  26. delay 25
  27. dispfile ppepath()+"limiter.txt",DEFS
  28. delay 10
  29. dispfile ppepath()+"access.txt",DEFS
  30. delay 18
  31. dispfile PPEPath()+"allowed.tre",0
  32.  
  33. gosub showprompt
  34. :tkt
  35. k = inkey()
  36. :te
  37. if (k = "") goto tkt
  38. if (asc(k) >= 32 && len(k) = 1) then
  39.     print k
  40.     command = command + k
  41. end if
  42. if (((k = chr(8) && len(k) = 1) || (k = "LEFT")) && len(command)>0 ) then
  43.     print chr(8)+" "+chr(8)
  44.     command = left(command,len(command)-1)
  45. end if
  46. if (k == "RIGHT" && len(backcommand) > len(command)) then
  47.     k = mid(backcommand,len(command)+1,1)
  48.     goto te
  49. end if
  50. if (k = chr(13) && len(k) = 1) then
  51.     goto commandentered
  52. end if
  53. goto tkt    
  54.     
  55. :commandentered
  56. command = trim(command," ")
  57. backcommand = command
  58. command = upper(command)
  59. slashcount = 0
  60.  
  61. for a = 1 to len(command)
  62.     if (mid(command,a,1) = "\") inc slashcount
  63. next
  64. if (slashcount > 1) then
  65.     dispfile ppepath()+"nocomplx.txt",defs
  66.     command = ""    
  67.     gosub showprompt
  68.     goto tkt
  69. end if
  70. if (left(command,3) = "DIR") then
  71.         fputln 1, command
  72.     if (dirname != "") then
  73.         dispfile PPEPath()+dirname+".DIR",0
  74.     else
  75.         dispfile PPEPath()+"ROOT.DIR",0
  76.     end if
  77.     command = ""
  78.     gosub showprompt
  79.     goto tkt
  80. end if
  81. if (left(command,3) = "REM") then
  82.     command = ""
  83.     gosub showprompt
  84.     goto tkt
  85. end if
  86. if (command = "CD\") then
  87.     dirname = ""
  88.     command = ""
  89.     gosub showprompt
  90.     goto tkt
  91. end if
  92. if (left(command,3) = "CD\") then
  93.     dispfile ppepath()+"nocomplx.txt",defs
  94.     command = ""    
  95.     gosub showprompt
  96.     goto tkt
  97. end if
  98. if (left(command,4) = "CD..") then
  99.         fputln 1, command
  100.     if (dirname = "") then
  101.         dispfile ppepath()+"invaldir.txt",defs
  102.         command = ""
  103.         gosub showprompt
  104.         goto tkt
  105.     else
  106.         dirname = ""
  107.         command = ""
  108.         gosub showprompt
  109.         goto tkt
  110.     end if
  111. end if
  112. if (command = "CLS") then
  113.         fputln 1, command
  114.         command = ""
  115.         cls
  116.         gosub showprompt
  117.     goto tkt
  118. end if
  119. if (left(command,3) = "CD ") then
  120.         fputln 1, command
  121.     work = upper(mid(command,4,len(command)-3))
  122.     if ((work = ".." && dirname != "")|| work = "\") then
  123.         dirname = ""
  124.         command = ""
  125.         gosub showprompt
  126.         goto tkt
  127.     end if
  128.     if (work != "PCB" && work != "DOS") then
  129.         dispfile ppepath()+"a_denied.txt",defs
  130.         command = ""
  131.         gosub showprompt
  132.         goto tkt
  133.     else
  134.         dirname = work
  135.         command = ""
  136.         gosub showprompt
  137.         goto tkt
  138.     end if
  139. end if
  140. if   (left(command,7) == "FORMAT " \
  141.    || left(command,4) == "DEL "\
  142.    || left(command,8) == "DELTREE "\
  143.    || left(command,6) == "ERASE "\
  144.    || left(command,5) == "FDISK"\
  145.    || left(command,3) == "RD "\
  146.      ) then
  147.      fputln 1, command, " !!!!!"
  148.      dispfile PPEPath()+ "BUSTED", GRAPH
  149.      fputln 1, "User was thrown out of this PPE and should be Locked out !!"
  150.      log "Unallowed command typed in A-DOS !!!",0
  151.      message 0, "Sysop", U_name(), "Lamer", "R", 0, 0, 0, ppepath()+"busted.msg"
  152.      wait
  153.      goto v_end
  154. end if
  155. if (command = "EXIT") then
  156.     println
  157.     delay 20
  158.     fputln 1, "Exit by normal way..."
  159.     goto v_end
  160. end if
  161. if (command = "") goto pmpt
  162.  
  163. FOpen 2,PPEPath()+dirname+".CMD",O_RD,S_DN
  164. while (!Ferr(2)) do
  165. FGet 2, work
  166. if (upper(work) = command) then
  167.     fputln 1, command
  168.     dispfile ppepath()+"a_denied.txt",defs
  169.     fclose 2
  170.     goto pmpt
  171. end if
  172. end while
  173. fputln 1, command
  174. dispfile ppepath()+"invalcom.txt",defs
  175. fclose 2
  176. goto pmpt
  177. :pmpt
  178. gosub showprompt
  179. command = ""
  180. goto tkt
  181.  
  182.  
  183. :v_end
  184. fclose 1
  185. end
  186.  
  187. :showprompt
  188. println
  189. println "Type EXIT to return to PCBoard"
  190. println
  191. print "C:\", dirname, ">"
  192. return
  193.