[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}

相关文章
|
3月前
|
算法 C++
POJ 3740 Easy Finding题解
这篇文章提供了一个使用舞蹈链(Dancing Links)算法解决POJ 3740 "Easy Finding" 问题的C++代码实现,该问题要求找出矩阵中能够使每一列都恰好包含一个1的行集合。
|
6月前
|
Go
golang力扣leetcode 47.全排列II
golang力扣leetcode 47.全排列II
78 0
|
6月前
|
Go
[leetcode ~go]三数之和 M
[leetcode ~go]三数之和 M
|
6月前
|
Go C++
golang力扣leetcode 46.全排列
golang力扣leetcode 46.全排列
47 0
|
存储
easy_Maze 题解
easy_Maze 题解
60 1
|
算法
LeetCode 热题 HOT 100题解 (easy级别)(一)
LeetCode 热题 HOT 100题解 (easy级别)
152 0
|
机器学习/深度学习
LeetCode 热题 HOT 100题解 (easy级别)(二)
LeetCode 热题 HOT 100题解 (easy级别)
104 0
YI
|
机器学习/深度学习 Go
LeetCode 0059.螺旋矩阵II【Go】
LeetCode 0059.螺旋矩阵II【Go】
YI
70 0
Codeforces1486 C1.Guessing the Greatest (easy version)(交互题+二分)
Codeforces1486 C1.Guessing the Greatest (easy version)(交互题+二分)
91 0
|
C++ Python
LeetCode每日一题题解:15. 三数之和-题解-python && C++源代码
LeetCode每日一题题解:15. 三数之和-题解-python && C++源代码