首页 > 其他分享 >day1

day1

时间:2023-07-10 14:45:16浏览次数:55  
标签:cnt day1 rate ls2 ls1 wav data

一、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(' ')

image

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")

image

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

image

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)

image

5.得到数据当作二进制数据,010直接转码十六进制,得到png源码,即二维码,扫码得flag

image

二、Pixel-Princess

1.无后缀文件,kali中解压得到一个jpg,binwalk发现含有zip,010手动分离,解压得到一个含有passphrase的jpg,并且提示princess is in another

image

2.含密钥的图片加密,用steghide试一下最初的jpg,密钥就是zip中的jpg的passphrase,得到l.tar.gz,tar解压得到flag

image
image

标签:cnt,day1,rate,ls2,ls1,wav,data
From: https://www.cnblogs.com/120211P/p/17541128.html

相关文章

  • vue--day13--watch与computed的区别
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>watch实现名字案例</title><scri......
  • vue--day12--深度监视
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>天气案例--监听属性</title><scrip......
  • vue-day12--监听属性
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>天气案例--监听属性</title><scrip......
  • vue--day11--计算属性实现名字案例简写
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>计算属性实现名字案例简写</title><scr......
  • vue--day11--计算属性实现名字案例
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>计算属性实现名字案例</title><scrip......
  • vue-day11--插值语法实现名字案例
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>插值语法实现名字案例</title><scrip......
  • vue-day11--methods实现名字案例
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>methods实现名字案例</title><sc......
  • vue-day10--键盘事件
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><title>Document</title><script......
  • 闲话 Day15
    这两天的题完全改不动。两个星期之后就NOI了,和现在完全没有的水平形成了鲜明的对比。前两天又去找了点神仙DP做了做。结论是两年白学。题解都看不懂。为什么闲话Day13看的人那么多。是因为我引流了吗。。。然而这个是学术闲话。鉴于没有题材那就整点普及内容吧。......
  • day116-mybatis的逆向工程
    mybatis的逆向工程正向工程:先创建Java实体类,由框架负责根据实体类生成数据库表。逆向工程:先创建数据库表,由框架负责根据数据库表,反向生成如下资源:Java实体类,mapper接口,mapper映射文件步骤添加依赖与插件<dependencies><!--Mybatis核心--><dependency>......