目录
Devil's Eighty Hammer
Coffee loving cat
Clock in the opposite direction
ez_misc
Wind water turn turn turn
解密后
7.发现依然是base16加密,预计是base16和魔改base64循坏加密。
解密第数次
解密最后一次
脚本如下:
# coding:utf-8
#s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
#s = "vwxrstuopq34567ABCDEFGHIJyz012PQRSTKLMNOZabcdUVWXYefghijklmn89+/"
s = "i5jLW7S0GX6uf1cv3ny4q8es2Q+bdkYgKOIT/tAxUrFlVPzhmow9BHCMDpEaJRZN"
def My_base64_encode(inputs):
# 将字符串转化为2进制
bin_str = []
for i in inputs:
x = str(bin(ord(i))).replace('0b', '')
bin_str.append('{:0>8}'.format(x))
#print(bin_str)
# 输出的字符串
outputs = ""
# 不够三倍数,需补齐的次数
nums = 0
while bin_str:
#每次取三个字符的二进制
temp_list = bin_str[:3]
if(len(temp_list) != 3):
nums = 3 - len(temp_list)
while len(temp_list) < 3:
temp_list += ['0' * 8]
temp_str = "".join(temp_list)
#print(temp_str)
# 将三个8字节的二进制转换为4个十进制
temp_str_list = []
for i in range(0,4):
temp_str_list.append(int(temp_str[i*6:(i+1)*6],2))
#print(temp_str_list)
if nums:
temp_str_list = temp_str_list[0:4 - nums]
for i in temp_str_list:
outputs += s[i]
bin_str = bin_str[3:]
outputs += nums * '='
print("Encrypted String:\n%s "%outputs)
def My_base64_decode(inputs):
# 将字符串转化为2进制
bin_str = []
for i in inputs:
if i != '=':
x = str(bin(s.index(i))).replace('0b', '')
bin_str.append('{:0>6}'.format(x))
#print(bin_str)
# 输出的字符串
outputs = ""
nums = inputs.count('=')
while bin_str:
temp_list = bin_str[:4]
temp_str = "".join(temp_list)
#print(temp_str)
# 补足8位字节
if(len(temp_str) % 8 != 0):
temp_str = temp_str[0:-1 * nums * 2]
# 将四个6字节的二进制转换为三个字符
for i in range(0,int(len(temp_str) / 8)):
outputs += chr(int(temp_str[i*8:(i+1)*8],2))
bin_str = bin_str[4:]
print("Decrypted String:\n%s "%outputs)
print()
print(" *************************************")
print(" * (1)encode (2)decode *")
print(" *************************************")
print()
num = input("Please select the operation you want to perform:\n")
if(num == "1"):
input_str = input("Please enter a string that needs to be encrypted: \n")
My_base64_encode(input_str)
else:
input_str = input("Please enter a string that needs to be decrypted: \n")
My_base64_decode(input_str)
得到flag
FLAG:flag{c192c579-6026-11ed-a8ec-ac1203fb3249}
2.打开图片发现是咖啡的菜单,这张菜单应该就是压缩包的密码。
得到密文ALCMCMFW
再将价格相加得到58,再将咖啡密文进行base58加密得到压缩包密码。
解压后得到3张图片,对图片[email protected]修改后缀名为bmp然后进行猫脸变换得到flag。
脚本如下
import cv2
import numpy as np
import matplotlib.image as mpimg
def de_arnold(img,shuffle_time,a,b):
r, c, d = img.shape
dp = np.zeros(img.shape, np.uint8)
for s in range(shuffle_time):
for i in range(r):
for j in range(c):
x = ((a * b + 1) * i - b * j) % r
y = (-a * i + j) % c
dp[x, y, :] = img[i, j, :]
img = np.copy(dp)
return img
img = mpimg.imread('')
img = img[:, :, [2, 1, 0]]
new = de_arnold(img, 12, 0, 9) #比赛日期12.09
cv2.imshow('picture', new)
cv2.waitKey(0)
FLAG: flag{512ed05a-629a-11ed-ae9d-ac1203fb3249}
1.解压文件打开发现损坏
3.修复压缩包文件将0000改为0900
FLAG:flag{6d19919b-659a-11ed-af80-ac1203fb3249}
1.文件夹解压发现txt文件切文件夹存在密码
根据pass.txt 可以得到密码为yuanshen
Ps:原神是米哈游公司名下一款游戏
2打开并解压压缩包得到程序
3将文件config.Sys放入16进制分析。
4将16进制数四个字符串一组之后加空格进行中文电码解密
得到社会主义核心价值观
5将字符串进行解密得到flag
FLAG:flag{744f24ae-6970-11ed-ae9d-ac1203fb3249}
添加空格脚本:
For i = 1 To Len(Text1.Text) Step 4
Text2.Text = Text2.Text & Mid(Text1.Text, i, 4) & " "
Next i
发现是word文档
3.打开后内容乱码,继续进行16进制分析
4.查看到可疑数值504b
FLAG:flag{ffd81975-648c-11ed-b5fe-ac1203fb3249}