1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
| int __cdecl __noreturn main(int argc, const char **argv, const char **envp) { v55 = __readfsqword(0x28u); key_unknown = GenIV(); iv_known = GenIV(); std::operator<<<std::char_traits<char>>(&std::cout, "Here is IV: "); for ( i = 0; i <= 15; ++i ) { v3 = std::ostream::operator<<(&std::cout, std::hex); v4 = std::setfill<char>('0'); v5 = std::operator<<<char,std::char_traits<char>>(v3, v4); v6 = std::setw(2); output_format = std::operator<<<char,std::char_traits<char>>(v5, v6); v8 = std::bitset<8ul>::to_ulong(&iv_known[i]); std::ostream::operator<<(output_format, v8); } std::ostream::operator<<(&std::cout, &std::endl<char,std::char_traits<char>>); while ( 1 ) { while ( 1 ) { while ( 1 ) { display(); std::istream::operator>>(&std::cin, &choice); if ( choice != 1 ) break; std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(name); v9 = std::operator<<<std::char_traits<char>>(&std::cout, "Plz input your name: "); std::ostream::operator<<(v9, &std::endl<char,std::char_traits<char>>); std::operator>><char>(&std::cin, name); if ( std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(name, "admin", 0LL) != -1 || (std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(name) & 15) != 0 ) { v11 = std::operator<<<std::char_traits<char>>(&std::cout, "no no no"); std::ostream::operator<<(v11, &std::endl<char,std::char_traits<char>>); exit(0); } v12 = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(name); if ( v12 > 1152921504606846975LL ) __cxa_throw_bad_array_new_length(); v13 = operator new[](8 * v12); v14 = v12 - 1; v15 = v13; while ( v14 >= 0 ) { std::bitset<8ul>::bitset(v15); v15 += 8LL; --v14; } bin_name = v13; for ( j = 0; ; ++j ) { v16 = j; if ( v16 >= std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(name) ) break; v17 = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::at(name, j); std::bitset<8ul>::bitset(&v47, *v17); *(bin_name + 8LL * j) = v47; } len_name = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(name); encode(key_unknown, iv_known, bin_name, len_name); std::operator<<<std::char_traits<char>>(&std::cout, "Here is your token: "); for ( k = 0; ; ++k ) { v19 = k; if ( v19 >= std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(name) ) break; v20 = std::ostream::operator<<(&std::cout, std::hex); v21 = std::setfill<char>('0'); v22 = std::operator<<<char,std::char_traits<char>>(v20, v21); v23 = std::setw(2); v24 = std::operator<<<char,std::char_traits<char>>(v22, v23); v25 = std::bitset<8ul>::to_ulong(8LL * k + bin_name); std::ostream::operator<<(v24, v25); } std::ostream::operator<<(&std::cout, &std::endl<char,std::char_traits<char>>); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(name); } if ( choice != 2 ) break; std::operator<<<std::char_traits<char>>(&std::cout, "Plz input your token: "); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(input_token); std::operator>><char>(&std::cin, input_token); if ( (std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(input_token) & 31) != 0 ) { v26 = std::operator<<<std::char_traits<char>>(&std::cout, "no no no"); std::ostream::operator<<(v26, &std::endl<char,std::char_traits<char>>); exit(0); } v27 = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(input_token) >> 1; if ( v27 > 0xFFFFFFFFFFFFFFFLL ) __cxa_throw_bad_array_new_length(); init = operator new[](8 * v27); v29 = v27 - 1; v30 = init; while ( v29 >= 0 ) { std::bitset<8ul>::bitset(v30); v30 += 8LL; --v29; } bit_token = init; for ( m = 0; ; ++m ) { v31 = m; if ( v31 >= std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(input_token) >> 1 ) break; std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr( name, input_token, 2 * m, 2LL); v32 = std::__cxx11::stoi(name, 0LL, 16LL); std::bitset<8ul>::bitset(&v47, v32); *(bit_token + 8LL * m) = v47; std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(name); } len_token = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(input_token); decode(key_unknown, iv_known, bit_token, (len_token >> 1)); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(output_name); for ( n = 0; ; ++n ) { v34 = n; if ( v34 >= std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::length(input_token) >> 1 ) break; v35 = std::bitset<8ul>::to_ulong(8LL * n + bit_token); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::operator+=(output_name, v35); } v36 = std::operator<<<std::char_traits<char>>(&std::cout, "Hello, "); v37 = std::operator<<<char>(v36, output_name); std::ostream::operator<<(v37, &std::endl<char,std::char_traits<char>>); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::substr(name, output_name, 0LL, 10LL); tip = std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::compare(name, "adminadmin") == 0; std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(name); if ( tip ) { get_flag = std::operator<<<char>(&std::cout, &flag[abi:cxx11]); std::ostream::operator<<(get_flag, &std::endl<char,std::char_traits<char>>); } std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(output_name); std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>::~basic_string(input_token); } if ( choice == 3 ) exit(0); v40 = std::operator<<<std::char_traits<char>>(&std::cout, "Wrong choice"); std::ostream::operator<<(v40, &std::endl<char,std::char_traits<char>>); } }
|