디코딩을 거친 $decode_id
가 admin
이고 $decode_pw
가 nimda
이면 플래그를 준다. 디코딩 과정을 거꾸로 따라가면 user
와 password
에 넣어야 하는 값을 구할 수 있다.
import base64
decode_id = b'admin'
decode_pw = b'nimda'
for i in range(20):
decode_id = base64.b64encode(decode_id)
decode_pw = base64.b64encode(decode_pw)
decode_id = decode_id.replace(b"1", b"!")
decode_id = decode_id.replace(b"2", b"@")
decode_id = decode_id.replace(b"3", b"$")
decode_id = decode_id.replace(b"4", b"^")
decode_id = decode_id.replace(b"5", b"&")
decode_id = decode_id.replace(b"6", b"*")
decode_id = decode_id.replace(b"7", b"(")
decode_id = decode_id.replace(b"8", b")")
decode_pw = decode_pw.replace(b"1", b"!")
decode_pw = decode_pw.replace(b"2", b"@")
decode_pw = decode_pw.replace(b"3", b"$")
decode_pw = decode_pw.replace(b"4", b"^")
decode_pw = decode_pw.replace(b"5", b"&")
decode_pw = decode_pw.replace(b"6", b"*")
decode_pw = decode_pw.replace(b"7", b"(")
decode_pw = decode_pw.replace(b"8", b")")
print(b'user: ' + decode_id)
print(b'password: ' + decode_pw)
$ python3 solve.py
b'user: Vm0wd@QyUXlVWGxWV0d^V!YwZDRWMVl$WkRSV0!WbDNXa!JTVjAxV@JETlhhMUpUVmpBeFYySkVUbGhoTVVwVVZtcEJlRll&U@tWVWJHaG9UVlZ$VlZadGNFSmxSbGw!VTJ0V!ZXSkhhRzlVVmxaM!ZsWmFjVkZ0UmxSTmJFcEpWbTEwYTFkSFNrZGpSVGxhVmpOU!IxcFZXbUZrUjA!R!UyMTRVMkpIZHpGV!ZFb$dWakZhV0ZOcmFHaFNlbXhXVm!wT!QwMHhjRlpYYlVaclVqQTFSMWRyV@&kV0!ERkZVbFJHVjFaRmIzZFdha!poVjBaT@NtRkhhRk&sYlhoWFZtMXdUMVF$TUhoalJscFlZbGhTV0ZSV@FFTlNiRnBZWlVaT!ZXSlZXVEpWYkZKRFZqQXhkVlZ!V@xaaGExcFlXa!ZhVDJOc@NF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