Last active
April 8, 2021 12:03
-
-
Save st98/506b7fc05a0efce6c9d5134777157ac0 to your computer and use it in GitHub Desktop.
InterKosenCTF - [Crypto] Oh my Hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `dmin, cdmin, edmin, idmin, qdmin, Admin, !dmin | |
s = '''3dbd6c666db1e6ecbf391ff37622f30f | |
bdbd48266da0fee8dd190fe16e26f3cf | |
2d9f446765b1cefd95980fa35e32f24f | |
1dac5c6e7db1aee08d11a7e33c8ef15f | |
3d3d6c664d31fef8bd1d4ee36f32f3cf | |
3cbd4c662ca1eec8dd11afc35c0e634e | |
3db5c4626db3eef8151d0be37f27e347'''.splitlines() | |
s = [bin(int(c, 16))[2:].rjust(128, '0') for c in s] | |
res = '' | |
for i in range(128): | |
cnt = 0 | |
for c in s: | |
if c[i] == '0': | |
cnt += 1 | |
res += '0' if cnt > 3 else '1' | |
print(hex(int(res, 2))[2:]) # => 出力された token をセットすると KOSENCTF{PADDING_MAKES_THIS_MORE_VULNERABLE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment