分析

主要题目所给信息light,以及红绿蓝三个框

WeChall Enlightment (Encoding) Write Up

猜测是对这三个框中二进制进行位运算,再转成ascii

首先来试位与

Python代码:

a = '00000000011000000110000000000000000000000100000000010000000000000111000000100100001000000110100100010000000000000010100101100101011001000010000000000000000000000101010000000000011000100010000100101100011000000101000000100000001010010000001000000000000000000000100100000010011101000010000101000000011000010100001000010100011000010100011000100000001000000000010000000010000101110000010101101000001010000010000001100100000000010000000001000010001011100000000001110100000000100010000000010100011000000100000100100000000001100010010001011000011101000010000000100011011101000100000100100111010001000000110000000000010001100010001100100000011101000100100001100001010100000100010100110010000010010000101000000000001000010000000000010000001100010010000100110000001100000001000000010001001000000000000000100001000000000010000000110001000100000000000000000000001000000011000000000001000100000001000100000000000100000011000100000000000000010011000000000000001000000000110100001000000100000001000000100000001000000011000000000001000000000000000100100000000100010010000000010000001000010001000100000001000100000011000000010001001100000000000000010001000000000000000000010000000000000000000100100001000000000011000000110001000000000011000000001000000000000000000000000000000100010011000000100000000100010000000000110000000100000010000100110000000100000010000000110000001100000001000100100000001000000001000000010000001000000000000000000000000100000010000000010000001100000001000100000000001000000001000000010000000010000000100000100000001100000001000000010000000000000000000000010000001100000000000000110001001000010001000100000000000100000000000000000000001100000001000100110001001100000000000100110000000100000011000000000000000100000001000100110000000100000011000000000000000100000000000100000000'
b = '01000001011010000010000000000000000000000000000101100100000000000100000000100100010001000000010000100010000000000011100101000110011000000000000000100101010011000010000000000000001100110100100101100000001001010000000001000000001010000010011001100110001000000110100001000100010000000100010100110010001000000010000000110000001010010110000000000101000000010000100000001000010101110010000101000100010011000010000001000000001001100000000001100000000011010000000000010000011011100010000001100000001000000100010000000000011011000100010100010000001100000000000000110000000100000110000101100000011001010000110000000000010001010100010100100000000001000110100000000101011100100110010000000000000011010000000000110000000000000001000000110000000000000011000000010000000000000001000000010000000000010001000000110000000100000001000000000000000100000001000100110000000100000011000000110000001000010010000000010000000100010000000100110000000100010010000000010000001100000000100000000010001000000011000000010001000100000001000000100000001100000001000000010000001100000001000000000000000100000001000100110000001000010011000000100000000100000011000000100000001100000011000000010000000100000011000100010001001100000010000000000001000000000000000000000100000000100011000000100001001100010010000000110000001000010001000100000000000000000000000000100001001000000001000000100000000000000000000100010000000100000010000100100000001000000011000000000000001100000000000000010000001000010011000100110000000000000011000100010000000011000000100000010000000100000000000100010000001100010001000100000001001000000011000000100001001000000011000000000000000100000010000000110000001000000010000100100000000000000001000000100000001100000000000000110000001100010001000100110000001000000001000000110000000000000000100000001000'
c = '01000001010000000110000100100001001000000000100001000100001000000101001101100001011000010100000101100011001000000110000001001101000100010000000001100011001000110011010000100000010100110010111001001001011000010110010000101000011010000110110000100001000000000010000000101010000100000010010100010000000001000001001101000100000000000110110001000110000000010000010100001000000000010110010101100100011000000010000000110000010011110010000001000101010010100010000001000100000010110010000000100000000010000010000000000000011001000110000001101000001000000000000001000000001000000110000000000101000001010010100000100000001001110000111000100000001100000000100000000100000100100000010000001010000001000000101000010000000100010010000000000000000100000000000000000000001100000010000000100000000100000010000000100001001100000010000000110001001100000010000000000001000100000010000000010001000000000001000100100000001100010000000000000000001100000001000000100000000100000000100100001000000000000000000000100000000000010001000000110000000100010010000100110000001000000001000000100001001000000011000000110000001000010011000000000000000000000010000000110000000000010011000000100000001100000010000000110000000000000000000000110001001100000001000100000101000010000000000000010001001000010000000100010000001000000010000000110000001100000001000000010000001000000011000000110001001000000011000000000000001000010010000000100000000100010001000100110000000000000001000000100000001000010010000100010000001100000011000000100000000001010000001000100000000000000011000000100000000100010010000000110000000000000011000000010000000100010010000000110000001100000011000000100000001000000000000100010001001100000010000000010000001100000000000000000000000000000010000000000001001000000000000000000000001000000000110000001010'
for i in range(len(a)):
    if int(a[i]) & int(b[i]) & int(c[i]):
        print(1, end="")
    else:
        print(0, end="")

放到之前wechall提供的JPK中,Binary->Binary Format分组后,再次点击Binary->Binary To Ascii

发现不对@ @ D (@@ @  @   0  

再试位或,将if int(a[i]) & int(b[i]) & int(c[i]):修改为if int(a[i]) | int(b[i]) | int(c[i]):

得到

Aha! It seems you got something interesting!
Well to go to the next stage, go there:
01001100011010010110011101101000
00110111010111110100110001100101
01110110011001010110110000110010
00101110011100000110100001110000

将上面的二进制转换ascii,得到Ligh7_Level2.php

访问 https://www.wechall.net/challenge/anto/enlightment/Ligh7_Level2.php 看看。

又是三段二进制文本,尝试位运算,使用异或得到:

01010100011100100110100101110000011011000110010100101101010110000010110101001111010100100010110000100000011100100110100101100111011010000111010000111111000011010000101001000111011100100110010101100001011101000010000100100000010010000110010101110010011001010010000001101001011100110010000001110111011010000110000101110100001000000111100101101111011101010010000001110011011010000110111101110101011011000110010000100000011000100110010100100000011011000110111101101111011010110110100101101110011001110010000001100110011011110111001000101110001011100010111000001101000010100010001001000111011010010110110101101101011001010101111101000100011000010101111101001100011010010110011101101000011101000010001000001101000010100110010101101110011101000110010101110010001000000111010001101000011010010111001100100000011000010111001100100000011100000110000101110011011100110111011101101111011100100110010000100001

转成ascii字符:

Triple-X-OR, right?
Great! Here is what you should be looking for...
"Gimme_Da_Light"
enter this as password!

结束

提交Gimme_Da_Light


参考:WeChall_Enlightment (Encoding) - zzzzzzzzhu - 博客园
关于位运算,这篇文章不错:一篇读懂Python中的位运算 - 听雨危楼 - 博客园