zoukankan      html  css  js  c++  java
  • BUU MISC 刷题记录(三)

    [GUET-CTF2019]520的暗示

    将图片数据每一位与33异或


    得到一张jpg图片

    根据图片上的信息查询基站

    flag{桂林电子科技大学花江校区}

    [watevrCTF 2019]Unspaellablle

    百度找到原来的剧本
    https://imsdb.com/transcripts/Stargate-SG1-Children-Of-The-Gods.html
    用bcompared比较,可以发现有33个部分不一样

    把不一样的字母提取出来就是flag

    [WUSTCTF2020]spaceclub

    打开文件,每行都是空格,但是长度不同

    设长的为1,短的为0

    import binascii
    f = open("attachment.txt","r")
    content = f.readlines()
    s=""
    for line in content:
        if len(line)==7:
            s+="0"
        if len(line)==13:
            s+="1"
    print(s)
    print(binascii.unhexlify(hex(int(s,2))[2:]))
    
    

    [GWCTF2019]huyao

    一种频域盲水印,已经是很久以前的版本了
    需要用python2运行
    如何在python2下安装opencv:
    需要安装时指定opencv的老版本,最后一个支持 Python 2.7 的 Opencv 版本是 4.2.0.32
    pip install opencv-python==4.2.0.32 -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
    脚本:

    # coding=utf-8
    import cv2
    import numpy as np
    import random
    import os
    from argparse import ArgumentParser
    ALPHA = 5
    
    
    def build_parser():
        parser = ArgumentParser()
        parser.add_argument('--original', dest='ori', required=True)
        parser.add_argument('--image', dest='img', required=True)
        parser.add_argument('--result', dest='res', required=True)
        parser.add_argument('--alpha', dest='alpha', default=ALPHA)
        return parser
    
    
    def main():
        parser = build_parser()
        options = parser.parse_args()
        ori = options.ori
        img = options.img
        res = options.res
        alpha = options.alpha
        if not os.path.isfile(ori):
            parser.error("original image %s does not exist." % ori)
        if not os.path.isfile(img):
            parser.error("image %s does not exist." % img)
        decode(ori, img, res, alpha)
    
    
    def decode(ori_path, img_path, res_path, alpha):
        ori = cv2.imread(ori_path)
        img = cv2.imread(img_path)
        ori_f = np.fft.fft2(ori)
        img_f = np.fft.fft2(img)
        height, width = ori.shape[0], ori.shape[1]
        watermark = (ori_f - img_f) / alpha
        watermark = np.real(watermark)
        res = np.zeros(watermark.shape)
        random.seed(height + width)
        x = range(height / 2)
        y = range(width)
        random.shuffle(x)
        random.shuffle(y)
        for i in range(height / 2):
            for j in range(width):
                res[x[i]][y[j]] = watermark[i][j]
        cv2.imwrite(res_path, res, [int(cv2.IMWRITE_JPEG_QUALITY), 100])
    
    
    if __name__ == '__main__':
        main()
    

    运行

    py -2 pinyubwm.py --original huyao.png --image stillhuyao.png --result out.png
    

    结果:

    flag{BWM_1s_c00l}

    寂静之城

    一道社工题,目前已经基本坏掉了
    访问:https://www.douban.com/group/topic/5221588/

    翻到2016-4-01,可以找到点赞的出题人

    后面无了
    flag{31010419920831481363542021127}

  • 相关阅读:
    环境是如何建立的 启动文件有什么
    环境中存储的是什么
    串行 并行 异步 同步
    TPC-H is a Decision Support Benchmark
    进程通信类型 管道是Linux支持的最初Unix IPC形式之一 命名管道 匿名管道
    删除环境变量
    14.3.2.2 autocommit, Commit, and Rollback 自动提交 提交和回滚
    14.3.2.2 autocommit, Commit, and Rollback 自动提交 提交和回滚
    14.3.2.1 Transaction Isolation Levels 事务隔离级别
    14.3.2.1 Transaction Isolation Levels 事务隔离级别
  • 原文地址:https://www.cnblogs.com/yunqian2017/p/15014242.html
Copyright © 2011-2022 走看看