[WMCTF2020]easy_re 题解

简介: [WMCTF2020]easy_re 题解

发现了一个base64编码的函数

提取base64编码表

base64_data=[0x40,0x2c,0x2e,0x31,0x66,0x67,0x76,0x77,0x23,0x60,0x2f,0x32,0x65,0x68,0x75,0x78,0x24,0x7e,0x22,0x33,0x64,0x69,0x74,0x79,0x25,0x5f,0x3b,0x34,0x63,0x6a,0x73,0x7a,0x5e,0x2b,0x7b,0x35,0x62,0x6b,0x72,0x41,0x26,0x3d,0x7d,0x36,0x61,0x6c,0x71,0x42,0x2a,0x2d,0x5b,0x37,0x30,0x6d,0x70,0x43,0x28,0x29,0x5d,0x38,0x39,0x6e,0x6f,0x44]
base64_table=''
for i in range(len(base64_data)):
    base64_table+=chr(base64_data[i])
print(base64_table)

得到编码表@,.1fgvw#`/2ehux$~"3dity%_;4cjsz^+{5bkrA&=}6alqB*-[70mpC()]89noD

编写解密脚本

import base64
str1 = "_r-+_Cl5;vgq_pdme7#7eC0="
base64_table = "@,.1fgvw#`/2ehux$~\"3dity%_;4cjsz^+{5bkrA&=}6alqB*-[70mpC()]89noD"
base64_str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
decoded_str = base64.b64decode(str1.translate(str.maketrans(base64_table, base64_str)))
print(decoded_str)

flag{change53233}

相关文章
|
6月前
|
Go
golang力扣leetcode 279.完全平方数
golang力扣leetcode 279.完全平方数
48 0
|
6月前
|
Go
golang力扣leetcode 125背包问题(二)
golang力扣leetcode 125背包问题(二)
61 0
|
6月前
|
存储 Go
golang力扣leetcode 64.最小路径和
golang力扣leetcode 64.最小路径和
30 0
|
3月前
|
算法 C++
POJ 3740 Easy Finding题解
这篇文章提供了一个使用舞蹈链(Dancing Links)算法解决POJ 3740 "Easy Finding" 问题的C++代码实现,该问题要求找出矩阵中能够使每一列都恰好包含一个1的行集合。
|
6月前
|
Go
[leetcode ~go]三数之和 M
[leetcode ~go]三数之和 M
|
6月前
|
算法 Go
golang力扣leetcode 169.多数元素
golang力扣leetcode 169.多数元素
28 0
|
6月前
|
Go
golang力扣leetcode 92背包问题
golang力扣leetcode 92背包问题
33 0
|
6月前
|
Go
golang力扣leetcode 704.二分查找
golang力扣leetcode 704.二分查找
30 0
|
6月前
|
Go
golang力扣leetcode 72.编辑距离
golang力扣leetcode 72.编辑距离
46 0
|
存储
easy_Maze 题解
easy_Maze 题解
61 1