suctf2018-babyre

Author Avatar
Xzhah 5月 27, 2018
  • 在其它设备中阅读本文章

suctf2018-babyre @xzh3ha

思路

base64的表被替换了

解题脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*
from base64 import * #魔改base64 魔改rc4

b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
table = 'R9Ly6NoJvsIPnWhETYtHe4Sdl+MbGujaZpk102wKCr7/ODg5zXAFqQfxBicV3m8U'


def tb64encode(s):
tmp = b64encode(s)

ans = ''

for i in tmp:
ans += table[b64.index(i)]
print ans
return ans

def tb64decode(s):
ans = ''
for i in s:
ans += b64[table.index(i)]
print ans
return b64decode(ans)




ans = 'eQ4y46+VufZzdFNFdx0zudsa+yY0+J2m'

ans = tb64decode(ans)
print ans

flag :SUCTF{wh0_1s_y0ur_d4ddy}