[ACTF新生赛2020]Oruga 题解

简介: [ACTF新生赛2020]Oruga 题解

这是一个迷宫题

进入关键函数

迷宫的控制逻辑如上图,JMEW控制上下左右

执行完移动之后,下面还有一段函数,如上图,这四个判断是判断我们走迷宫的时候是否越界了,走出迷宫了,如果越界就退出程序

而且如果所在位置是0的话,就会一直执行这个循环体,v2+=v4

就是说每一步都会一直走下去,直到走到碰到障碍物为止,但是如果走下去会跑出迷宫的话会异常退出

截取一下迷宫地图的数据

我们可以将迷宫打印一下

map=[0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x23,0x23,0x23,0x00,0x00,0x00,0x23,0x23,0x00,0x00,0x00,0x4f,0x4f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4f,0x4f,0x00,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x00,0x4f,0x4f,0x00,0x4f,0x4f,0x00,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x00,0x4f,0x4f,0x00,0x4f,0x4f,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x4c,0x00,0x4f,0x4f,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4f,0x4f,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x4d,0x4d,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x4d,0x4d,0x00,0x00,0x00,0x00,0x45,0x45,0x00,0x00,0x00,0x30,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x45,0x54,0x54,0x54,0x49,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x54,0x00,0x49,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x54,0x00,0x49,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x21,0x00,0x00,0x00,0x45,0x45]
for i in range(0,16):
    for j in range(0,16):
        if(map[i*16+j]==0):
            print('0',end='')
        elif(map[i*16+j]==33):
            print('!', end='')
        else:
            print('#', end='')
    print()

0是通路,#是障碍物,!是终点

手走出路径

flag{MEWEMEWJMEWJM}

相关文章
|
JSON PHP 数据格式
[SWPUCTF 2021 新生赛]jicao
[SWPUCTF 2021 新生赛]jicao
522 0
|
3月前
|
数据安全/隐私保护
[SWPUCTF 2021 新生赛]简简单单的解密
[SWPUCTF 2021 新生赛]简简单单的解密
45 0
|
存储
[ACTF新生赛2020]SoulLike 题解
[ACTF新生赛2020]SoulLike 题解
139 0
|
6月前
|
数据安全/隐私保护
BUUCTF [ACTF新生赛2020]outguess 1
BUUCTF [ACTF新生赛2020]outguess 1
117 0
BUUCTF [ACTF新生赛2020]outguess 1
|
安全 数据安全/隐私保护
[ACTF新生赛2020]fungame 题解
[ACTF新生赛2020]fungame 题解
128 0
|
存储
[ACTF新生赛2020]easyre 题解
[ACTF新生赛2020]easyre 题解
329 0
|
Java
hdu2519 新生晚会
hdu2519 新生晚会
58 0
|
Linux PHP
[SWPUCTF 2021 新生赛]easyrce-解题思路
[SWPUCTF 2021 新生赛]easyrce-解题思路
228 1
|
安全 数据安全/隐私保护
[SWPUCTF 2021 新生赛]caidao
[SWPUCTF 2021 新生赛]caidao
249 0
|
PHP
[SWPUCTF 2021 新生赛]babyrce
[SWPUCTF 2021 新生赛]babyrce
277 0
下一篇
无影云桌面