+10
-4
game/greghackgame.py
+10
-4
game/greghackgame.py
···
1
1
import os
2
-
import inquirer
2
+
import sys
3
+
try:
4
+
import inquirer
5
+
except:
6
+
print("Please install inquirer with pip install inquirer!")
7
+
print("GregHack will now quit.")
8
+
sys.exit()
3
9
import requests
4
10
5
11
def cls():
···
17
23
menu = [
18
24
inquirer.List('start',
19
25
message="GregHack Launcher by Freakybob Team",
20
-
choices=['Start and Download Levels', 'Exit'],
26
+
choices=['Start','Download Levels', 'Exit'],
21
27
),
22
28
]
23
29
24
30
answers = inquirer.prompt(menu)
25
31
26
-
if (answers['start'] == "Start and Download Levels"):
32
+
if (answers['start'] == "Download Levels"):
27
33
print("This will download Level 1 for playing.")
28
34
url = 'https://github.com/Freakybob-Team/greghack/blob/main/game/levels/level1.py?raw=true'
29
35
response = requests.get(url)
···
35
41
file.write(response.content)
36
42
print('File downloaded successfully')
37
43
else:
38
-
print("Oops! There was an error and we couldn't download LigmaBalls.")
44
+
print("Oops! There was an error and we couldn't download GregHacks levels.")
39
45
print("Done! Level one has been downloaded from https://github.com/Freakybob-Team/greghack/tree/main/game/levels/level1.py")
40
46
exec(open('levels/level1.py').read())
+6
-1
game/levels/level1.py
+6
-1
game/levels/level1.py
···
1
1
import os
2
+
import webbrowser
3
+
import time
2
4
3
5
def cls():
4
6
os.system('cls' if os.name=='nt' else 'clear') # idk if we should use this but ill keep it in
5
7
print("GregHack Command Prompt")
6
8
print("Hi! Sorry, I should introduce myself. I'm the game.")
7
9
print("Your task is to hack into Bob's account.")
8
-
print("Go to https://greghack.freakybob.site and click on BaseLook.")
10
+
webbrowser.open("https://freakybob-team.github.io/greghack/game/game.html")
11
+
print("Click on BaseLook.")
9
12
print("It'll bring you to Bob's BaseLook.")
10
13
print("Now, type infosearch")
11
14
cmd = input()
···
16
19
cmd = input()
17
20
18
21
if (cmd.lower() == "infosearch"):
22
+
cls()
19
23
print("infosearch - very legal fr")
20
24
print("Great! Enter bob into the prompt below.")
21
25
name = input("name of person: ")
22
26
if (name == "bob"):
23
27
print("Searching...")
28
+
time.sleep(3)
24
29
print("Found!")
25
30
print("bob's BaseLook password found. catsarecool123")
26
31
print("Now, enter hack.")