如果直接去截取二维码的话,是无法识别的,这里可以用一个python脚本处理一下来保证识别,以下是源代码:
import cv2
import numpy as np
from PIL import Image
def decode():
data_path = "D:/file/securitytempfile/Let_god_knows/attachment/" # 请替换为你的图片路径
img2 = cv2.imread(data_path + "Let_god_knows.bmp")
start = 0x233
resolve = [[[255, 255, 255] for i in range(27)]]
for i in range(start, start + 25):
col = [[255, 255, 255]]
for j in range(start, start + 25):
if img2[i][j][2] & 1 == 0:
col.append([255, 255, 255])
else:
col.append([0, 0, 0])
col.append([255, 255, 255])
resolve.append(col)
resolve.append([[255, 255, 255] for i in range(27)])
cv2.imwrite(data_path + "recovered.bmp", np.array(resolve))
# 调用函数
decode()
执行如果没有cv2的话,要下载opencv-python包,执行后就能看到原来的二维码了,直接cqr扫就能出flag。