一、godwave
1.题目名字为音频编辑器,根据名字猜测音频使用工具处理过,Audacity打开,发现频谱图没有什么特点,打印幅值的绝对值看下
点击查看代码
import wavio
file = './1.wav'
wav_data = wavio.read(file)
audio_data = wav_data.data
sample_rate = wav_data.rate
cnt = 0
with open("./1.txt","w") as f:
for i in audio_data:
for j in i:
f.write(str(abs(j)))
f.write(' ')
2.发现大小的范围是成段变化的,小的部分都是小于2000,用代码跑一下数据,大于2000记作1,小于2000记作0,大概分一下可以猜测是以64个为一组,周期变化
点击查看代码
import wavio
file = './1.wav'
wav_data = wavio.read(file)
audio_data = wav_data.data
sample_rate = wav_data.rate
cnt = 0
with open("./1.txt","w") as f:
for i in audio_data:
for j in i:
if abs(j) > 2000:
f.write("1")
else:
f.write("0")
3.考虑到1中掺杂0,64个为一组遍历记和,当和大于5时就计为1,否则记为0
点击查看代码
import wavio
file = './1.wav'
wav_data = wavio.read(file)
audio_data = wav_data.data
sample_rate = wav_data.rate
cnt = 0
with open("./1.txt","w") as f:
ls1 = []
for i in audio_data:
for j in i:
if abs(j) > 2000:
ls1.append(1)
else:
ls1.append(0)
cnt = 0
sum = 0
for i in ls1:
cnt += 1
if cnt < 64:
sum += i
else:
cnt = 0
if sum > 5:
f.write("1")
else:
f.write("0")
sum = 0
4.01数据,猜测是可以转为二维码,但直接转得到的有问题,因而想到可能是曼彻斯特编码,0到1记为0,1到0记为1,脚本转换
点击查看代码
import wavio
file = './1.wav'
wav_data = wavio.read(file)
audio_data = wav_data.data
sample_rate = wav_data.rate
cnt = 0
with open("./1.txt","w") as f:
ls1 = []
for i in audio_data:
for j in i:
if abs(j) > 2000:
ls1.append(1)
else:
ls1.append(0)
cnt = 0
sum = 0
ls2 = []
for i in ls1:
cnt += 1
if cnt < 64:
sum += i
else:
cnt = 0
if sum > 10:
ls2.append("1")
else:
ls2.append("0")
sum = 0
decode_data = ""
for i in range(0, len(ls2), 2):
if ls2[i] == "0" and ls2[i + 1] == "1":
decode_data += "0"
elif ls2[i] == "1" and ls2[i + 1] == "0":
decode_data += "1"
else:
print("wrong")
f.write(decode_data)
5.得到数据当作二进制数据,010直接转码十六进制,得到png源码,即二维码,扫码得flag
二、Pixel-Princess
1.无后缀文件,kali中解压得到一个jpg,binwalk发现含有zip,010手动分离,解压得到一个含有passphrase的jpg,并且提示princess is in another
2.含密钥的图片加密,用steghide试一下最初的jpg,密钥就是zip中的jpg的passphrase,得到l.tar.gz,tar解压得到flag