This repository has been archived by the owner on Jul 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAnonymous.py
2927 lines (2763 loc) · 160 KB
/
Anonymous.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
''' Copyright 2017 Jishan Bhattacharya
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
'''
import Tkinter
from Tkinter import *
import tkMessageBox
from PIL import Image, ImageTk
import ctypes
from LOADING import Loading
import time
from printf import *
from sys import exit
from random import randint
from getpass0 import getpass
import os
from colorama import init
import pickle
import winsound
import matrix
from credits import credits
from gameover import gameover
import datetime
init()
ctypes.windll.kernel32.SetConsoleTitleA("THE ANONYMOUS")
ctypes.windll.user32.ShowWindow( ctypes.windll.kernel32.GetConsoleWindow(), 0 )
def windows():
bgsound()
class Enduseragreement(object):
def continu(self):
self.root.destroy()
time.sleep(1)
ctypes.windll.user32.ShowWindow( ctypes.windll.kernel32.GetConsoleWindow(), 5 )
printf("\n\nYou will be soon prompted with a registration window to complete your profile.")
ctypes.windll.user32.ShowWindow( ctypes.windll.kernel32.GetConsoleWindow(), 0 )
bgsound()
time.sleep(3)
def __init__(self, root):
self.root = root
self.root.iconbitmap(default = 'Images/favicon.ico')
self.root.title('End User Agreement')
self.root.resizable(0,0)
canvas = Canvas(self.root, height = 500, width = 500, relief = FLAT)
img = ImageTk.PhotoImage(file = 'Images/img.jpg')
image = canvas.create_image(250, 250, image = img)
canvas.create_text(250, 30, font = ('NeuropolXRg-Regular', '25', 'bold'), text = 'Terms & Conditions', fill = 'red', activefill = 'green')
a_text = """
\nBefore continuing, you must accept terms and conditions. By accepting, you agree to join Anonymous hacking group. Our authority won't responsible if you encounter any trouble. You are always free to join here. You will be taking your own decision and if you wish you may quit now. But you cannot leave once you continue. \n\nRemember hacking is illegal. There's always a chance of getting caught or backtraced which results in severe punishment including lifetime imprisonment and death. \n\nYou are always welcome once you made your mind.
"""
canvas.create_text(250, 200, font = ('NeuropolXRg-Regular', '10'), text = a_text, fill = 'green', activefill = 'yellow', width = 500, justify = LEFT)
canvas.pack()
self.w = 500
self.h = 500
self.ws = self.root.winfo_screenwidth()
self.hs = self.root.winfo_screenheight()
self.x = (self.ws/2) - (self.w/2)
self.y = (self.hs/2) - (self.h/2)
self.root.geometry('%dx%d+%d+%d' % (self.w, self.h, self.x, self.y))
self.continueimg = ImageTk.PhotoImage(Image.open('Buttons/continue.jpg'))
self.cont = Button(self.root, font = ('NeuropolXRg-Regular', '8'), image = self.continueimg, bd = 0, activebackground = 'black', activeforeground = 'white', command = self.continu)
self.cont.pack()
self.cont.place(height = 50, width = 100, x = 380, y = 430)
self.cont.config(state = DISABLED)
def callback(*args):
if self.checkvar.get() == 1:
self.cont.config(state = NORMAL)
else:
self.cont.config(state = DISABLED)
self.checkvar = IntVar()
self.check = Checkbutton(self.root, font = ('NeuropolXRg-Regular', '6'), text = 'I ACCEPT', variable = self.checkvar, command = callback)
self.check.place(x = 20, y = 400)
self.root.mainloop()
secondroot = Tk()
useragreement = Enduseragreement(secondroot)
class Registration(Label):
def __init__(self, root, filename):
im = Image.open(filename)
seq = []
try:
while 1:
seq.append(im.copy())
im.seek(len(seq)) # skip to next frame
except EOFError:
pass
try:
self.delay = im.info['duration']
except KeyError:
self.delay = 100
first = seq[0].convert('RGBA')
self.frames = [ImageTk.PhotoImage(first)]
Label.__init__(self, root, image=self.frames[0])
temp = seq[0]
for image in seq[1:]:
temp.paste(image)
frame = temp.convert('RGBA')
self.frames.append(ImageTk.PhotoImage(frame))
self.idx = 0
self.cancel = self.after(self.delay, self.play)
self.root = root
self.root.iconbitmap(default = 'Images/favicon.ico')
self.root.title('Registration')
self.root.resizable(0,0)
self.w = 500
self.h = 500
self.ws = self.root.winfo_screenwidth()
self.hs = self.root.winfo_screenheight()
self.x = (self.ws/2) - (self.w/2)
self.y = (self.hs/2) - (self.h/2)
self.root.geometry('%dx%d+%d+%d' % (self.w, self.h, self.x, self.y))
self.root.configure(background = 'grey')
self.image = Image.open('Images/image1.jpg')
self.photo_image = ImageTk.PhotoImage(self.image)
self.label = Label(root, image = self.photo_image, bd = 0)
self.label.pack(side = BOTTOM)
self.name = Label(root, text = 'NAME', font = ('Times New Roman', '8', 'bold'), bg = 'black', fg = 'white')
self.name.place(width = 50, height = 20, x = 40, y = 280)
self.namevariable = StringVar()
vcmd = (root.register(self.validname), '%d', '%i', '%P', '%s', '%S', '%v', '%V', '%W')
self.user = Entry(root, width = 30, textvariable = self.namevariable, validate = "key", validatecommand = vcmd)
self.user.place(x = 100, y = 280)
self.user.focus()
self.age = Label(root, text = 'AGE', font = ('Times New Roman', '8', 'bold'), bg = 'black', fg = 'white')
self.age.place(width = 50, height = 20, x = 40, y = 320)
vcmd = (root.register(self.validage), '%d', '%i', '%P', '%s', '%S', '%v', '%V', '%W')
self.agevar = IntVar()
self.userage = Spinbox(root, from_= 1, to = 100, justify = CENTER, width = 5, validate = "key", validatecommand = vcmd, wrap = True, textvariable = self.agevar)
self.userage.place(x = 100, y = 320)
self.sexvar = StringVar()
self.sex = Label(root, text = 'SEX', font = ('Times New Roman', '8', 'bold'), bg = 'black', fg = 'white')
self.sex.place(width = 50, height = 25, x = 40, y = 360)
self.male = Radiobutton(root, text = 'Male', variable = self.sexvar, value = 'Male')
self.male.place(x = 100, y = 360)
self.female = Radiobutton(root, text = 'Female', variable = self.sexvar, value = 'Female')
self.female.place(x = 165, y = 360)
self.sexvar.set('Male')
self.dob = Label(root, text = 'D.O.B', font = ('Times New Roman', '8', 'bold'), bg = 'black', fg = 'white')
self.dob.place(width = 50, height = 20, x = 40, y = 400)
self.daysvar = IntVar()
vcmd = (root.register(self.validdays), '%d', '%i', '%P', '%s', '%S', '%v', '%V', '%W')
self.days = Spinbox(root, from_ = 1, to = 31, justify = CENTER, width = 5, wrap = True, validate = 'key', validatecommand = vcmd, textvariable = self.daysvar)
self.days.place(x = 100, y = 400)
self.monthsvar = StringVar()
self.months = Spinbox(root, values = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), justify = CENTER, width = 5,wrap = True, state = 'readonly', textvariable = self.monthsvar)
self.months.place(x = 150, y = 400)
self.yearsvar = IntVar()
self.yearsvar.set('2017')
self.year = Spinbox(root, from_ = 1970, to = 2050, justify = CENTER, width = 5, wrap = True, state = 'readonly', textvariable = self.yearsvar)
self.year.place(x = 200, y = 400)
self.username = Label(root, text = 'USERNAME', font = ('Times New Roman', '8', 'bold'), bg = 'black', fg = 'white')
self.username.place(width = 80, height = 20, x = 40, y = 440)
self.uservariable = StringVar()
vcmd = (root.register(self.validusername), '%d', '%i', '%P', '%s', '%S', '%v', '%V', '%W')
self.entry = Entry(root, width = 30, validate = "key", validatecommand = vcmd, textvariable = self.uservariable)
self.entry.place(x = 130, y = 440)
self.password = Label(root, text = 'PASSWORD', font = ('Times New Roman', '8', 'bold'), bg = 'black', fg = 'white')
self.password.place(width = 80, height = 20, x = 40, y = 470)
self.passvariable = StringVar()
self.passentry = Entry(root, width = 30, show = '*', textvariable = self.passvariable)
self.passentry.place(x = 130, y = 470)
self.registerimg = ImageTk.PhotoImage(Image.open('Buttons/register.jpg'))
self.register = Button(root, font = ('NeuropolXRg-Regular', '8'), image = self.registerimg, bd = 0, activebackground = 'black', activeforeground = 'white', command = self.registration)
self.register.pack()
self.register.place(height = 50, width = 100, x = 390, y = 440)
def validname(self, d, i, P, s, S, v, V, W):
if S in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ':
return True
else:
self.bell()
return False
def validage(self, d, i, P, s, S, v, V, W):
if P in str(range(1, 101)):
return True
else:
self.bell()
return False
def validdays(self, d, i, P, s, S, v, V, W):
if P in str(range(1, 32)):
return True
else:
self.bell()
return False
def validusername(self, d, i, P, s, S, v, V, W):
if S in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSRTUVWXYZ1234567890_':
return True
else:
self.bell()
return False
def registration(self):
if (self.daysvar.get() == 30 or self.daysvar.get() == 31) and self.monthsvar.get() == 'Feb':
tkMessageBox.showerror('ERROR', 'Selected day does not exist.')
elif not ' ' in self.namevariable.get():
tkMessageBox.showerror('ERROR', 'Full name is required')
elif (datetime.datetime.now().year - self.yearsvar.get()) != self.agevar.get():
tkMessageBox.showerror('ERROR', 'Incorrect D.O.B.')
elif (self.yearsvar.get() % 4 != 0) and self.daysvar.get() == 29:
tkMessageBox.showerror('ERROR', 'Selected day does not exist.')
else:
self.after_cancel(self.cancel)
self.root.destroy()
winsound.PlaySound(None, winsound.SND_PURGE)
time.sleep(1)
ctypes.windll.user32.ShowWindow( ctypes.windll.kernel32.GetConsoleWindow(), 5)
clear = lambda: os.system('cls')
time.sleep(1)
clear()
printf('You are successfully registered to the team. \nAccording to the terms and conditions we won\'t be responsible if you encounter any trouble. \nAny illegal actions of yours which void our terms would be lethal for you. \nYou are given a terminal. Get there and explore yourself. \nYou will soon be contacted for a contract.')
time.sleep(1)
origame()
def play(self):
self.config(image=self.frames[self.idx])
self.idx += 1
if self.idx == len(self.frames):
self.idx = 0
self.cancel = self.after(self.delay, self.play)
thirdroot = Tk()
global user
global register
register = Registration(thirdroot, 'Images/tuhin.gif')
user = register.uservariable.get()
register.pack()
thirdroot.mainloop()
def origame():
print "\x1b[1m\x1b[32m"
global register
global user
try:
user = pickle.load(open('savegame0.dat', 'rb'))
except:
user = register.uservariable.get()
class Scene(object):
def enter(self):
printf("This scene is not yet configured. Subclass it and implement enter().")
exit(1)
class Engine(object):
level = [1]
def __init__(self, scene_map):
self.scene_map = scene_map
def play(self):
if os.path.isfile('savegame2.dat') == False:
current_scene = self.scene_map.opening_scene()
last_scene = self.scene_map.next_scene('finished')
death_scene = self.scene_map.next_scene('death')
else:
scene_name = pickle.load(open('savegame2.dat', 'rb'))
current_scene = self.scene_map.next_scene(scene_name)
last_scene = self.scene_map.next_scene('finished')
death_scene = self.scene_map.next_scene('death')
try:
i = pickle.load(open('savegame1.dat', 'rb'))
except:
i = 1
while current_scene != last_scene and current_scene != death_scene and i < 9:
print '\n'
print "-" * 125
print "\t\t\t\t\tYOU HAVE SUCCESSFULLY REACHED LEVEL %d\n" % i
print "-" * 125
print '\n'
pickle.dump(i, open("savegame1.dat", 'wb'))
if os.path.isfile('savegame0.dat') == False:
registers = register.uservariable.get()
pickle.dump(registers, open("savegame0.dat", 'wb'))
Engine.level.pop()
Engine.level.append(i)
next_scene_name = current_scene.enter()
current_scene = self.scene_map.next_scene(next_scene_name)
i += 1
current_scene.enter()
class Death(Scene):
quips = [
"\n\nYou probably failed to uninstall the 'Undelete', so the Anonymous group can no longer rely on you.",
"\n\nThe police couldn't figure out the password anymore and the data was permanently deleted, letting Esta escape.",
"\n\nThe security system triggered and you fell in a trap. \nLater the police came and arrested you.",
"\n\nThe security system located you and you got caught. You spend the rest of your life behind bars.",
"\n\nYou lost control of your system and the hacker successfully hacked into your database. \nHe published your personal details, and within a few days, you are behind the bars you are likely to be behind for the rest of your life.",
"\n\nI no longer have access to your database. Please start a new game."
]
def enter(self):
if Engine.level == [1]:
printf(Death.quips[5])
time.sleep(2)
gameover()
return 'death'
elif Engine.level == [3]:
printf(Death.quips[0])
time.sleep(3)
gameover()
return 'death'
elif Engine.level == [4]:
printf(Death.quips[1])
time.sleep(3)
gameover()
return 'death'
elif Engine.level == [5]:
printf(Death.quips[2])
time.sleep(3)
gameover()
return 'death'
elif Engine.level == [6]:
printf(Death.quips[3])
time.sleep(3)
gameover()
return 'death'
else:
print "\x1b[32m\x1b[1m"
printf(Death.quips[4])
time.sleep(3)
gameover()
return 'death'
class Level1(Scene):
def animate(self, a, b):
winsound.PlaySound(None, winsound.SND_PURGE)
def printf0(s):
for c in s:
sys.stdout.write('%s' % c)
sys.stdout.flush()
time.sleep(0.0203)
print "\n" + a,
t_end = time.time() + b
while time.time() < t_end:
sys.stdout.write('\x1b[K')
printf0("......\b\b\b\b\b\b")
printf0("\n")
def enter(self):
time.sleep(1)
print "$Terminal:~ "
time.sleep(2)
Level1().animate("Checking your database", 5)
time.sleep(0.5)
print "\nChecking database complete."
time.sleep(1)
try:
print "\n"
printf("\t\t\t--------------------------------------------------------------")
print "\n\t\t\t| BIODATA |"
printf("\t\t\t--------------------------------------------------------------")
time.sleep(1)
print "\n\t\t\t|NAME %s " % register.namevariable.get()
print "\n\t\t\t|AGE %d " % register.agevar.get()
print "\n\t\t\t|SEX %s " % register.sexvar.get()
print "\n\t\t\t|DOB %s %s %d " % (register.daysvar.get(), register.monthsvar.get(), register.yearsvar.get())
print "\n\t\t\t|USERNAME %s " % register.uservariable.get()
print "\n\t\t\t|PASSWORD %s " % register.passvariable.get()
printf("\t\t\t--------------------------------------------------------------")
print "\n"
time.sleep(2)
except:
return 'death'
printf('\nHi! I am TX001. I will be assisting you. I am an AI installed on your terminal. \nI have been programmed to automate various tasks and also to check on you from time to time. \nI am activated whenever there\'s a need to deliver information. \nI may go through your mail and sometimes help you to understand the system. \nI can also check your system\'s health. \nI run a priority scan whenever I encounter a system with bugs. \nYou may manually run the scan with the \'runsc\' command. \nYou can get the available commands in your system by typing \'help\'. \nI will see you again once you successfully log into your terminal.\n\n')
time.sleep(1)
bgsound()
while True:
name = raw_input('Username: ')
password = getpass('Password: ')
if (name == register.uservariable.get()) and (password == register.passvariable.get()):
winsound.PlaySound(None, winsound.SND_PURGE)
time.sleep(1)
print "\nChecking user..."
time.sleep(1)
print "User profile matched..."
time.sleep(1)
print "%s$Terminal:~ " % user
time.sleep(1)
return 'level2'
else:
print "\nInvalid username or password.\n"
class Level2(Scene):
def animateupdown(self, a):
print a,
x = ["%.3d" % i for i in range(101)]
for i in x:
time.sleep(0.2)
print "[%s]%%\b\b\b\b\b\b\b" % i,
sys.stdout.flush()
def cmnds(self):
print "\n"
print " List of available commands"
print "-----------------------------------------------------------------------------"
print "| Commands Descriptions "
print "-----------------------------------------------------------------------------"
print "| ls lists files and directories"
print "| ping <IP> Checks the status of remote server"
print "| mail Launches the mail program"
print "| forward(-f) mail/SN <IP> Forwards the given mail to given IP"
print "| connect<IP> Connects to the remote server"
print "| disconnect Terminates the connection "
print "| runsc Runs System Scan"
print "| help Shows this menu"
print "| TX001 Acitivates the AI"
print "|upload(-u) <FileName> <IP> Uploads the current file to the given IP"
print "|download(-d) <FileName> <IP> Downloads the current file from given IP"
print "\n"
def enter(self):
time.sleep(1)
Level1().animate("Local Host System Bootup", 5)
time.sleep(2)
print "Bootup complete."
print "Local Host Online at %s." % time.strftime("%d %B %Y %X")
print "All Rights Reserved."
time.sleep(2)
print "Initializing local modules..."
time.sleep(3)
print "Initialization successful."
time.sleep(1)
print "Activating TX001..."
time.sleep(4)
print "TX001 successfully activated.\n"
time.sleep(1)
printf("\nSo you have successfully logged into your terminal. Now to view the available commands type 'help'. \nYou will find some commands are yet unavailable. You will get them in higher levels. \nAs you play and complete the missions you earn achievements and your level increases.\nAs you level up you are tasked with hacking into more difficult systems. \nInitially during hacking I mask your IP to ensure that no traceback could locate you.\n\n")
bgsound()
while True:
x = raw_input('%s$Terminal:~ ' % user)
if x == 'help':
Level2().cmnds()
elif x == 'ls':
print "readme.txt"
time.sleep(1)
printf("To open any file simply enter its name.\n")
bgsound()
elif x == 'readme.txt':
print "USR: john, PASS: bght234, IP: 101.77.152.31"
elif x == 'ping':
print "ping <IP> (Currently this command is unavailable)"
elif x == 'mail':
time.sleep(1)
print "\nOpening mail..."
time.sleep(3)
print "-------------------------------------"
print " SN TITLE "
print "-------------------------------------"
print " 01 UN-NAMED "
print "-------------------------------------"
print "\n"
x = raw_input('%s$Terminal/mail:~ ' % user)
if x == '01':
print "\nJohn Adwik has been found to be a ridiculous man. He is running a self-organizing business and has some political impact. \nHe soon turned out to be a fucking nasty excuse for a businessman. He's even been bribing the local police and politicians. \nRecently, he has become violent, and tortured his family among other deplorable acts. \nSadly, at the moment, we have no hard evidence that would make us able to file a case against him. \nI want you to go and hack his computer. The details are below. \nIP: 101.77.152.31. \nUsername: john \nPass: bght234 \nIf you find anything incriminating or anything you think we should look into, upload it to us at 202.145.785.45.\n"
else:
print "To view the mail type the serial no."
elif x == "connect 101.77.152.31":
try:
time.sleep(1)
Level1().animate('Connecting', 7)
print "\n"
name = raw_input("Username: ")
password = getpass("Password: ")
if name == 'john' and password == 'bght234':
time.sleep(1)
print "\nLogin successful."
print "\n"
upload = False
forward = False
while True:
y = raw_input('John$Terminal:~ ')
if y == "help":
print "\n"
print " List of available commands"
print "-----------------------------------------------------------------------------"
print "| Commands Descriptions "
print "-----------------------------------------------------------------------------"
print "| ls lists files and directories"
print "| ping <IP> Checks the status of remote server"
print "| mail Launches the mail program"
print "| forward(-f) mail/SN <IP> Forwards the given mail to given IP"
print "| connect<IP> Connects to the remote server"
print "| disconnect Terminates the connection "
print "| help Shows this menu"
print "|upload(-u) <FileName> <IP> Uploads the current file to the given IP"
print "|download(-d) <FileName> <IP> Downloads the current file from given IP"
print "\n"
elif y == "ls":
print "note.txt"
elif y == "note.txt":
print "\nThere's my appointment in San Aldern at 8:34 P.M.\n"
elif y == 'ping':
print "ping <IP> (Currently this command is unavailable)"
elif y == "mail":
time.sleep(1)
print "\nOpening mail..."
time.sleep(3)
print "--------------------------------------"
print " SN TITLE "
print "--------------------------------------"
print " 01 DRUG-DEAL "
print " 02 ANNA "
print "--------------------------------------"
print "\n"
y = raw_input('John$Terminal/mail:~ ')
if y == '01':
print "\nYour deal has already been processed. The cost to be paid is $12034589. See you at 8:34 P.M."
print " ----------From Thomas"
elif y == '02':
print "\nHi honey! It's long sice we done up. Would you like to tea at my house at 6:45 P.M. ?\n"
else:
print "To view the mail type the serial no."
elif y == "connect":
print "Connect <IP>"
elif y == "disconnect":
time.sleep(2)
Level1().animate("Disconnecting", 3)
print "\nFailed to disconnect you at the moment."
elif y == "forward" or y == '-f':
print "Forward(-f) mail/SN <IP>"
elif (y == "upload note.txt 202.145.785.45" or y == "-u note.txt 202.145.785.45") and forward == False:
print "\n"
Level2().animateupdown("Uploading...")
print "File successfully uploaded.\n"
upload = True
elif (y == "forward mail/01 202.145.785.45" or y == "-f mail/01 202.145.785.45") and upload == True:
Level1().animate("Forwarding", 3)
print "\n"
print "Mail successfully forwarded.\n"
time.sleep(1)
printf("You have successfully completed your mission. You have a new message. \nReturn to your terminal to view it.\n\n")
y = raw_input('John$Terminal:~ ')
if y == 'disconnect':
time.sleep(2)
Level1().animate("Disconnecting", 3)
print "\n"
break
else:
printf("After completing the mission you don't have any right to access the terminal. I am disconnecting you...\n\n")
break
elif (y == "forward mail/01 202.145.785.45" or y == "-f mail/01 202.145.785.45") and upload == False:
print "\n"
Level1().animate("Forwarding", 3)
print "\n"
print "Mail successfully forwarded.\n"
forward = True
elif (y == "upload note.txt 202.145.785.45" or y == "-u note.txt 202.145.785.45") and forward == True:
print "\n"
Level2().animateupdown("Uploading...")
print "\n"
print "File successfully uploaded.\n"
time.sleep(1)
printf("You have successfully completed your mission. You have a new message. \nReturn to your terminal to view it.\n\n")
y = raw_input('\nJohn$Terminal:~ ')
if y == 'disconnect':
time.sleep(2)
Level1().animate("Disconnecting", 3)
print "\n"
time.sleep(1)
break
else:
printf("After completing the mission you don't have any right to access the terminal. I am disconnecting you...\n\n")
time.sleep(1)
break
elif y == "download" or y == '-d':
print "download(-d) <FileName> <IP>"
elif y == "upload" or y == '-u':
print "Upload(-u) <FileName> <IP>"
elif y == '':
y
else:
print "%r command does not exist." % y
break
else:
print "Invalid username or password."
except Exception:
print "Failed to connect."
elif x == 'connect':
print "Connect <IP>"
elif x == "disconnect":
time.sleep(1)
print "Invalid Request."
elif x == 'igiveup':
return 'level3'
elif x == "runsc":
time.sleep(1)
Level2().animateupdown("Running System Scan. Please wait...")
time.sleep(2)
print "\n"
print "System Health: Good"
print "Status: Clean"
elif x == "TX001":
printf("\nHi %s. By default I'm already activated and will give you any required info whenever there's a need for it.\n\n" % user)
bgsound()
elif x == "upload readme.txt 202.145.785.45" or x == "-u readme.txt 202.145.785.45" or x == "upload":
print "Currently uploading from your system is unavailable."
elif x == "download" or x == '-d':
print "Download(-d) <FileName> <IP>"
elif x == "forward" or x == "-f":
print "Forward mail/SN <IP>"
elif x == '':
x
else:
print "%r command does not exist." % x
print '%s$Terminal:~ ' % user
time.sleep(1)
printf("\nYou have been successfully disconnected. Type 'mail' to see check your message.\n\n")
bgsound()
while True:
x = raw_input('%s$Terminal:~ ' % user)
if x == "help":
Level2().cmnds()
elif x == "mail":
time.sleep(1)
print "\nOpening mail..."
time.sleep(3)
print "-------------------------------------"
print " SN TITLE "
print "-------------------------------------"
print " 01 UN-NAMED "
print " 02 UN-NAMED(2)"
print "-------------------------------------"
print "\n"
x = raw_input('%s$Terminal/mail:~ ' % user)
if x == '01':
print "\nJohn Adwik has been found to be a ridiculous man. He is running a self-organizing business and has some political impact. \nHe soon turned out to be a fucking nasty excuse for a businessman. He's even been bribing the local police and politicians. \nRecently, he has become violent, and tortured his family among other deplorable acts. \nSadly, at the moment, we have no hard evidence that would make us able to file a case against him. \nI want you to go and hack his computer. The details are below. \nIP: 101.77.152.31. \nUsername: john \nPass: bght234 \nIf you find anything incriminating or anything you think we should look into, upload it to us at 202.145.785.45.\n"
elif x == '02':
print "\nSo it seems that John has an underworld business of drug dealing.. \nHe had an appointment where he was going to meet with a famous drug dealer, Thomas Ed Alisa. \nThis would help us to suppress his attitude. \nWell done!\n"
time.sleep(2)
return 'level3'
else:
print "To view the mail type the serial no."
elif x == '':
x
else:
print "Your terminal is currently in upgrade. Commands are inaccessible."
class Level3(Scene):
def printinoneline(*s):
for i in s:
print '\r',
time.sleep(2)
print i,
sys.stdout.flush()
sys.stdout.write('\x1b[K')
def enter(self):
time.sleep(1)
Level1().animate("Local Host System Bootup", 5)
time.sleep(2)
print "Bootup complete."
print "Local Host Online at %s." % time.strftime("%d %B %Y %X")
print "All Rights Reserved."
print "\n"
Level3().printinoneline("Getting required modules...", "Applying Updates...", "Activating TX001...", "Checking log files...", "Cleaning junk files...", "Junk files successfully cleaned.")
printf("\nI found some junk files eating up the space. I cleaned them up. \nAs you level up you get some upgrades for your terminal. \nAnd since I'm the part of your terminal, you get some upgrades for me too ;) \n")
print "\n"
Level2().animateupdown("Installing packages...")
time.sleep(1)
printf("\nThere's a new mail for you.\n\n")
bgsound()
while True:
x = raw_input('%s$Terminal:~ ' % user)
if x == 'help':
Level2().cmnds()
elif x == 'ping':
print "ping <IP> (Currently this command is unavailable)"
elif x == 'mail':
time.sleep(1)
print "\nOpening mail..."
time.sleep(3)
print "-------------------------------------"
print " SN TITLE "
print "-------------------------------------"
print " 01 UN-NAMED "
print " 02 UN-NAMED(2)"
print " 03 UN-NAMED(3)"
print "\n"
x = raw_input('%s$Terminal/mail:~ ' % user)
if x == '01':
print "\nJohn Adwik has been found to be a ridiculous man. He is running a self-organizing business and has some political impact. \nHe soon turned out to be a fucking nasty excuse for a businessman. He's even been bribing the local police and politicians. \nRecently, he has become violent, and tortured his family among other deplorable acts. \nSadly, at the moment, we have no hard evidence that would make us able to file a case against him. \nI want you to go and hack his computer. The details are below. \nIP: 101.77.152.31. \nUsername: john \nPass: bght234 \nIf you find anything incriminating or anything you think we should look into, upload it to us at 202.145.785.45.\n"
elif x == '02':
print "\nSo it seems that John has an underworld business of drug dealing.. \nHe had an appointment where he was going to meet with a famous drug dealer, Thomas Ed Alisa. \nThis would help us to suppress his attitude. \nWell done!\n"
elif x == '03':
print "\nKenny Alam works as a Security Incharge at a reputable software company. He is very good at his job. \nHe has a family as well, which consists of his wife and his daughter, Alice. \nWith some deep research we also found that his son died 5 years ago in an car accident at around 13:45 in the afternoon. \nThere's not a bad bone in his body, and he's very popular on social media. \nUnfortunately, things have started taking a turn for the worse. \nRecently, the company he works for was hacked, and the police suspected the Incharge of causing the security breach. \nAlthough they seized Kenny's computer and searched it, no proof was found realated to the breach. \nThey believe that Kenny had deleted any incriminating information from his computer. \nConnect to his computer, the IP Address is 785.120.45.012, and see what you can find pertaining to this matter and upload it us at 202.145.785.45.\n"
else:
print "To view the mail type the serial no."
elif x == 'ls':
print "kenny.txt"
elif x == 'kenny.txt':
print "IP: 785.120.45.012"
elif x == "disconnect":
time.sleep(1)
print "Invalid Request."
elif x == "runsc":
time.sleep(1)
Level2().animateupdown("Running System Scan. Please wait...")
time.sleep(2)
print "\n"
print "System Health: Good"
print "Status: Clean"
elif x == 'igiveup':
return 'level4'
elif x == "TX001":
printf("\nHi %s. By default I'm already activated and will give you any required info whenever there's a need for it.\n\n" % user)
bgsound()
elif x == "upload kenny.txt 202.145.785.45" or x == "-u kenny.txt 202.145.785.45" or x == "upload":
print "Currently uploading from your system is unavailable."
elif x == "download" or x == '-d':
print "Download(-d) <FileName> <IP>"
elif x == "forward" or x == "-f":
print "Forward mail/SN <IP>"
elif x == '':
x
elif x == 'connect 785.120.45.012':
try:
time.sleep(1)
Level1().animate('Connecting', 7)
print "\n"
name = raw_input("Username: ")
password = getpass("Password: ")
if name == 'kenny' and password == 'alice1345':
print "\nLogin Successful"
time.sleep(1)
Level1().animate('System scanning', 10)
print "\n"
printf("I haven't found anything of note on this PC. You need to undelete the files and messages to reveal the secret. \nDownload the 'Undelete' tool from 112.145.10.236 and it should do rest automatically. \nNote that after finishing your job, don't forget to uninstall it.\n\n")
undelete = False
uninst = False
upload = False
forward = False
while True:
y = raw_input('kenny$Terminal:~ ')
if y == "help":
print "\n"
print " List of available commands"
print "-----------------------------------------------------------------------------"
print "| Commands Descriptions"
print "-----------------------------------------------------------------------------"
print "| ls lists files and directories"
print "| ping<IP> Checks the status of remote server"
print "| mail Launches the mail program"
print "| forward(-f) mail/SN <IP> Forwards the given mail to given IP"
print "| connect<IP> Connects to the remote server"
print "| disconnect Terminates the connection "
print "| help Shows this menu"
print "|upload(-u) <FileName> <IP> Uploads the current file to the given IP"
print "|download(-d) <FileName> <IP> Downloads the current file from given IP"
print "|uninstall <FileName> Uninstalls given file"
print "-----------------------------------------------------------------------------"
print "\n"
elif y == "ls" and undelete == False:
print "Files and Directories inaccessible."
elif y == 'ping':
print "ping <IP> (Currently this command is unavailable)"
elif y == "connect":
print "Connect <IP>"
elif y == "disconnect":
time.sleep(2)
Level1().animate("Disconnecting", 3)
print "\nFailed to disconnect you at the moment."
elif y == "download Undelete 112.145.10.236" or y == "-d Undelete 112.145.10.236":
time.sleep(1)
print "\n"
Level2().animateupdown("Downloading...")
time.sleep(1)
print "\n"
Level2().animateupdown("Installing...")
time.sleep(1)
print "\nSuccessfully installed Undelete."
time.sleep(2)
print "Initializing...",
time.sleep(3)
print "\r",
sys.stdout.write('\x1b[K')
Level2().animateupdown("Running a deep scan...")
time.sleep(0.5)
print "\nScan successfully completed."
time.sleep(0.5)
Level2().animateupdown("Recovering deleted files...")
time.sleep(1)
print "\nSuccessfully recovered deleted files.\n"
undelete = True
elif y == "uninstall Undelete":
time.sleep(1)
Level1().animate("Uninstalling", 6)
time.sleep(1)
print "\nSuccessfully uninstalled Undelete."
uninst = True
elif y == "mail" and undelete == False:
time.sleep(1)
print "\nOpening mail..."
time.sleep(3)
print "-------------------------------------"
print " SN TITLE "
print "-------------------------------------"
print " NO MESSAGES "
print "\n"
elif y == "ls" and undelete == True:
print "Diary.txt"
elif y == 'Diary.txt':
print "It's been five years since I lost my son. \nPublicly it was an accident, but in reality, it wasn't. \nAfter five years I found that my boss, the person I've been working under all these years, was the culprit behind my son's death. \nI won't be allowing him to live peacefully. I'll do something."
print " Kenny "
elif y == 'mail' and undelete == True:
time.sleep(1)
print "\nOpening mail..."
time.sleep(3)
print "-------------------------------------"
print " SN TITLE "
print "-------------------------------------"
print " 01 ME "
print " 02 Honey "
print "\n"
y = raw_input('kenny$Terminal/mail:~ ')
if y == '01':
print "Hi honey, I'll be arriving late today. Gotta do some important work. Don't wait for me.\n"
elif y == '02':
print "Why what happened ?\n"
else:
print "To view the mail type the serial no."
elif (y == "upload Diary.txt 202.145.785.45" or y == "-u Diary.txt 202.145.785.45") and forward == False:
print "\n"
Level2().animateupdown("Uploading...")
print "\n"
print "File successfully uploaded."
upload = True
elif (y == "forward mail/01 202.145.785.45" or y == "-f mail/01 202.145.785.45") and upload == True and uninst == True:
print "\n"
Level1().animate("Forwarding", 3)
print "\n"
print "Mail successfully forwarded."
time.sleep(1)
printf("You have successfully completed your mission. You have a new message. \nReturn to your terminal to view it.\n\n")
y = raw_input('kenny$Terminal:~ ')
if y == 'disconnect':
time.sleep(2)
Level1().animate("Disconnecting", 3)
time.sleep(1)
break
else:
printf("After completing the mission you don't have any right to access the terminal. I am disconnecting you...")
time.sleep(1)
break
elif (y == "forward mail/01 202.145.785.45" or y == "-f mail/01 202.145.785.45") and upload == False:
print "\n"
Level1().animate("Forwarding", 3)
print "\n"
print "Mail successfully forwarded."
forward = True
elif y == "upload Diary.txt 202.145.785.45" or y == "-u Diary.txt 202.145.785.45" and forward == True and uninst == True:
print "\n"
Level2().animateupdown("Uploading...")
print "\n"
print "File successfully uploaded.\n"
time.sleep(1)
printf("You have successfully completed your mission. You have a new message. \nReturn to your terminal to view it.\n\n")
y = raw_input('kenny$Terminal:~ ')
if y == 'disconnect':
time.sleep(2)
Level1().animate("Disconnecting", 3)
time.sleep(1)
break
else:
printf("After completing the mission you don't have any right to access the terminal. I am disconnecting you...")
time.sleep(1)
break
elif y == '':
x
elif (y == "forward mail/01 202.145.785.45" or y == "-f mail/01 202.145.785.45") and upload == True and uninst == False:
print "\n"
Level1().animate("Forwarding", 3)
print "\n"
print "Mail successfully forwarded."
time.sleep(1)
printf("You have successfully completed your mission. You have a new message. \nReturn to your terminal to view it.\n\n")
y = raw_input('kenny$Terminal:~ ')
if y == 'disconnect':
time.sleep(2)
Level1().animate("Disconnecting", 3)
return 'death'
else:
printf("After completing the mission you don't have any right to access the terminal. I am disconnecting you...")
time.sleep(1)
return 'death'
elif (y == "upload Diary.txt 202.145.785.45" or y == "-u Diary.txt 202.145.785.45") and forward == True and uninst == False:
print "\n"
Level2().animateupdown("Uploading...")
print "\n"
print "File successfully uploaded.\n"
time.sleep(1)
printf("You have successfully completed your mission. You have a new message. \nReturn to your terminal to view it.\n\n")
y = raw_input('kenny$Terminal:~ ')
if y == 'disconnect':
time.sleep(2)
Level1().animate("Disconnecting", 3)
time.sleep(1)
return 'death'
else:
printf("After completing the mission you don't have any right to access the terminal. I am disconnecting you...")
time.sleep(1)
return 'death'
else:
print "%r command does not exist." % y
break
else:
print "Invalid username or password."
except Exception:
print "Failed to connect."
else:
print "%r command does not exist." % x
time.sleep(2)
print "\n"
print '%s$Terminal:~ ' % user
time.sleep(1)
printf("\nYou have been successfully disconnected. Type 'mail' to see check your message.\n\n")
bgsound()
while True:
x = raw_input('%s$Terminal:~ ' % user)
if x == "help":
Level2().cmnds()
elif x == "mail":