Created
November 22, 2017 08:01
-
-
Save anonymous/600c3a19626b20999a8f30768076a52c to your computer and use it in GitHub Desktop.
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
from Crypto.Util.number import * | |
size = 9 | |
def detransform(byte,n): | |
a = (byte << n) % 512 | |
b = byte >> (size - n) | |
return a | b | |
enc_flag = [361, 293, 84, 138, 197, 419, 189, 404, 216, 177, 383, 432, 344, 366, 87, 273, 419, 229, 254, 225, 349, 438, 140, 205, 107, 498, 163, 249, 206, 220, 105, 311, 315, 475, 44, 55, 355, 261, 434, 216, 249, 303, 60, 150, 493, 19, 291, 297, 184, 220, 206, 360, 303, 218, 301, 390, 343, 411, 420, 416, 70, 288, 400, 335] | |
flag = '' | |
for i in range(len(enc_flag) - 1): | |
enc_flag[i] = detransform(enc_flag[i],(i+3) % size ) | |
enc_flag[i] = detransform(enc_flag[i],i % size) | |
flag+= bin(enc_flag[i])[2:].zfill(size) | |
print long_to_bytes(int(flag,2)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment