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
|
def checker(inp):
for keyword in [ "eval", "exec", "import", "open", "os", "read", "system", "write", "subprocess", "str", "flag", "import", "cat", "63", ]: if keyword in inp: print(f" Nope, {keyword} is banned! ") break else: o = exec(inp, {}, {}) if o is not None: print(o)
print( "------------------------------------------------------------- \n WELCOME TO THE BLINDJAIL \n --------------------------------------------------------\n " "\x1B[3m fret not that you cannot see, fret that you cannot leave.\x1B[0m " ) while True: try: inp = input(">>> ") if inp.lower() == "exit": break checker(inp) except KeyboardInterrupt: print("\nBye!") break except EOFError: print("\nBye!") break except BaseException as e: print("look for the light! \n", e.args)
|