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 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
| const asksvAESlv6Y = "a9tfUJutFN8sjZh1"; const asiy2lKidURh = "bgHf4XlTXywlQarV"; const ackoBEs4yTKN = "dO3WnWluQNHauldH"; const aciOunjFiMyA = "fOsbkMQ7qMMJ4xn5"; const dskyrOQPMrLC = "hRjA29JvTwJXnmZl"; const dsi5ivV1Kf7l = "xeQJT9nq4urlywGp"; const dcktdnp37Lh5 = "ocvRlZoHX7KnKYSx"; const dciROqfwYVC9 = "pl20yMKRdtrBM9D1"; const aes_local_key = 'emhlbnFpcGFsbWtleQ=='; const aes_local_iv = 'emhlbnFpcGFsbWl2'; var BASE64 = { encrypt: function(text) { var b = new Base64(); return b.encode(text) }, decrypt: function(text) { var b = new Base64(); return b.decode(text) } }; var DES = { encrypt: function(text, key, iv) { var secretkey = (CryptoJS.MD5(key).toString()).substr(0, 16); var secretiv = (CryptoJS.MD5(iv).toString()).substr(24, 8); secretkey = CryptoJS.enc.Utf8.parse(secretkey); secretiv = CryptoJS.enc.Utf8.parse(secretiv); var result = CryptoJS.DES.encrypt(text, secretkey, { iv: secretiv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); return result.toString() }, decrypt: function(text, key, iv) { var secretkey = (CryptoJS.MD5(key).toString()).substr(0, 16); var secretiv = (CryptoJS.MD5(iv).toString()).substr(24, 8); secretkey = CryptoJS.enc.Utf8.parse(secretkey); secretiv = CryptoJS.enc.Utf8.parse(secretiv); var result = CryptoJS.DES.decrypt(text, secretkey, { iv: secretiv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); return result.toString(CryptoJS.enc.Utf8) } }; var AES = { encrypt: function(text, key, iv) { var secretkey = (CryptoJS.MD5(key).toString()).substr(16, 16); var secretiv = (CryptoJS.MD5(iv).toString()).substr(0, 16); secretkey = CryptoJS.enc.Utf8.parse(secretkey); secretiv = CryptoJS.enc.Utf8.parse(secretiv); var result = CryptoJS.AES.encrypt(text, secretkey, { iv: secretiv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); return result.toString() }, decrypt: function(text, key, iv) { var secretkey = (CryptoJS.MD5(key).toString()).substr(16, 16); var secretiv = (CryptoJS.MD5(iv).toString()).substr(0, 16); secretkey = CryptoJS.enc.Utf8.parse(secretkey); secretiv = CryptoJS.enc.Utf8.parse(secretiv); var result = CryptoJS.AES.decrypt(text, secretkey, { iv: secretiv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); return result.toString(CryptoJS.enc.Utf8) } }; var localStorageUtil = { save: function(name, value) { var text = JSON.stringify(value); text = BASE64.encrypt(text); text = AES.encrypt(text, aes_local_key, aes_local_iv); try { localStorage.setItem(name, text) } catch (oException) { if (oException.name === 'QuotaExceededError') { localStorage.clear(); localStorage.setItem(name, text) } } }, check: function(name) { return localStorage.getItem(name) }, getValue: function(name) { var text = localStorage.getItem(name); var result = null; if (text) { text = AES.decrypt(text, aes_local_key, aes_local_iv); text = BASE64.decrypt(text); result = JSON.parse(text) } return result }, remove: function(name) { localStorage.removeItem(name) } }; function dBSZMW3M6n3(pmK6Hbv) { pmK6Hbv = DES.decrypt(pmK6Hbv, dskyrOQPMrLC, dsi5ivV1Kf7l); return pmK6Hbv } function dG8KpaYpqH(pmK6Hbv) { pmK6Hbv = AES.decrypt(pmK6Hbv, asksvAESlv6Y, asiy2lKidURh); return pmK6Hbv } function gXUbeHrdoLCeYe0p(key, period) { if (typeof period === 'undefined') { period = 0 } var d = DES.encrypt(key); d = BASE64.encrypt(key); var data = localStorageUtil.getValue(key); if (data) { const time = data.time; const current = new Date().getTime(); if (new Date().getHours() >= 0 && new Date().getHours() < 5 && period > 1) { period = 1 } if (current - (period * 60 * 60 * 1000) > time) { data = null } if (new Date().getHours() >= 5 && new Date(time).getDate() !== new Date().getDate() && period === 24) { data = null } } return data } function ObjectSort(obj) { var newObject = {}; Object.keys(obj).sort().map(function(key) { newObject[key] = obj[key] }); return newObject } function dvsQWNF2EO4XbKrd(data) { data = AES.decrypt(data, asksvAESlv6Y, asiy2lKidURh); data = DES.decrypt(data, dskyrOQPMrLC, dsi5ivV1Kf7l); data = BASE64.decrypt(data); return data } var pSeoLCOw4K = (function() { function ObjectSort(obj) { var newObject = {}; Object.keys(obj).sort().map(function(key) { newObject[key] = obj[key] }); return newObject } return function(method, obj) { var appId = 'e75f0f57c0ec8c9a0f7b1312302ef91f'; var clienttype = 'WEB'; var timestamp = new Date().getTime(); var param = { appId: appId, method: method, timestamp: timestamp, clienttype: clienttype, object: obj, secret: hex_md5(appId + method + timestamp + clienttype + JSON.stringify(ObjectSort(obj))) }; param = BASE64.encrypt(JSON.stringify(param)); param = DES.encrypt(param, dcktdnp37Lh5, dciROqfwYVC9); return param } } )(); function getData(mWZUgc23O, orY2UnQfh7, coGmO8LCQ, pz0mxss) { const k6Bx = hex_md5(mWZUgc23O + JSON.stringify(orY2UnQfh7)); const dSQsW = gXUbeHrdoLCeYe0p(k6Bx, pz0mxss); if (!dSQsW) { var pmK6Hbv = pSeoLCOw4K(mWZUgc23O, orY2UnQfh7); $.ajax({ url: '../apinew/aqistudyapi.php', data: { hu8slNEvY: pmK6Hbv }, type: "post", success: function(dSQsW) { dSQsW = dvsQWNF2EO4XbKrd(dSQsW); onMCfI = JSON.parse(dSQsW); if (onMCfI.success) { if (pz0mxss > 0) { onMCfI.result.time = new Date().getTime(); localStorageUtil.save(k6Bx, onMCfI.result) } coGmO8LCQ(onMCfI.result) } else { console.log(onMCfI.errcode, onMCfI.errmsg) } } }) } else { coGmO8LCQ(dSQsW) } }
|