a = ['T', 'h', 'i', 's', 'I', 's', 'T', 'h', 'e', 'F', 'l', 'a', 'g', 'H', 'o', 'm', 'e']
b = ['p', 'v', 'k', 'q', '{', 'm', '1', '6', '4', '6', '7', '5', '2', '6', '2', '0', '3', '3', 'l', '4', 'm', '4', '9', 'l', 'n', 'p', '7', 'p', '9', 'm', 'n', 'k', '2', '8', 'k', '7', '5', '}']
x = [''] * 17
y = [''] * 38
for i in range(17):
if (a[i] < 'I' and a[i] >= 'A') or (a[i] < 'i' and a[i] >= 'a'):
x[i] = chr(ord(a[i]) + 18)
elif (a[i] >= 'A' and a[i] <= 'Z') or (a[i] >= 'a' and a[i] <= 'z'):
x[i] = chr(ord(a[i]) - 8)
else:
x[i] = a[i]
m = ''.join(x)
for i2 in range(38):
if (b[i2] >= 'A' and b[i2] <= 'Z') or (b[i2] >= 'a' and b[i2] <= 'z'):
y[i2] = chr(ord(b[i2]) + 16)
if (y[i2] > 'Z' and y[i2] < 'a') or y[i2] >= 'z':
y[i2] = chr(ord(y[i2]) - 26)
else:
y[i2] = b[i2]
n = ''.join(y)
print(n)
标签:BUUCTF,17,i2,chr,findit,ord
From: https://www.cnblogs.com/azwhikaru/p/17292507.html