Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from os import chdir
- from glob import glob
- def dfs(s):
- s = s[0]
- #print('s = ', s)
- typ = s[-1]
- #print(typ)
- if typ == '+':
- return dfs(glob(s+"/0_*")) + dfs(glob(s+"/1_*"))
- if typ == 'x':
- return dfs(glob(s+"/0_*")) * dfs(glob(s+"/1_*"))
- if typ == 'r':
- #print('path = ', s)
- return int(open(s).read())
- for i in range(37):
- chdir("flag["+str(i)+"]/")
- print(chr(dfs(glob("0_*"))), end = '')
- chdir("..")
Advertisement
Add Comment
Please, Sign In to add comment