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 tico88612 2021-09-17 20:19:23 +0800 100
2 ZM_J 2021-05-25 22:47:19 +0800 100
3 acdwas 2021-01-12 00:57:26 +0800 100
4 mindol1234 2021-01-09 22:48:25 +0800 100
5 陳家駒 2020-09-28 16:10:07 +0800 100
6 thefool 2020-07-16 23:56:18 +0800 100
7 hacker 2020-03-01 17:52:23 +0800 100
8 amy 2019-10-14 13:02:09 +0800 100
9 4llok 2019-10-07 05:33:15 +0800 100
10 evangel1st 2019-09-01 02:36:48 +0800 100
11 r3dhun9 2019-08-12 15:29:36 +0800 100
12 吳宗遠 2019-07-25 19:20:16 +0800 100
13 lee 2019-07-19 19:05:43 +0800 100
14 スタ 2019-07-18 00:59:46 +0800 100
15 phyman 2019-06-23 23:12:57 +0800 100
16 n0b0dy 2019-04-23 19:35:48 +0800 100
17 wechhu 2019-03-30 12:47:05 +0800 100
18 糖醋黄瓜 2019-03-22 18:01:41 +0800 100
19 SplashEM 2019-02-17 21:24:03 +0800 100
20 p0stganda1f 2019-02-17 15:50:51 +0800 100
21 wouuuuuuuuu 2018-12-30 17:47:20 +0800 100
22 hwy 2018-07-22 16:23:59 +0800 100
23 李冠廷 2018-07-20 09:03:07 +0800 100
24 idle_fire 2018-07-13 00:22:00 +0800 100
25 fsociety 2018-07-10 04:29:01 +0800 100
26 吳建興 2018-07-09 00:15:20 +0800 100
27 SSSP4RTA 2018-06-16 01:00:05 +0800 100
28 nctu 2018-04-14 17:41:42 +0800 100
29 0wning 2018-04-06 16:45:41 +0800 100
30 deadbeef 2018-03-13 21:42:44 +0800 100
31 zjw88282740 2018-03-07 23:27:45 +0800 100
32 歐陽詮 2018-02-16 21:59:36 +0800 100
33 ss8651twtw 2018-02-06 22:52:49 +0800 100
34 zwhubuntu 2017-12-06 22:15:17 +0800 100
35 Hungwen Chien 2017-11-01 14:44:18 +0800 100
36 Tryout Chen 2017-10-30 19:31:14 +0800 100
37 Nassim Asrir 2017-10-13 07:35:02 +0800 100
38 st424204 2017-10-08 23:55:30 +0800 100
39 mike1636216 2017-10-06 18:23:35 +0800 100
40 Phagoria 2017-10-06 08:04:59 +0800 100