base16解题方法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import base64
s = "633765666566653461316130643465386535613065366563653165376130653966336261613065366563653165376662623865346238623665346235623162346236623665326233623565316230653662326238623562336533653665336535623262336238623365346230623562336664"
s1 = str(base64.b16decode(s))[2:-1:1]
print(s1)
j = 0
s2 = ""
d = []
i = ''
for i in str(s1):
j = j + 1
s2 = s2 + i
if(j%2==0):
d.append(s2)
s2 = ""

for q in range(1,300):
s = ""
for i in d:
s = s + chr(int(i,16)%q)
if "flag" in s:
print (s)
print(d)