2023-11-28 2023-11-28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 import wave zerofile = "ha-d4.wav" onefile = "ha-gs4.wav" outfile = "flag.wav" flag=b"flag{5BChiLd_I5_re411Y_cUTE}" bits = list(map(int, ''.join(['{0:08b}'.format(i) for i in flag]))) def getframe(file): w = wave.open(file, 'rb') frame=w.readframes(w.getnframes()) w.close() return frame zeroframe=getframe(zerofile) oneframe=getframe(onefile) output = wave.open(outfile, 'wb') w = wave.open(zerofile, 'rb') output.setparams(w.getparams()) w.close() for bit in bits: if bit == 0: output.writeframes(zeroframe) if bit == 1: output.writeframes(oneframe) output.close() 前一篇 python中用去掉字符串开头的数字编号最简单的方法 后一篇 解决cloudflare worker遇到failed to dial to (wss://): 200 OK > websocket: bad handshake 的问题
说些什么吧!