Skip to content

ChieftainsSecret

Category: General Skills

Source: 祥云杯2021

Author: unknown

Score: 10

Description

Our agent risked his life to install a mysterious device in the immemorial telephone, can you find out the chieftain's telephone number? Flag format: flag{11 digits}

ChieftainsSecret.zip

题目描述

题目给了一个图种,解压得到一个电路图和两千多组数据。

Misc亲爹的解答

结合图片推断这是转动码盘的过程记录,查阅文档可得到一系列每次码盘转动的度数。

数据可进行处理,得到sin值与cos值:

def get_sin(i):
    return (data['PC0'][i] - (data['PC0'][i] + data['PC1'][i]) / 2) / 1000
def get_cos(i):
    return (data['PC2'][i] - (data['PC2'][i] + data['PC3'][i]) / 2) / 1000

并绘图:

img大概就是抠出峰值

img正弦和余弦算出后得到一个空间坐标分布

_map = '1234567890'
ps = [3, 3, 0, 2, 5, 1, 4, 9, 6, 5, 3]
print(''.join([_map[i] for i in ps]))
print(''.join([_map[::-1][i] for i in ps]))
ps = [3, 3, 0, 2, 5, 1, 4, 8, 6, 5, 3]
print(''.join([_map[i] for i in ps]))
print(''.join([_map[::-1][i] for i in ps]))

Flag

flag{77085962457}

Reference

Writeup from https://zhuanlan.zhihu.com/p/402713931