大爱这次比赛。
因为对我们新手很友好。
不至于裂开。

1.Space Club

文档打开后是规则空行

微信截图_20200331212356.png


写个脚本判断。(短的是0,长的是1)

import libnum
a=''
with open('space.txt','r') as f:
    for i in f.readlines():
        _j=0
        for j in i:
            if j.isspace():
                _j+=1
        if _j==7:
            a+=str(0)
        else:
            a+=str(1)

print(libnum.b2s(a))
wctf2020{h3re_1s_y0ur_fl@g_s1x_s1x_s1x}

2.Welcome

三个头像,好像是什么比赛的签到题。(我怎么没想到用tfboys的组合照。。)

3.爬

pdf中的图片遮住了flag

微信截图_20200331213256.png


解密后:wctf2020{th1s_1s_@_pdf_and_y0u_can_use_phot0sh0p}

4.Find me

微信截图_20200331213808.png


盲文解密:wctf2020{y$0$u_f$1$n$d$_M$e$e$e$e$e}

5.girlfriend

import wave
import struct
import math
class pygoertzel_dtmf:
    def __init__(self, samplerate):
        self.samplerate = samplerate
        self.goertzel_freq = [1209.0,1336.0,1477.0,1633.0,697.0,770.0,852.0,941.0]
        self.s_prev = {}
        self.s_prev2 = {}
        self.totalpower = {}
        self.N = {}
        self.coeff = {}
        # create goertzel parameters for each frequency so that
        # all the frequencies are analyzed in parallel
        for k in self.goertzel_freq:
            self.s_prev[k] = 0.0
            self.s_prev2[k] = 0.0
            self.totalpower[k] = 0.0
            self.N[k] = 0.0
            normalizedfreq = k / self.samplerate
            self.coeff[k] = 2.0*math.cos(2.0 * math.pi * normalizedfreq)
    def __get_number(self, freqs):
        hi = [1209.0,1336.0,1477.0,1633.0]
        lo = [697.0,770.0,852.0,941.0]
        # get hi freq
        hifreq = 0.0
        hifreq_v = 0.0
        for f in hi:
            if freqs[f]>hifreq_v:
                hifreq_v = freqs[f]
                hifreq = f
        # get lo freq
        lofreq = 0.0
        lofreq_v = 0.0
        for f in lo:
            if freqs[f]>lofreq_v:
                lofreq_v = freqs[f]
                lofreq = f
        if lofreq==697.0:
            if hifreq==1209.0:
                return "1"
            elif hifreq==1336.0:
                return "2"
            elif hifreq==1477.0:
                return "3"
            elif hifreq==1633.0:
                return "A"
        elif lofreq==770.0:
            if hifreq==1209.0:
                return "4"
            elif hifreq==1336.0:
                return "5"
            elif hifreq==1477.0:
                return "6"
            elif hifreq==1633.0:
                return "B"
        elif lofreq==852.0:
            if hifreq==1209.0:
                return "7"
            elif hifreq==1336.0:
                return "8"
            elif hifreq==1477.0:
                return "9"
            elif hifreq==1633.0:
                return "C"
        elif lofreq==941.0:
            if hifreq==1209.0:
                return "*"
            elif hifreq==1336.0:
                return "0"
            elif hifreq==1477.0:
                return "# "
            elif hifreq==1633.0:
                return "D"
    def run(self, sample):
        freqs = {}
        for freq in self.goertzel_freq:
            s = sample + (self.coeff[freq] * self.s_prev[freq]) - self.s_prev2[freq]
            self.s_prev2[freq] = self.s_prev[freq]
            self.s_prev[freq] = s
            self.N[freq]+=1
            power = (self.s_prev2[freq]*self.s_prev2[freq]) + (self.s_prev[freq]*self.s_prev[freq]) - (self.coeff[freq]*self.s_prev[freq]*self.s_prev2[freq])
            self.totalpower[freq]+=sample*sample
            if (self.totalpower[freq] == 0):
                self.totalpower[freq] = 1
            freqs[freq] = power / self.totalpower[freq] / self.N[freq]
        return self.__get_number(freqs)
if __name__ == '__main__':
    # load wav file
    wav = wave.open('girlfriend.wav', 'r')
    (nchannels, sampwidth, framerate, nframes, comptype, compname) = wav.getparams()
    frames = wav.readframes(nframes * nchannels)
    # convert wave file to array of integers
    frames = struct.unpack_from("%dH" % nframes * nchannels, frames)
    # if stereo get left/right
    if nchannels == 2:
        left = [frames[i] for i in range(0,len(frames),2)]
        right = [frames[i] for i in range(1,len(frames),2)]
    else:
        left = frames
        right = left
    binsize = 400
    # Split the bin in 4 to average out errors due to noise
    binsize_split = 4
    prevvalue = ""
    prevcounter = 0
    for i in range(0,len(left)-binsize,binsize/binsize_split):
        goertzel = pygoertzel_dtmf(framerate)
        for j in left[i:i+binsize]:
            value = goertzel.run(j)
        if value==prevvalue:
            prevcounter+=1
            if prevcounter==10:
                print value
        else:
            prevcounter=0
            prevvalue=value

a=''
with open('dh.txt','r')as f :
    for i in f.readlines():
        if i.strip()!='None':
            a+=i.strip()
print(a)

最后放张图证明我当时有多难受:

微信截图_20200331214400.png


结果需要9宫格匹配:

key=['abc','def','ghi','jkl','mno','pqrs','tuv','zxyz']
value='999-666-88-2-777-33-6-9999-4-444-777-555-333-777-444-33-66-3-7777'
for i in value.split('-'):
    lens=len(i)
    chrs=int(i[0])
    print(key[chrs-2][lens-1],end='')

心态崩了呀。三个9就是9的第三个,我去。

6.Shop

这。。也算web吗。。

微信截图_20200331222605.png


在买flag选cheaperflag,可以买一个,就有和cost产生接触的地方。(拼命去理解了。)
然后,,溢出。。不懂。Mark

7.Alison likes jojo

binwalk分离图片
fcrackzip破解压缩包密码
outguess读取图片隐藏信息