Vault door 5
In the last challenge, you mastered octal (base 8), decimal (base 10), and hexadecimal (base 16) numbers, but this vault door uses a different change of base as well as URL encoding!
Last updated
In the last challenge, you mastered octal (base 8), decimal (base 10), and hexadecimal (base 16) numbers, but this vault door uses a different change of base as well as URL encoding!
Last updated
from pybase64 import b64decode
string = "JTYzJTMwJTZlJTc2JTMzJTcyJTc0JTMxJTZlJTY3JTVm"+ "JTY2JTcyJTMwJTZkJTVmJTYyJTYxJTM1JTY1JTVmJTM2"+ "JTM0JTVmJTM4JTM0JTY2JTY0JTM1JTMwJTM5JTM1"
decoded = b64decode(string).decode('utf-8')
replaced = decoded.replace("%"," 0x") #we need to reverse the binary conversion ".format(%%%2x)"
# %%% means add perfectange sign first % is to start, last to exit
#2x refers to changing to hexadecimal, thus we need to convert it back to original numbers
print(replaced)
characters = replaced.split(" ")
output = "picoCTF{"
for ch in characters:
if ch != '':
output += chr(int(ch,16))
print(output+"}")