re learning Notes (43) dated February Arnhem Cup tournament -re-maze1

Arnhem Cup match February month anti-plague [practice session] -re-maze1
novice one, if any error (insufficient) please correct me, thank you! !
Personal blog: Click to enter
Download title:

Links: https://pan.baidu.com/s/197VP-ZwJ6oIMpZ7oPuBuKA extraction code: 2020

IDA64 loading position, into the main () function
Here Insert Picture Description
labyrinth title, line 28 before the initialization of the maze, after the input In Flag, and wasd control up and down, and finally reaches the end of time to judge the success of 2, 1 is a road, a wall 0.

Breakpoints, linux remote debugging, the maze of data taken at line 28
Here Insert Picture Description
to write the script

#include <stdio.h>
int main()
{
    int i, j;
    char maze[] = {
    1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00,
    0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00,
    0x01, 0x00, 0x00,2
    };
    for (i = 0; i < 6; i++)
    {
        for (j = 0; j < 6; j++)
        {
            if (maze[6 * i + j] == 1)
                printf("■");
            else if (maze[6 * i + j] == 0)
                printf("□");
            else if (maze[6 * i + j] == 2)
                printf("★");
            //else if(maze)
        }
        putchar('\n');
    }
    return 0;
}

Here Insert Picture Description
Control the row and column variables in the bss section, is initialized to 0, so the starting point is the upper left corner, lower right corner of the end point is
, the input is dddddsssss
Here Insert Picture Description
converted to a md5, for the final flag64e918643fc7b1d92d964543b04c117a

Published 62 original articles · won praise 11 · views 5883

Guess you like

Origin blog.csdn.net/Palmer9/article/details/104517841