当前位置:网站首页>[guess-ctf2019] fake compressed packets

[guess-ctf2019] fake compressed packets

2022-07-07 07:43:00 [mzq]

[GUET-CTF2019] Fake compressed packets

Title address : https://buuoj.cn/challenges#[GUET-CTF2019]%E8%99%9A%E5%81%87%E7%9A%84%E5%8E%8B%E7%BC%A9%E5%8C%85
 Insert picture description here

Unzip the fake package and get a txt When the file is opened rsa Calculation questions

 Insert picture description here

import gmpy2
p = 11
q = 3
n = 33
e = 3
c = 26
phi_n = (p-1)*(q-1)
d = gmpy2.invert(e,phi_n)
m = pow(c,d,n)

print(m)

The answer is equal to 5, The zip code is The answer is 5

And then use crc Script repair that one png The width and height of the picture , Get a hint ^5

 Insert picture description here

Analyze the true and false document data ^5 , obtain docx file

import struct
data = open('./ True or false ',"r").read()
with open('flag.zip',"wb") as f:
    hex_data = ""
    for i in data:
        hex_data += (hex(int(i,16)^5)[2:])
    print(hex_data)

    f.write(struct.pack("B",int(hex_data,16)))

Modify the font color to get flag

 Insert picture description here

FLAG{_th2_7ru8_2iP_}

原网站

版权声明
本文为[[mzq]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070412349406.html