Wargame 0-1 Magic [100]

Description

Do you believe in magic?

nc bamboofox.cs.nctu.edu.tw 10000

Hint

Stack buffer overflow

void do_magic(char *buf,int n)
{
        int i;
        srand(time(NULL));
        for (i = 0; i < n; i++)
                buf[i] ^= rand()%256;
}

void magic()
{
        char magic_str[60];
        scanf("%s", magic_str);
        do_magic(magic_str, strlen(magic_str));
        printf("%s", magic_str);
}

Files

magic
# Avatar Name Last time Point
1 wouuuuuuuuu 2018-12-30 09:47:20 100
2 hwy 2018-07-22 08:23:59 100
3 李冠廷 2018-07-20 01:03:07 100
4 idle_fire 2018-07-12 16:22:00 100
5 fsociety 2018-07-09 20:29:01 100
6 吳建興 2018-07-08 16:15:20 100
7 SSSP4RTA 2018-06-15 17:00:05 100
8 nctu 2018-04-14 09:41:42 100
9 0wning 2018-04-06 08:45:41 100
10 deadbeef 2018-03-13 13:42:44 100
11 zjw88282740 2018-03-07 15:27:45 100
12 歐陽詮 2018-02-16 13:59:36 100
13 ss8651twtw 2018-02-06 14:52:49 100
14 zwhubuntu 2017-12-06 14:15:17 100
15 Hungwen Chien 2017-11-01 06:44:18 100
16 Tryout Chen 2017-10-30 11:31:14 100
17 Nassim Asrir 2017-10-12 23:35:02 100
18 st424204 2017-10-08 15:55:30 100
19 mike1636216 2017-10-06 10:23:35 100
20 Phagoria 2017-10-06 00:04:59 100