repl.it
@DUN0040/

Download Complete

Python

No description

fork
loading
Files
  • main.py
  • local
  • Russian
  • steve
  • TechCompany
  • mail.py
  • russian.py
  • sEnding.py
  • steve.py
  • techcomp.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#game variables
GAME_NAME = "Download Complete"

pws = {"0":"StevieWonder","1":"applesauce","2":"motherrussia"}

#modules
from termcolor import cprint as c
from termcolor import colored
import replit
import os
import mail
import steve
from time import sleep
import random
import techcomp
import russian

#functions
def g(text):
  c(text,"green")

replit.clear()

#main
g("Welcome to "+GAME_NAME+".")
input(colored("[ENTER] to continue...","green"))
g("This is a text-based \"hacker\" story. This is based off of the mobile app, Hacker's Quest.")
input(colored("[ENTER] to continue...","green"))
while True:
  ALIAS = input(colored("What would you like your alias to be? (your nickname)\n","green"))
  correct = input(colored("You would like to be called "+ALIAS+". Is this correct? (y/n) ","green"))
  if correct == "y":
    break

replit.clear()

g("To get started, run \"h\" or \"help\" in the terminal. You can run that command nearly anywhere to get help on what you can do.\n\nSprinkleOS v0.3\nTerminal")

while True:
  cmd = input(colored(ALIAS+"#local> ","green"))
  if cmd == "help" or cmd == "h":
    g("\nLOCAL HELP\n(h)elp - Display this help menu\n(r)ead - Read a file on the computer\nlist (ls) - List all files on the computer\n(c)onnect - Connect to a computer remotely\n(m)ail - Check your mail < get started here\n")
  elif cmd == "ls" or cmd == "list":
    for root, dirs, files in os.walk("local/files"):  
      for filename in files:
        print(filename)
  elif cmd == "r" or cmd == "read":
    arg = input(colored("File name: ","green"))
    try:
      f = open("local/files/"+arg,"r")
      print("\n"+f.read()+"\n")
    except:
      g("Unable to read file, does it exist? Remember to include the file extension.")
  elif cmd == "m" or cmd == "mail":
    mail.start(ALIAS)
  elif cmd == "c" or cmd == "connect":
    g("What device would you like to connect to?\n0 - Steve\n1 - TechCompany\n2 - TechCompanyRU")
    con = input(colored(ALIAS+".connect> ","green"))
    p = input(colored(ALIAS+".connect password> ","green"))
    if p == pws.get(con):
      if con == "0":
        steve.start()
      elif con == "1":
        g("Initiating advanced hacking procedure...")
        sleep(3)
        fs = random.randint(0,2)
        if fs == 0:
          g("Procedure failure. Please try again!")
        else:
          g("Procedure success. Access obtained.")
          techcomp.start()
      elif con == "2":
        g("Initiating advanced hacking procedure...")
        sleep(3)
        fs = random.randint(0,2)
        if fs == 0:
          g("Procedure failure. Please try again!")
        else:
          g("Procedure success! Access obtained.")
          russian.start()
  elif cmd == "clear":
    replit.clear()
  else:
    g("Unknown command: "+cmd)