[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}

相关文章
|
1天前
|
Python
NSSCTF[HUBUCTF 2022 新生赛]ezPython
NSSCTF[HUBUCTF 2022 新生赛]ezPython
8 0
|
3月前
|
PHP
[ACTF2020 新生赛]Include1
[ACTF2020 新生赛]Include1
|
3月前
|
PHP
BUUCTF---[ACTF2020 新生赛]BackupFile1
BUUCTF---[ACTF2020 新生赛]BackupFile1
|
10月前
|
存储
[ACTF新生赛2020]SoulLike 题解
[ACTF新生赛2020]SoulLike 题解
107 0
|
3月前
|
C++
【PTA】​L1-079 天梯赛的善良​ (C++)
【PTA】​L1-079 天梯赛的善良​ (C++)
89 0
【PTA】​L1-079 天梯赛的善良​ (C++)
|
PHP
[SWPUCTF 2021 新生赛]include
[SWPUCTF 2021 新生赛]include
146 0
|
3月前
|
数据安全/隐私保护
BUUCTF [ACTF新生赛2020]outguess 1
BUUCTF [ACTF新生赛2020]outguess 1
47 0
BUUCTF [ACTF新生赛2020]outguess 1
|
3月前
|
数据安全/隐私保护
BUUCTF [ACTF新生赛2020]swp 1
BUUCTF [ACTF新生赛2020]swp 1
86 1
|
10月前
|
安全 数据安全/隐私保护
[ACTF新生赛2020]fungame 题解
[ACTF新生赛2020]fungame 题解
98 0
|
10月前
|
存储
[ACTF新生赛2020]easyre 题解
[ACTF新生赛2020]easyre 题解
195 0