v9 = &argc; setbuf(stdin, 0); setbuf(stdout, 0); setbuf(stderr, 0); fflush(stdout); *(_DWORD *)s1 = 48; memset(v8, 0, sizeof(v8)); *(_DWORD *)src = 0x30; memset(v6, 0, sizeof(v6)); puts("Welcome to use LFS."); printf("Please input admin password:"); __isoc99_scanf("%100s", s1); if ( strcmp(s1, "administrator") ) { puts("Password Error!"); exit(0); } puts("Welcome!"); puts("Input your operation:"); puts("1.Add a log."); puts("2.Display all logs."); puts("3.Print all logs."); printf("0.Exit\n:"); __isoc99_scanf("%d", &v4); switch ( v4 ) { case0: exit(0); return result; case1: AddLog((int)src); result = sub_804892B(argc, argv, envp); break; case2: Display(src); result = sub_804892B(argc, argv, envp); break; case3: Print(); result = sub_804892B(argc, argv, envp); break; case4: GetFlag(src); result = sub_804892B(argc, argv, envp); break; default: result = sub_804892B(argc, argv, envp); break; } return result; }
感觉有点多,先跑一次试试看
┌──(ela㉿kali)-[~/Pwn] └─$ ./ciscn_2019_ne_5 Welcome to use LFS. Please input admin password:administrator Welcome! Input your operation: 1.Add a log. 2.Display all logs. 3.Print all logs. 0.Exit :