├── README.md ├── Showcase.gif ├── arkose.js ├── decrypt_bda.py ├── decrypt_tguess.py ├── main.py └── webgl.json /README.md: -------------------------------------------------------------------------------- 1 | # Arkose Funcaptcha Solver 2 | 3 | Funcaptcha Solver made by kek! 🚀 4 | https://t.me/kokandg 5 | 6 | ## Features 7 | - Proxy HTTPS Support 8 | - 100% Requests Based 9 | - Fully reversed BDA 10 | - Unflagged asf 11 | 12 | ## Usage 13 | 14 | To implement this script in your project, you can follow a similar approach as shown below: 15 | 16 | ```python 17 | import requests 18 | 19 | session=requests.Session() 20 | 21 | task=session.post("http://127.0.0.1:8003/funcaptcha/createTask",json={ 22 | "preset": "outlook_register", 23 | "chrome_version": "130", 24 | "proxy": self.proxy, 25 | "blob": blob, 26 | }).json() 27 | 28 | while True: 29 | token=session.post("http://127.0.0.1:8003/funcaptcha/getTask",json={ 30 | "task_id": task["task_id"] 31 | }).json() 32 | 33 | if token["status"]=="completed": 34 | return token["captcha"]["token"] 35 | 36 | time.sleep(1) 37 | ``` 38 | 39 | ## Showcase 40 | 41 | ![Showcase](Showcase.gif) 42 | 43 | **Remember:** This doesnt include the image classification. If you want classification you can for example use XEvil 44 | -------------------------------------------------------------------------------- /Showcase.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kekeds/funcaptcha-solver/8e71540fc2fcf7958039a60113069388327b2447/Showcase.gif -------------------------------------------------------------------------------- /arkose.js: -------------------------------------------------------------------------------- 1 | Qe=function(t) { 2 | "use strict"; 3 | var e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; 4 | function n(t, e) { 5 | var n = t[0] 6 | , r = t[1] 7 | , o = t[2] 8 | , i = t[3]; 9 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & o | ~r & i) + e[0] - 680876936 | 0) << 7 | n >>> 25) + r | 0) & r | ~n & o) + e[1] - 389564586 | 0) << 12 | i >>> 20) + n | 0) & n | ~i & r) + e[2] + 606105819 | 0) << 17 | o >>> 15) + i | 0) & i | ~o & n) + e[3] - 1044525330 | 0) << 22 | r >>> 10) + o | 0, 10 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & o | ~r & i) + e[4] - 176418897 | 0) << 7 | n >>> 25) + r | 0) & r | ~n & o) + e[5] + 1200080426 | 0) << 12 | i >>> 20) + n | 0) & n | ~i & r) + e[6] - 1473231341 | 0) << 17 | o >>> 15) + i | 0) & i | ~o & n) + e[7] - 45705983 | 0) << 22 | r >>> 10) + o | 0, 11 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & o | ~r & i) + e[8] + 1770035416 | 0) << 7 | n >>> 25) + r | 0) & r | ~n & o) + e[9] - 1958414417 | 0) << 12 | i >>> 20) + n | 0) & n | ~i & r) + e[10] - 42063 | 0) << 17 | o >>> 15) + i | 0) & i | ~o & n) + e[11] - 1990404162 | 0) << 22 | r >>> 10) + o | 0, 12 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & o | ~r & i) + e[12] + 1804603682 | 0) << 7 | n >>> 25) + r | 0) & r | ~n & o) + e[13] - 40341101 | 0) << 12 | i >>> 20) + n | 0) & n | ~i & r) + e[14] - 1502002290 | 0) << 17 | o >>> 15) + i | 0) & i | ~o & n) + e[15] + 1236535329 | 0) << 22 | r >>> 10) + o | 0, 13 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & i | o & ~i) + e[1] - 165796510 | 0) << 5 | n >>> 27) + r | 0) & o | r & ~o) + e[6] - 1069501632 | 0) << 9 | i >>> 23) + n | 0) & r | n & ~r) + e[11] + 643717713 | 0) << 14 | o >>> 18) + i | 0) & n | i & ~n) + e[0] - 373897302 | 0) << 20 | r >>> 12) + o | 0, 14 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & i | o & ~i) + e[5] - 701558691 | 0) << 5 | n >>> 27) + r | 0) & o | r & ~o) + e[10] + 38016083 | 0) << 9 | i >>> 23) + n | 0) & r | n & ~r) + e[15] - 660478335 | 0) << 14 | o >>> 18) + i | 0) & n | i & ~n) + e[4] - 405537848 | 0) << 20 | r >>> 12) + o | 0, 15 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & i | o & ~i) + e[9] + 568446438 | 0) << 5 | n >>> 27) + r | 0) & o | r & ~o) + e[14] - 1019803690 | 0) << 9 | i >>> 23) + n | 0) & r | n & ~r) + e[3] - 187363961 | 0) << 14 | o >>> 18) + i | 0) & n | i & ~n) + e[8] + 1163531501 | 0) << 20 | r >>> 12) + o | 0, 16 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r & i | o & ~i) + e[13] - 1444681467 | 0) << 5 | n >>> 27) + r | 0) & o | r & ~o) + e[2] - 51403784 | 0) << 9 | i >>> 23) + n | 0) & r | n & ~r) + e[7] + 1735328473 | 0) << 14 | o >>> 18) + i | 0) & n | i & ~n) + e[12] - 1926607734 | 0) << 20 | r >>> 12) + o | 0, 17 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r ^ o ^ i) + e[5] - 378558 | 0) << 4 | n >>> 28) + r | 0) ^ r ^ o) + e[8] - 2022574463 | 0) << 11 | i >>> 21) + n | 0) ^ n ^ r) + e[11] + 1839030562 | 0) << 16 | o >>> 16) + i | 0) ^ i ^ n) + e[14] - 35309556 | 0) << 23 | r >>> 9) + o | 0, 18 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r ^ o ^ i) + e[1] - 1530992060 | 0) << 4 | n >>> 28) + r | 0) ^ r ^ o) + e[4] + 1272893353 | 0) << 11 | i >>> 21) + n | 0) ^ n ^ r) + e[7] - 155497632 | 0) << 16 | o >>> 16) + i | 0) ^ i ^ n) + e[10] - 1094730640 | 0) << 23 | r >>> 9) + o | 0, 19 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r ^ o ^ i) + e[13] + 681279174 | 0) << 4 | n >>> 28) + r | 0) ^ r ^ o) + e[0] - 358537222 | 0) << 11 | i >>> 21) + n | 0) ^ n ^ r) + e[3] - 722521979 | 0) << 16 | o >>> 16) + i | 0) ^ i ^ n) + e[6] + 76029189 | 0) << 23 | r >>> 9) + o | 0, 20 | r = ((r += ((o = ((o += ((i = ((i += ((n = ((n += (r ^ o ^ i) + e[9] - 640364487 | 0) << 4 | n >>> 28) + r | 0) ^ r ^ o) + e[12] - 421815835 | 0) << 11 | i >>> 21) + n | 0) ^ n ^ r) + e[15] + 530742520 | 0) << 16 | o >>> 16) + i | 0) ^ i ^ n) + e[2] - 995338651 | 0) << 23 | r >>> 9) + o | 0, 21 | r = ((r += ((i = ((i += (r ^ ((n = ((n += (o ^ (r | ~i)) + e[0] - 198630844 | 0) << 6 | n >>> 26) + r | 0) | ~o)) + e[7] + 1126891415 | 0) << 10 | i >>> 22) + n | 0) ^ ((o = ((o += (n ^ (i | ~r)) + e[14] - 1416354905 | 0) << 15 | o >>> 17) + i | 0) | ~n)) + e[5] - 57434055 | 0) << 21 | r >>> 11) + o | 0, 22 | r = ((r += ((i = ((i += (r ^ ((n = ((n += (o ^ (r | ~i)) + e[12] + 1700485571 | 0) << 6 | n >>> 26) + r | 0) | ~o)) + e[3] - 1894986606 | 0) << 10 | i >>> 22) + n | 0) ^ ((o = ((o += (n ^ (i | ~r)) + e[10] - 1051523 | 0) << 15 | o >>> 17) + i | 0) | ~n)) + e[1] - 2054922799 | 0) << 21 | r >>> 11) + o | 0, 23 | r = ((r += ((i = ((i += (r ^ ((n = ((n += (o ^ (r | ~i)) + e[8] + 1873313359 | 0) << 6 | n >>> 26) + r | 0) | ~o)) + e[15] - 30611744 | 0) << 10 | i >>> 22) + n | 0) ^ ((o = ((o += (n ^ (i | ~r)) + e[6] - 1560198380 | 0) << 15 | o >>> 17) + i | 0) | ~n)) + e[13] + 1309151649 | 0) << 21 | r >>> 11) + o | 0, 24 | r = ((r += ((i = ((i += (r ^ ((n = ((n += (o ^ (r | ~i)) + e[4] - 145523070 | 0) << 6 | n >>> 26) + r | 0) | ~o)) + e[11] - 1120210379 | 0) << 10 | i >>> 22) + n | 0) ^ ((o = ((o += (n ^ (i | ~r)) + e[2] + 718787259 | 0) << 15 | o >>> 17) + i | 0) | ~n)) + e[9] - 343485551 | 0) << 21 | r >>> 11) + o | 0, 25 | t[0] = n + t[0] | 0, 26 | t[1] = r + t[1] | 0, 27 | t[2] = o + t[2] | 0, 28 | t[3] = i + t[3] | 0 29 | } 30 | function r(t) { 31 | var e, n = []; 32 | for (e = 0; e < 64; e += 4) 33 | n[e >> 2] = t.charCodeAt(e) + (t.charCodeAt(e + 1) << 8) + (t.charCodeAt(e + 2) << 16) + (t.charCodeAt(e + 3) << 24); 34 | return n 35 | } 36 | function o(t) { 37 | var e, n = []; 38 | for (e = 0; e < 64; e += 4) 39 | n[e >> 2] = t[e] + (t[e + 1] << 8) + (t[e + 2] << 16) + (t[e + 3] << 24); 40 | return n 41 | } 42 | function i(t) { 43 | var e, o, i, a, c, u, s = t.length, f = [1732584193, -271733879, -1732584194, 271733878]; 44 | for (e = 64; e <= s; e += 64) 45 | n(f, r(t.substring(e - 64, e))); 46 | for (o = (t = t.substring(e - 64)).length, 47 | i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 48 | e = 0; e < o; e += 1) 49 | i[e >> 2] |= t.charCodeAt(e) << (e % 4 << 3); 50 | if (i[e >> 2] |= 128 << (e % 4 << 3), 51 | e > 55) 52 | for (n(f, i), 53 | e = 0; e < 16; e += 1) 54 | i[e] = 0; 55 | return a = (a = 8 * s).toString(16).match(/(.*?)(.{0,8})$/), 56 | c = parseInt(a[2], 16), 57 | u = parseInt(a[1], 16) || 0, 58 | i[14] = c, 59 | i[15] = u, 60 | n(f, i), 61 | f 62 | } 63 | function a(t) { 64 | var e, r, i, a, c, u, s = t.length, f = [1732584193, -271733879, -1732584194, 271733878]; 65 | for (e = 64; e <= s; e += 64) 66 | n(f, o(t.subarray(e - 64, e))); 67 | for (r = (t = e - 64 < s ? t.subarray(e - 64) : new Uint8Array(0)).length, 68 | i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 69 | e = 0; e < r; e += 1) 70 | i[e >> 2] |= t[e] << (e % 4 << 3); 71 | if (i[e >> 2] |= 128 << (e % 4 << 3), 72 | e > 55) 73 | for (n(f, i), 74 | e = 0; e < 16; e += 1) 75 | i[e] = 0; 76 | return a = (a = 8 * s).toString(16).match(/(.*?)(.{0,8})$/), 77 | c = parseInt(a[2], 16), 78 | u = parseInt(a[1], 16) || 0, 79 | i[14] = c, 80 | i[15] = u, 81 | n(f, i), 82 | f 83 | } 84 | function c(t) { 85 | var n, r = ""; 86 | for (n = 0; n < 4; n += 1) 87 | r += e[t >> 8 * n + 4 & 15] + e[t >> 8 * n & 15]; 88 | return r 89 | } 90 | function u(t) { 91 | var e; 92 | for (e = 0; e < t.length; e += 1) 93 | t[e] = c(t[e]); 94 | return t.join("") 95 | } 96 | function s(t) { 97 | return /[\u0080-\uFFFF]/.test(t) && (t = unescape(encodeURIComponent(t))), 98 | t 99 | } 100 | function f(t, e) { 101 | var n, r = t.length, o = new ArrayBuffer(r), i = new Uint8Array(o); 102 | for (n = 0; n < r; n += 1) 103 | i[n] = t.charCodeAt(n); 104 | return e ? i : o 105 | } 106 | function l(t) { 107 | return String.fromCharCode.apply(null, new Uint8Array(t)) 108 | } 109 | function p(t, e, n) { 110 | var r = new Uint8Array(t.byteLength + e.byteLength); 111 | return r.set(new Uint8Array(t)), 112 | r.set(new Uint8Array(e), t.byteLength), 113 | n ? r : r.buffer 114 | } 115 | function h(t) { 116 | var e, n = [], r = t.length; 117 | for (e = 0; e < r - 1; e += 2) 118 | n.push(parseInt(t.substr(e, 2), 16)); 119 | return String.fromCharCode.apply(String, n) 120 | } 121 | function v() { 122 | this.reset() 123 | } 124 | return u(i("hello")), 125 | "undefined" == typeof ArrayBuffer || ArrayBuffer.prototype.slice || function() { 126 | function e(t, e) { 127 | return (t = 0 | t || 0) < 0 ? Math.max(t + e, 0) : Math.min(t, e) 128 | } 129 | ArrayBuffer.prototype.slice = function(n, r) { 130 | var o, i, a, c, u = this.byteLength, s = e(n, u), f = u; 131 | return r !== t && (f = e(r, u)), 132 | s > f ? new ArrayBuffer(0) : (o = f - s, 133 | i = new ArrayBuffer(o), 134 | a = new Uint8Array(i), 135 | c = new Uint8Array(this,s,o), 136 | a.set(c), 137 | i) 138 | } 139 | }(), 140 | v.prototype.append = function(t) { 141 | return this.appendBinary(s(t)), 142 | this 143 | } 144 | , 145 | v.prototype.appendBinary = function(t) { 146 | this._buff += t, 147 | this._length += t.length; 148 | var e, o = this._buff.length; 149 | for (e = 64; e <= o; e += 64) 150 | n(this._hash, r(this._buff.substring(e - 64, e))); 151 | return this._buff = this._buff.substring(e - 64), 152 | this 153 | } 154 | , 155 | v.prototype.end = function(t) { 156 | var e, n, r = this._buff, o = r.length, i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 157 | for (e = 0; e < o; e += 1) 158 | i[e >> 2] |= r.charCodeAt(e) << (e % 4 << 3); 159 | return this._finish(i, o), 160 | n = u(this._hash), 161 | t && (n = h(n)), 162 | this.reset(), 163 | n 164 | } 165 | , 166 | v.prototype.reset = function() { 167 | return this._buff = "", 168 | this._length = 0, 169 | this._hash = [1732584193, -271733879, -1732584194, 271733878], 170 | this 171 | } 172 | , 173 | v.prototype.getState = function() { 174 | return { 175 | buff: this._buff, 176 | length: this._length, 177 | hash: this._hash.slice() 178 | } 179 | } 180 | , 181 | v.prototype.setState = function(t) { 182 | return this._buff = t.buff, 183 | this._length = t.length, 184 | this._hash = t.hash, 185 | this 186 | } 187 | , 188 | v.prototype.destroy = function() { 189 | delete this._hash, 190 | delete this._buff, 191 | delete this._length 192 | } 193 | , 194 | v.prototype._finish = function(t, e) { 195 | var r, o, i, a = e; 196 | if (t[a >> 2] |= 128 << (a % 4 << 3), 197 | a > 55) 198 | for (n(this._hash, t), 199 | a = 0; a < 16; a += 1) 200 | t[a] = 0; 201 | r = (r = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), 202 | o = parseInt(r[2], 16), 203 | i = parseInt(r[1], 16) || 0, 204 | t[14] = o, 205 | t[15] = i, 206 | n(this._hash, t) 207 | } 208 | , 209 | v.hash = function(t, e) { 210 | return v.hashBinary(s(t), e) 211 | } 212 | , 213 | v.hashBinary = function(t, e) { 214 | var n = u(i(t)); 215 | return e ? h(n) : n 216 | } 217 | , 218 | v.ArrayBuffer = function() { 219 | this.reset() 220 | } 221 | , 222 | v.ArrayBuffer.prototype.append = function(t) { 223 | var e, r = p(this._buff.buffer, t, !0), i = r.length; 224 | for (this._length += t.byteLength, 225 | e = 64; e <= i; e += 64) 226 | n(this._hash, o(r.subarray(e - 64, e))); 227 | return this._buff = e - 64 < i ? new Uint8Array(r.buffer.slice(e - 64)) : new Uint8Array(0), 228 | this 229 | } 230 | , 231 | v.ArrayBuffer.prototype.end = function(t) { 232 | var e, n, r = this._buff, o = r.length, i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 233 | for (e = 0; e < o; e += 1) 234 | i[e >> 2] |= r[e] << (e % 4 << 3); 235 | return this._finish(i, o), 236 | n = u(this._hash), 237 | t && (n = h(n)), 238 | this.reset(), 239 | n 240 | } 241 | , 242 | v.ArrayBuffer.prototype.reset = function() { 243 | return this._buff = new Uint8Array(0), 244 | this._length = 0, 245 | this._hash = [1732584193, -271733879, -1732584194, 271733878], 246 | this 247 | } 248 | , 249 | v.ArrayBuffer.prototype.getState = function() { 250 | var t = v.prototype.getState.call(this); 251 | return t.buff = l(t.buff), 252 | t 253 | } 254 | , 255 | v.ArrayBuffer.prototype.setState = function(t) { 256 | return t.buff = f(t.buff, !0), 257 | v.prototype.setState.call(this, t) 258 | } 259 | , 260 | v.ArrayBuffer.prototype.destroy = v.prototype.destroy, 261 | v.ArrayBuffer.prototype._finish = v.prototype._finish, 262 | v.ArrayBuffer.hash = function(t, e) { 263 | var n = u(a(new Uint8Array(t))); 264 | return e ? h(n) : n 265 | } 266 | , 267 | v 268 | } 269 | 270 | data=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0,0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 271 | 272 | let genkey = function (t, e) { 273 | function transformString(str) { 274 | let transformed = '' 275 | for (let i = 0; i < str.length; i += 2) { 276 | let e = str.charCodeAt(i) 277 | let n = str.charCodeAt(i + 1) 278 | transformed += String.fromCharCode((data[e] << 4) + data[n]) 279 | } 280 | return transformed 281 | } 282 | let u = t + transformString(e) 283 | let s = [] 284 | s[0] = Qe().hashBinary(u, true) 285 | let f = s[0] 286 | for (let l = 1; l < 3; l++) { 287 | s[l] = Qe().hashBinary(s[l - 1] + u, true) 288 | f += s[l] 289 | } 290 | function toUint8Array(str) { 291 | let array = new Uint8Array(str.length) 292 | for (let i = 0; i < str.length; ++i) { 293 | array[i] = str.charCodeAt(i) 294 | } 295 | return array 296 | } 297 | return toUint8Array(f.substring(0, 32)) 298 | } 299 | 300 | randsigbyte=function(e) { 301 | for (var r, n = [], i = function(e) { 302 | var r = 987654321 303 | , n = 4294967295; 304 | return function() { 305 | var i = ((r = 36969 * (65535 & r) + (r >> 16) & n) << 16) + (e = 18e3 * (65535 & e) + (e >> 16) & n) & n; 306 | return i /= 4294967296, 307 | (i += .5) * (Math.random() > .5 ? 1 : -1) 308 | } 309 | }, o = 0; o < e; o += 4) { 310 | var s = i(4294967296 * (r || Math.random())); 311 | r = 987654071 * s(), 312 | n.push(4294967296 * s() | 0) 313 | } 314 | return n 315 | } 316 | 317 | var x64Add = function (t, r) { 318 | (t = [t[0] >>> 16, 65535 & t[0], t[1] >>> 16, 65535 & t[1]]), 319 | (r = [r[0] >>> 16, 65535 & r[0], r[1] >>> 16, 65535 & r[1]]); 320 | var e = [0, 0, 0, 0]; 321 | return ((e[3] += t[3] + r[3]), 322 | (e[2] += e[3] >>> 16), 323 | (e[3] &= 65535), 324 | (e[2] += t[2] + r[2]), 325 | (e[1] += e[2] >>> 16), 326 | (e[2] &= 65535), 327 | (e[1] += t[1] + r[1]), 328 | (e[0] += e[1] >>> 16), 329 | (e[1] &= 65535), 330 | (e[0] += t[0] + r[0]), 331 | (e[0] &= 65535), 332 | [(e[0] << 16) | e[1], (e[2] << 16) | e[3]]); 333 | }, 334 | 335 | x64Multiply = function (t, r) { 336 | (t = [t[0] >>> 16, 65535 & t[0], t[1] >>> 16, 65535 & t[1]]), 337 | (r = [r[0] >>> 16, 65535 & r[0], r[1] >>> 16, 65535 & r[1]]); 338 | var e = [0, 0, 0, 0]; 339 | return ((e[3] += t[3] * r[3]), 340 | (e[2] += e[3] >>> 16), 341 | (e[3] &= 65535), 342 | (e[2] += t[2] * r[3]), 343 | (e[1] += e[2] >>> 16), 344 | (e[2] &= 65535), 345 | (e[2] += t[3] * r[2]), 346 | (e[1] += e[2] >>> 16), 347 | (e[2] &= 65535), 348 | (e[1] += t[1] * r[3]), 349 | (e[0] += e[1] >>> 16), 350 | (e[1] &= 65535), 351 | (e[1] += t[2] * r[2]), 352 | (e[0] += e[1] >>> 16), 353 | (e[1] &= 65535), 354 | (e[1] += t[3] * r[1]), 355 | (e[0] += e[1] >>> 16), 356 | (e[1] &= 65535), 357 | (e[0] += t[0] * r[3] + t[1] * r[2] + t[2] * r[1] + t[3] * r[0]), 358 | (e[0] &= 65535), 359 | [(e[0] << 16) | e[1], (e[2] << 16) | e[3]]); 360 | }, 361 | 362 | x64Rotl = function (t, r) { 363 | return 32 === (r %= 64) 364 | ? [t[1], t[0]] 365 | : r < 32 366 | ? [ 367 | (t[0] << r) | (t[1] >>> (32 - r)), 368 | (t[1] << r) | (t[0] >>> (32 - r)), 369 | ] 370 | : ((r -= 32), 371 | [ 372 | (t[1] << r) | (t[0] >>> (32 - r)), 373 | (t[0] << r) | (t[1] >>> (32 - r)), 374 | ]); 375 | }, 376 | 377 | x64LeftShift = function (t, r) { 378 | return 0 === (r %= 64) 379 | ? t 380 | : r < 32 381 | ? [(t[0] << r) | (t[1] >>> (32 - r)), t[1] << r] 382 | : [t[1] << (r - 32), 0]; 383 | }, 384 | 385 | x64Xor = function (t, r) { 386 | return [t[0] ^ r[0], t[1] ^ r[1]]; 387 | }, 388 | 389 | x64Fmix = function (t) { 390 | return ((t = x64Xor(t, [0, t[0] >>> 1])), 391 | (t = x64Multiply(t, [4283543511, 3981806797])), 392 | (t = x64Xor(t, [0, t[0] >>> 1])), 393 | (t = x64Multiply(t, [3301882366, 444984403])), 394 | (t = x64Xor(t, [0, t[0] >>> 1]))); 395 | }, 396 | 397 | x64hash128 = function (t, r) { 398 | r = r || 0; 399 | for (var e = (t = t || "").length % 16, o = t.length - e, x = [0, r], c = [0, r], h = [0, 0], a = [0, 0], d = [2277735313, 289559509], i = [1291169091, 658871167], l = 0; l < o; l += 16) 400 | (h = [ 401 | (255 & t.charCodeAt(l + 4)) | 402 | ((255 & t.charCodeAt(l + 5)) << 8) | 403 | ((255 & t.charCodeAt(l + 6)) << 16) | 404 | ((255 & t.charCodeAt(l + 7)) << 24), 405 | (255 & t.charCodeAt(l)) | 406 | ((255 & t.charCodeAt(l + 1)) << 8) | 407 | ((255 & t.charCodeAt(l + 2)) << 16) | 408 | ((255 & t.charCodeAt(l + 3)) << 24), 409 | ]), 410 | (a = [ 411 | (255 & t.charCodeAt(l + 12)) | 412 | ((255 & t.charCodeAt(l + 13)) << 8) | 413 | ((255 & t.charCodeAt(l + 14)) << 16) | 414 | ((255 & t.charCodeAt(l + 15)) << 24), 415 | (255 & t.charCodeAt(l + 8)) | 416 | ((255 & t.charCodeAt(l + 9)) << 8) | 417 | ((255 & t.charCodeAt(l + 10)) << 16) | 418 | ((255 & t.charCodeAt(l + 11)) << 24), 419 | ]), 420 | (h = x64Multiply(h, d)), 421 | (h = x64Rotl(h, 31)), 422 | (h = x64Multiply(h, i)), 423 | (x = x64Xor(x, h)), 424 | (x = x64Rotl(x, 27)), 425 | (x = x64Add(x, c)), 426 | (x = x64Add(x64Multiply(x, [0, 5]), [0, 1390208809])), 427 | (a = x64Multiply(a, i)), 428 | (a = x64Rotl(a, 33)), 429 | (a = x64Multiply(a, d)), 430 | (c = x64Xor(c, a)), 431 | (c = x64Rotl(c, 31)), 432 | (c = x64Add(c, x)), 433 | (c = x64Add(x64Multiply(c, [0, 5]), [0, 944331445])); 434 | switch (((h = [0, 0]), (a = [0, 0]), e)) { 435 | case 15: 436 | a = x64Xor(a, x64LeftShift([0, t.charCodeAt(l + 14)], 48)); 437 | case 14: 438 | a = x64Xor(a, x64LeftShift([0, t.charCodeAt(l + 13)], 40)); 439 | case 13: 440 | a = x64Xor(a, x64LeftShift([0, t.charCodeAt(l + 12)], 32)); 441 | case 12: 442 | a = x64Xor(a, x64LeftShift([0, t.charCodeAt(l + 11)], 24)); 443 | case 11: 444 | a = x64Xor(a, x64LeftShift([0, t.charCodeAt(l + 10)], 16)); 445 | case 10: 446 | a = x64Xor(a, x64LeftShift([0, t.charCodeAt(l + 9)], 8)); 447 | case 9: 448 | (a = x64Xor(a, [0, t.charCodeAt(l + 8)])), 449 | (a = x64Multiply(a, i)), 450 | (a = x64Rotl(a, 33)), 451 | (a = x64Multiply(a, d)), 452 | (c = x64Xor(c, a)); 453 | case 8: 454 | h = x64Xor(h, x64LeftShift([0, t.charCodeAt(l + 7)], 56)); 455 | case 7: 456 | h = x64Xor(h, x64LeftShift([0, t.charCodeAt(l + 6)], 48)); 457 | case 6: 458 | h = x64Xor(h, x64LeftShift([0, t.charCodeAt(l + 5)], 40)); 459 | case 5: 460 | h = x64Xor(h, x64LeftShift([0, t.charCodeAt(l + 4)], 32)); 461 | case 4: 462 | h = x64Xor(h, x64LeftShift([0, t.charCodeAt(l + 3)], 24)); 463 | case 3: 464 | h = x64Xor(h, x64LeftShift([0, t.charCodeAt(l + 2)], 16)); 465 | case 2: 466 | h = x64Xor(h, x64LeftShift([0, t.charCodeAt(l + 1)], 8)); 467 | case 1: 468 | (h = x64Xor(h, [0, t.charCodeAt(l)])), 469 | (h = x64Multiply(h, d)), 470 | (h = x64Rotl(h, 31)), 471 | (h = x64Multiply(h, i)), 472 | (x = x64Xor(x, h)); 473 | } 474 | return ((x = x64Xor(x, [0, t.length])), 475 | (c = x64Xor(c, [0, t.length])), 476 | (x = x64Add(x, c)), 477 | (c = x64Add(c, x)), 478 | (x = x64Fmix(x)), 479 | (c = x64Fmix(c)), 480 | (x = x64Add(x, c)), 481 | (c = x64Add(c, x)), 482 | ("00000000" + (x[0] >>> 0).toString(16)).slice(-8) + 483 | ("00000000" + (x[1] >>> 0).toString(16)).slice(-8) + 484 | ("00000000" + (c[0] >>> 0).toString(16)).slice(-8) + 485 | ("00000000" + (c[1] >>> 0).toString(16)).slice(-8)); 486 | }; -------------------------------------------------------------------------------- /decrypt_bda.py: -------------------------------------------------------------------------------- 1 | from Crypto.Cipher import AES 2 | import base64, json, execjs, time, binascii 3 | 4 | class Utils: 5 | @staticmethod 6 | def dict_to_list(data: dict) -> list: 7 | result=[] 8 | for obj in data: 9 | result.append(data[obj]) 10 | 11 | return result 12 | 13 | class Arkose: 14 | @staticmethod 15 | def generate_key(ctx:execjs.compile, s_value:str, useragent:str) -> list: 16 | key=Utils.dict_to_list(ctx.call( 17 | 'genkey', 18 | useragent, 19 | s_value 20 | )) 21 | return key 22 | 23 | @staticmethod 24 | def x_ark_value() -> str: 25 | now=int(time.time()) 26 | return str(now - (now % 21600)) 27 | 28 | def main(): 29 | test=base64.b64decode(input("Bda: ").encode()) 30 | res=json.loads(test) 31 | ctx = execjs.compile(open("arkose.js").read()) 32 | key=bytes(Arkose.generate_key( 33 | ctx, 34 | res["s"], 35 | f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36{Arkose.x_ark_value()}" 36 | )) 37 | iv=binascii.unhexlify(res["iv"]) 38 | cipher = AES.new(key, AES.MODE_CBC, iv) 39 | decryptedtext = cipher.decrypt(base64.b64decode(res["ct"])) 40 | print(decryptedtext.decode()) 41 | 42 | if __name__ =='__main__': 43 | main() -------------------------------------------------------------------------------- /decrypt_tguess.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from Crypto.Cipher import AES 4 | 5 | import hashlib 6 | import struct 7 | import base64 8 | import execjs 9 | import json 10 | 11 | class Utils: 12 | @staticmethod 13 | def convert_salt(words: list, sig_bytes: list) -> list: 14 | salt = b'' 15 | for word in words: 16 | salt += struct.pack('>I', word & 0xFFFFFFFF) 17 | return salt[:sig_bytes] 18 | 19 | @staticmethod 20 | def int_to_bytes(n: str, length: int) -> bytes: 21 | return n.to_bytes(length, byteorder='big', signed=True) 22 | 23 | @staticmethod 24 | def to_sigbytes(words: list, sigBytes: int) -> list: 25 | result = b''.join(Utils.int_to_bytes(word, 4) for word in words) 26 | return result[:sigBytes] 27 | 28 | @staticmethod 29 | def convert_key_to_sigbytes_format(key: bytes) -> list: 30 | key_words = [] 31 | for i in range(0, len(key), 4): 32 | word = struct.unpack('>i', key[i:i+4])[0] 33 | key_words.append(word) 34 | return key_words 35 | 36 | class Arkose: 37 | @staticmethod 38 | def generate_key_(password: str, salt: bytes, key_size: int, iterations: int) -> bytes: 39 | hasher = hashlib.md5() 40 | key = b'' 41 | block = None 42 | 43 | while len(key) < key_size: 44 | if block: 45 | hasher.update(block) 46 | hasher.update(password.encode()) 47 | hasher.update(salt) 48 | block = hasher.digest() 49 | hasher = hashlib.md5() 50 | 51 | for _ in range(1, iterations): 52 | hasher.update(block) 53 | block = hasher.digest() 54 | hasher = hashlib.md5() 55 | 56 | key += block 57 | 58 | return key[:key_size] 59 | 60 | @staticmethod 61 | def generate_other_key(data: str, salt: list) -> list: 62 | sig_bytes = 8 63 | key_size = 48 64 | iterations = 1 65 | salt = Utils.convert_salt(salt, sig_bytes) 66 | key = Arkose.generate_key_(data, salt, key_size, iterations) 67 | 68 | return Utils.convert_key_to_sigbytes_format(key) 69 | 70 | ctx = execjs.compile(open("arkose.js").read()) 71 | 72 | import binascii 73 | import base64 74 | import json 75 | from Crypto.Cipher import AES 76 | from Crypto.Util.Padding import unpad 77 | 78 | def from_sigbytes(sigBytes: bytes) -> list: 79 | padded_length = (len(sigBytes) + 3) // 4 * 4 80 | padded_bytes = sigBytes.ljust(padded_length, b'\0') 81 | 82 | words = [int.from_bytes(padded_bytes[i:i+4], byteorder='big') for i in range(0, len(padded_bytes), 4)] 83 | return words 84 | 85 | def decrypt_data(encrypted_json, main, ctx): 86 | data = json.loads(encrypted_json) 87 | ciphertext = base64.b64decode(data['ct']) 88 | iv_bytes = binascii.unhexlify(data['iv']) 89 | salt_bytes = binascii.unhexlify(data['s']) 90 | salt_words = from_sigbytes(salt_bytes) 91 | key_words = Arkose.generate_other_key(main, salt_words) 92 | key_bytes = Utils.to_sigbytes(key_words, 32) 93 | iv_bytes = Utils.to_sigbytes(key_words[-4:], 16) 94 | cipher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes) 95 | plaintext = unpad(cipher.decrypt(ciphertext), AES.block_size) 96 | 97 | return plaintext 98 | 99 | def main(): 100 | sessiontoken = '30717f9d16c739a32.6572443605' 101 | print(decrypt_data('{"ct":"zD2isDRbgZ7MYSHffHif5qYCc2NdumaOAIk/3vl9YBdpF/PZLON/aWVzEwzzRkUp","iv":"43a2a646edb1619a3c6c46746656a94a","s":"70d51865c43d1101"}', sessiontoken, ctx)) 102 | 103 | if __name__ =='__main__': 104 | main() -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes 2 | from cryptography.hazmat.backends import default_backend 3 | from cryptography.hazmat.primitives import padding 4 | from curl_cffi import requests as requests2 5 | from Crypto.Util.Padding import pad, unpad 6 | from flask import Flask, request 7 | from colorama import Fore as f 8 | from colorama import Fore as b 9 | from javascript import require 10 | from Crypto.Cipher import AES 11 | from datetime import datetime 12 | from io import BytesIO 13 | 14 | import numpy as np 15 | import contextlib 16 | import traceback 17 | import threading 18 | import binascii 19 | import secrets 20 | import hashlib 21 | import logging 22 | import string 23 | import ctypes 24 | import random 25 | import struct 26 | import base64 27 | import execjs 28 | import colr 29 | import json 30 | import uuid 31 | import time 32 | import sys 33 | import os 34 | 35 | jsdom = require('jsdom') 36 | create_script = require("vm").Script 37 | logging.getLogger('werkzeug').setLevel(logging.ERROR) 38 | with open("webgl.json") as file: 39 | webgls=json.loads(file.read()) 40 | with open("arkose.js") as file: 41 | gctx = execjs.compile(file.read()) 42 | 43 | class Utils: 44 | solved=0 45 | fail=0 46 | spm=0 47 | errors=0 48 | supc=0 49 | xxsupc=0 50 | 51 | @contextlib.contextmanager 52 | def suppress_output(): 53 | with open(os.devnull, 'w') as devnull: 54 | old_stdout = sys.stdout 55 | old_stderr = sys.stderr 56 | try: 57 | sys.stdout = devnull 58 | sys.stderr = devnull 59 | yield 60 | finally: 61 | sys.stdout = old_stdout 62 | sys.stderr = old_stderr 63 | 64 | @staticmethod 65 | def find(data, value) -> str: 66 | for item in data: 67 | if item["key"]==value: 68 | return item["value"] 69 | 70 | @staticmethod 71 | def newrelic_time() -> str: 72 | a,b=str(time.time()).split(".") 73 | return str(a+b[0:5]) 74 | 75 | @staticmethod 76 | def hex(data: str) -> str: 77 | return ''.join(f'{byte:02x}' for byte in data) 78 | 79 | @staticmethod 80 | def convert_salt(words: list, sig_bytes: list) -> list: 81 | salt = b'' 82 | for word in words: 83 | salt += struct.pack('>I', word & 0xFFFFFFFF) 84 | return salt[:sig_bytes] 85 | 86 | @staticmethod 87 | def randsalt(ctx) -> list: 88 | return ctx.call( 89 | 'randsigbyte', 90 | 8, 91 | ) 92 | 93 | @staticmethod 94 | def int_to_bytes(n: str, length: int) -> bytes: 95 | return n.to_bytes(length, byteorder='big', signed=True) 96 | 97 | @staticmethod 98 | def to_sigbytes(words: list, sigBytes: int) -> list: 99 | result = b''.join(Utils.int_to_bytes(word, 4) for word in words) 100 | return result[:sigBytes] 101 | 102 | @staticmethod 103 | def bytes_to_buffer(data: bytes) -> list: 104 | buffer=BytesIO(data) 105 | buffer.seek(0) 106 | content = buffer.read() 107 | return list(content) 108 | 109 | @staticmethod 110 | def random_integer(value: int) -> int: 111 | max_random_value = (2**32 // value) * value 112 | while True: 113 | a = secrets.randbelow(2**32) 114 | if a < max_random_value: 115 | return a % value 116 | 117 | @staticmethod 118 | def dict_to_list(data: dict) -> list: 119 | result=[] 120 | for obj in data: 121 | result.append(data[obj]) 122 | 123 | return result 124 | 125 | @staticmethod 126 | def uint8_array(size: int) -> list: 127 | v = bytearray(size) 128 | for i in range(len(v)): 129 | v[i] = Utils.random_integer(256) 130 | return Utils.bytes_to_buffer(v) 131 | 132 | @staticmethod 133 | def convert_key_to_sigbytes_format(key: bytes) -> list: 134 | key_words = [] 135 | for i in range(0, len(key), 4): 136 | word = struct.unpack('>i', key[i:i+4])[0] 137 | key_words.append(word) 138 | return key_words 139 | 140 | @staticmethod 141 | def get_coords(num:int) -> tuple: 142 | map={ 143 | 1: [0,0,100,100], 144 | 2: [100,0,200,100], 145 | 3: [200,0,300,100], 146 | 4: [0,100,100,200], 147 | 5: [100,100,200,200], 148 | 6: [200,100,300,200] 149 | } 150 | 151 | x1,y1,x2,y2=map[num] 152 | x = (x1 + x2) / 2 153 | y = (y1 + y2) / 2 154 | 155 | if random.randint(0,1): 156 | x+=random.uniform(10.00001,45.99999) 157 | else: 158 | x-=random.uniform(10.00001,45.99999) 159 | 160 | if random.randint(0,1): 161 | y+=random.randint(0,45) 162 | else: 163 | y-=random.randint(0,45) 164 | 165 | return (float(x), int(y)) 166 | 167 | @staticmethod 168 | def grid_answer_dict(answer): 169 | x,y=Utils.get_coords(answer) 170 | 171 | return { 172 | "px": str(round((x / 300),2)), 173 | "py": str(round((y / 200),2)), 174 | "x": x, 175 | "y": y 176 | } 177 | 178 | class Arkose: 179 | @staticmethod 180 | def decrypt_data(data, main): 181 | ciphertext = base64.b64decode(data['ct']) 182 | iv_bytes = binascii.unhexlify(data['iv']) 183 | salt_bytes = binascii.unhexlify(data['s']) 184 | salt_words = Arkose.from_sigbytes(salt_bytes) 185 | key_words = Arkose.generate_other_key(main, salt_words) 186 | key_bytes = Utils.to_sigbytes(key_words, 32) 187 | iv_bytes = Utils.to_sigbytes(key_words[-4:], 16) 188 | cipher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes) 189 | plaintext = unpad(cipher.decrypt(ciphertext), AES.block_size) 190 | return plaintext 191 | 192 | @staticmethod 193 | def from_sigbytes(sigBytes: bytes) -> list: 194 | padded_length = (len(sigBytes) + 3) // 4 * 4 195 | padded_bytes = sigBytes.ljust(padded_length, b'\0') 196 | 197 | words = [int.from_bytes(padded_bytes[i:i+4], byteorder='big') for i in range(0, len(padded_bytes), 4)] 198 | return words 199 | 200 | @staticmethod 201 | def encrypt_double(self, main: str, extra: str) -> str: 202 | salt_words=Utils.randsalt(gctx) 203 | key_words= Arkose.generate_other_key(main, salt_words) 204 | key_bytes = Utils.to_sigbytes(key_words, 32) 205 | iv_bytes = Utils.to_sigbytes(key_words[-4:], 16) 206 | salt_bytes= Utils.to_sigbytes(salt_words, 8) 207 | cipher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes) 208 | ciphertext = cipher.encrypt(pad(extra.encode('utf-8'), AES.block_size)) 209 | 210 | return json.dumps({ 211 | "ct":base64.b64encode(ciphertext).decode(), 212 | "iv":Utils.hex(iv_bytes), 213 | "s": Utils.hex(salt_bytes) 214 | }).replace(" ","") 215 | 216 | def is_flagged(data): 217 | if not data or not isinstance(data, list): 218 | return False 219 | values = [value for d in data for value in d.values()] 220 | if not values: 221 | return False 222 | def ends_with_uppercase(value): 223 | return value and value[-1] in string.ascii_uppercase 224 | 225 | return all(ends_with_uppercase(value) for value in values) 226 | 227 | @staticmethod 228 | def t_guess(self, session_token:str, guesses:list, dapibCode:str) -> str: 229 | sess,ion=session_token.split(".") 230 | answers=[] 231 | for guess in guesses: 232 | if "index" in str(guesses): 233 | answers.append({"index": json.loads(guess)["index"], sess:ion,}) 234 | else: 235 | guess=json.loads(guess) 236 | answers.append({"px": guess['px'] ,"py": guess['py'], "x": guess['x'], "y": guess['y'], sess:ion}) 237 | 238 | resource_loader = jsdom.ResourceLoader({"userAgent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{self.chrome_version}.0.0.0 Safari/537.36"}) 239 | vm = jsdom.JSDOM("", { 240 | "runScripts": "dangerously", 241 | "resources": resource_loader, 242 | "pretendToBeVisual": True, 243 | "storageQuota": 10000000 244 | }).getInternalVMContext() 245 | 246 | create_script(""" 247 | response=null; 248 | 249 | window.parent.ae={"answer":answers} 250 | 251 | window.parent.ae[("dapibRecei" + "ve")]=function(data) { 252 | response=JSON.stringify(data); 253 | } 254 | """.replace("answers",json.dumps(answers).replace('"index"','index'))).runInContext(vm) 255 | 256 | create_script(dapibCode).runInContext(vm) 257 | result=json.loads(create_script("response").runInContext(vm)) 258 | 259 | if Arkose.is_flagged(result["tanswer"]): 260 | for array in result["tanswer"]: 261 | for item in array: 262 | array[item]=array[item][:-1] 263 | 264 | return Arkose.encrypt_double(self, session_token, json.dumps(result["tanswer"]).replace(" ","")) 265 | 266 | @staticmethod 267 | def generate_key_(password: str, salt: bytes, key_size: int, iterations: int) -> bytes: 268 | hasher = hashlib.md5() 269 | key = b'' 270 | block = None 271 | 272 | while len(key) < key_size: 273 | if block: 274 | hasher.update(block) 275 | hasher.update(password.encode()) 276 | hasher.update(salt) 277 | block = hasher.digest() 278 | hasher = hashlib.md5() 279 | 280 | for _ in range(1, iterations): 281 | hasher.update(block) 282 | block = hasher.digest() 283 | hasher = hashlib.md5() 284 | 285 | key += block 286 | 287 | return key[:key_size] 288 | 289 | @staticmethod 290 | def generate_other_key(data: str, salt: list) -> list: 291 | sig_bytes = 8 292 | key_size = 48 293 | iterations = 1 294 | salt = Utils.convert_salt(salt, sig_bytes) 295 | key = Arkose.generate_key_(data, salt, key_size, iterations) 296 | 297 | return Utils.convert_key_to_sigbytes_format(key) 298 | 299 | @staticmethod 300 | def encrypt_ct(text: bytes, key: bytes, iv: bytes) -> bytes: 301 | encryptor = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend()).encryptor() 302 | padder = padding.PKCS7(algorithms.AES.block_size).padder() 303 | padded_plain_text = padder.update(text) + padder.finalize() 304 | cipher_text = encryptor.update(padded_plain_text) + encryptor.finalize() 305 | return cipher_text 306 | 307 | @staticmethod 308 | def generate_key(ctx:execjs.compile, s_value:str, useragent:str) -> list: 309 | key=Utils.dict_to_list(ctx.call( 310 | 'genkey', 311 | useragent, 312 | s_value 313 | )) 314 | return key 315 | 316 | @staticmethod 317 | def make_encrypted_dict(self, data:str) -> str: 318 | s_value=Utils.hex(Utils.uint8_array(8)) 319 | iv_value=Utils.uint8_array(16) 320 | key=Arkose.generate_key( 321 | gctx, 322 | s_value, 323 | f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{self.chrome_version}.0.0.0 Safari/537.36{self.x_ark_value}" 324 | ) 325 | 326 | result=Arkose.encrypt_ct( 327 | text=bytes(data.encode()), 328 | key=bytes(key), 329 | iv=bytes(iv_value) 330 | ) 331 | 332 | return json.dumps({ 333 | "ct":base64.b64encode(result).decode(), 334 | "s":s_value, 335 | "iv":Utils.hex(iv_value) 336 | }).replace(" ","") 337 | 338 | @staticmethod 339 | def x_ark_value() -> str: 340 | now=int(time.time()) 341 | return str(now - (now % 21600)) 342 | 343 | @staticmethod 344 | def generate_pt(): 345 | start_time = time.time() 346 | time.sleep(random.uniform(0.04,0.07)) 347 | end_time = time.time() 348 | 349 | pt = end_time - start_time 350 | return pt 351 | 352 | @staticmethod 353 | def generate_aht(num_trials=random.randint(1,7)): 354 | total_time = 0 355 | 356 | for _ in range(num_trials): 357 | pt = Arkose.generate_pt() 358 | total_time += pt 359 | 360 | aht = total_time / num_trials 361 | return aht 362 | 363 | @staticmethod 364 | def generate_cs(): 365 | return uuid.uuid4().hex[:10] 366 | 367 | @staticmethod 368 | def generate_g(): 369 | return uuid.uuid4().hex[:12] 370 | 371 | @staticmethod 372 | def generate_h(cs, g): 373 | data_to_hash = cs + g 374 | h = hashlib.sha256(data_to_hash.encode()).hexdigest() 375 | return h 376 | 377 | class logger: 378 | colors_table = { 379 | "green":"#65fb07", 380 | "red":"#Fb0707", 381 | "yellow":"#c4bc18", 382 | "magenta":"#b207f5", 383 | "blue":"#001aff", 384 | "cyan":"#07baf5", 385 | "gray":"#3a3d40", 386 | "white":"#ffffff", 387 | "pink":"#c203fc", 388 | "light_blue":"#07f0ec", 389 | "orange":"#FFA200", 390 | "purple": "#4500d0" 391 | } 392 | 393 | def convert(color): 394 | if not color.__contains__("#"): 395 | return logger.colors_table[color] 396 | else: 397 | return color 398 | 399 | def color(c, obj): 400 | return colr.Colr().hex(logger.convert(c), obj) 401 | 402 | def print(*args:str) -> None: 403 | date=datetime.now().strftime(f'%H:%M:%S') 404 | print(f"{logger.color('white',date)} {f.BLUE}| {b.BLUE}{logger.color('purple','Funcaptcha')}{b.RESET} | {' | '.join(args)}".replace("|",f"{f.LIGHTBLACK_EX}|{f.WHITE}")) 405 | 406 | class Funcaptcha: 407 | def __init__(self, apiurl, siteurl, sitekey, chrome_version, data, blob, custom_cookies, custom_locale, proxy=None) -> None: 408 | self.siteurl=siteurl 409 | self.sitekey=sitekey 410 | self.apiurl=apiurl 411 | self.blob=blob 412 | self.chrome_version=chrome_version 413 | self.useragent=f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{self.chrome_version}.0.0.0 Safari/537.36" 414 | self.session=requests2.Session(impersonate=None) 415 | 416 | if custom_cookies: 417 | self.session.cookies.update(custom_cookies) 418 | 419 | if custom_locale: 420 | self.locale=custom_locale 421 | else: 422 | self.locale="sv-SE" 423 | 424 | if proxy: 425 | self.session.proxies={"https":proxy} 426 | 427 | self.x_ark_value=Arkose.x_ark_value() 428 | 429 | captchadata=self.session.get(f"{self.apiurl}/v2/{self.sitekey}/api.js",headers={'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7','accept-language': f'en-US,en;q=0.9,{self.locale};q=0.8,{self.locale.split("-")[0]};q=0.7','cache-control': 'max-age=0','device-memory': '8','priority': 'u=0, i','sec-ch-dpr': '1','sec-ch-ua': '"Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"','sec-ch-ua-arch': '"x86"','sec-ch-ua-bitness': '"64"','sec-ch-ua-form-factors': '"Desktop"','sec-ch-ua-full-version-list': '"Google Chrome";v="129.0.6668.60", "Not=A?Brand";v="8.0.0.0", "Chromium";v="129.0.6668.60"','sec-ch-ua-mobile': '?0','sec-ch-ua-model': '""','sec-ch-ua-platform': '"Windows"','sec-ch-ua-platform-version': '"10.0.0"','sec-ch-viewport-width': '1133','sec-fetch-dest': 'document','sec-fetch-mode': 'navigate','sec-fetch-site': 'none','sec-fetch-user': '?1','upgrade-insecure-requests': '1','user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',} 430 | ).text.split("/enforcement.") 431 | 432 | self.capi_version=captchadata[0].split('"')[-1] 433 | self.enforcement_hash=captchadata[1].split('.html')[0] 434 | self.window__ancestor_origins=data["window__ancestor_origins"] 435 | self.window__tree_index=data["window__tree_index"] 436 | self.client_config__sitedata_location_href=data["client_config__sitedata_location_href"] 437 | self.window__tree_structure=data["window__tree_structure"] 438 | 439 | self.session.headers={ 440 | "Accept": "*/*", 441 | "Accept-Encoding": "gzip, deflate, br, zstd", 442 | "Accept-Language": f"{self.locale},{self.locale.split('-')[0]};q=0.9,en-US;q=0.8,en;q=0.7", 443 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 444 | "Connection": "keep-alive", 445 | "Host": self.apiurl.split('https://')[1], 446 | "Referer": f"{self.apiurl}/v2/{self.capi_version}/enforcement.{self.enforcement_hash}.html", 447 | "sec-ch-ua": f"\"Not)A;Brand\";v=\"99\", \"Google Chrome\";v=\"{self.chrome_version}\", \"Chromium\";v=\"{self.chrome_version}\"", 448 | "sec-ch-ua-mobile": "?0", 449 | "sec-ch-ua-platform": "\"Windows\"", 450 | "Sec-Fetch-Dest": "empty", 451 | "Sec-Fetch-Mode": "cors", 452 | "Sec-Fetch-Site": "same-origin", 453 | "User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{self.chrome_version}.0.0.0 Safari/537.36", 454 | "x-ark-esync-value": self.x_ark_value 455 | } 456 | 457 | def make_mm(self): 458 | x=random.randint(100,150) 459 | y=random.randint(30,90) 460 | 461 | return base64.b64encode(json.dumps({ 462 | "mbio":f"38{random.randint(10,70)},0,{x},{y};38{random.randint(80,90)},1,{x},{y};38{random.randint(92,99)},2,{x},{y};", 463 | "tbio":f"34{random.randint(10,99)},0,{x},{y};", 464 | "kbio":"" 465 | }).replace(" ","").encode()).decode() 466 | 467 | def answer(self, result, answers, i): 468 | data={ 469 | 'session_token': self.session_token, 470 | 'game_token': self.gameid, 471 | 'sid': self.r_continent, 472 | 'guess': result, 473 | 'render_type': 'canvas', 474 | 'analytics_tier': '40', 475 | 'bio': self.make_mm(), 476 | 'is_compatibility_mode': 'false', 477 | } 478 | 479 | if self.dapibCode: 480 | data['tguess']=Arkose.t_guess(self, self.session_token, answers, self.dapibCode) 481 | 482 | response = self.session.post(f'{self.apiurl}/fc/ca/', data=data,headers={ 483 | "Accept": "*/*", 484 | "Accept-Encoding": "gzip, deflate, br, zstd", 485 | "Accept-Language": f"{self.locale},{self.locale.split('-')[0]};q=0.9,en-US;q=0.8,en;q=0.7", 486 | "Cache-Control": "no-cache", 487 | "Connection": "keep-alive", 488 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 489 | "Host": self.apiurl.split("https://")[1], 490 | "Origin": self.apiurl, 491 | "Referer": f"{self.apiurl}/fc/assets/ec-game-core/game-core/1.22.0/standard/index.html?session={self.token}&r={self.r_continent}&meta=3&meta_width=300&metabgclr=transparent&metaiconclr=%23555555&guitextcolor=%23000000&pk={self.sitekey}&dc=1&at=40&ag=101&cdn_url=https%3A%2F%2F{self.apiurl.split('https://')[1]}%2Fcdn%2Ffc&lurl=https%3A%2F%2Faudio-{self.r_continent}.arkoselabs.com&surl=https%3A%2F%2F{self.apiurl.split('https://')[1]}&smurl=https%3A%2F%2F{self.apiurl.split('https://')[1]}%2Fcdn%2Ffc%2Fassets%2Fstyle-manager&theme=default", 492 | "sec-ch-ua": f"\"Not)A;Brand\";v=\"99\", \"Google Chrome\";v=\"{self.chrome_version}\", \"Chromium\";v=\"{self.chrome_version}\"", 493 | "sec-ch-ua-mobile": "?0", 494 | "sec-ch-ua-platform": "\"Windows\"", 495 | "Sec-Fetch-Dest": "empty", 496 | "Sec-Fetch-Mode": "cors", 497 | "Sec-Fetch-Site": "same-origin", 498 | "User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{self.chrome_version}.0.0.0 Safari/537.36", 499 | "X-NewRelic-Timestamp": Utils.newrelic_time(), 500 | "X-Requested-ID": Arkose.encrypt_double(self, f"REQUESTED{self.token}ID",json.dumps({"sc":[ 501 | random.randint(100,300), 502 | random.randint(100,300) 503 | ]}).replace(" ","")), 504 | "X-Requested-With": "XMLHttpRequest" 505 | }) 506 | return response.json() 507 | 508 | def callback(self, data): 509 | self.session.post(f"{self.apiurl}/fc/a/",data=data,headers={ 510 | "Accept": "*/*", 511 | "Accept-Encoding": "gzip, deflate, br, zstd", 512 | "Accept-Language": f"{self.locale},{self.locale.split('-')[0]};q=0.9,en-US;q=0.8,en;q=0.7", 513 | "Cache-Control": "no-cache", 514 | "Connection": "keep-alive", 515 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 516 | "Host": self.apiurl.split('https://')[1], 517 | "Origin": self.apiurl, 518 | "Referer": f"{self.apiurl}/fc/assets/ec-game-core/game-core/1.22.0/standard/index.html?session={self.token}&r={self.r_continent}&meta=7&meta_height=325&metabgclr=%23ffffff&metaiconclr=%23757575&mainbgclr=%23ffffff&maintxtclr=%231B1B1B&guitextcolor=%23747474&lang={self.locale.split('-')[0]}&pk={self.sitekey}&at=40&ag=101&cdn_url=https%3A%2F%2F{self.apiurl.split('https://')[1]}%2Fcdn%2Ffc&lurl=https%3A%2F%2Faudio-{self.r_continent}.arkoselabs.com&surl=https%3A%2F%2F{self.apiurl.split('https://')[1]}&smurl=https%3A%2F%2F{self.apiurl.split('https://')[1]}%2Fcdn%2Ffc%2Fassets%2Fstyle-manager&theme=default", 519 | "sec-ch-ua": f"\"Not)A;Brand\";v=\"99\", \"Google Chrome\";v=\"{self.chrome_version}\", \"Chromium\";v=\"{self.chrome_version}\"", 520 | "sec-ch-ua-mobile": "?0", 521 | "sec-ch-ua-platform": "\"Windows\"", 522 | "Sec-Fetch-Dest": "empty", 523 | "Sec-Fetch-Mode": "cors", 524 | "Sec-Fetch-Site": "same-origin", 525 | "User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{self.chrome_version}.0.0.0 Safari/537.36", 526 | "X-NewRelic-Timestamp": Utils.newrelic_time(), 527 | "X-Requested-With": "XMLHttpRequest" 528 | }) 529 | 530 | def solve(self): 531 | try: 532 | self.solve_time=time.time() 533 | challenge_data=self._generate_challenge() 534 | if "DENIED ACCESS" in str(challenge_data): 535 | return {"success":False, "err": "invalid blob", "token": None} 536 | 537 | del self.session.headers["Content-Type"] 538 | del self.session.headers["x-ark-esync-value"] 539 | self.token=challenge_data["token"].split("|")[0] 540 | self.r_continent=challenge_data["token"].split("|r=")[1].split("|")[0] 541 | self.session.get(f'{self.apiurl}/fc/gc/', params={'token': self.token}) 542 | 543 | self.session.headers.update({ 544 | "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", 545 | "Sec-Fetch-Dest": "iframe", 546 | "Sec-Fetch-Mode": "navigate", 547 | "Upgrade-Insecure-Requests": "1" 548 | }) 549 | referer=self.session.get( 550 | f'{self.apiurl}/fc/assets/ec-game-core/game-core/1.22.0/standard/index.html', 551 | params={ 552 | 'session': self.token, 553 | 'r': self.r_continent, 554 | 'meta': '3', 555 | 'meta_width': '300', 556 | 'metabgclr': 'transparent', 557 | 'metaiconclr': '#555555', 558 | 'guitextcolor': '#000000', 559 | 'pk': self.sitekey, 560 | 'dc': '1', 561 | 'at': '40', 562 | 'ag': '101', 563 | 'cdn_url': f'{self.apiurl}/cdn/fc', 564 | 'lurl': f'https://audio-{self.r_continent}.arkoselabs.com', 565 | 'surl': self.apiurl, 566 | 'smurl': f'{self.apiurl}/cdn/fc/assets/style-manager', 567 | 'theme': 'default' 568 | }).url 569 | self.callback({"sid": self.r_continent,"session_token": self.token,"analytics_tier": "40","disableCookies": "true", "render_type": "canvas","is_compatibility_mode": "false","category": "Site URL","action": f"{self.apiurl}/v2/{self.capi_version}/enforcement.{self.enforcement_hash}.html"}) 570 | 571 | if "sup=1|" in challenge_data["token"]: 572 | self.session.headers.update({ 573 | "Accept": "*/*", 574 | "Sec-Fetch-Dest": "script", 575 | "Sec-Fetch-Mode": "no-cors", 576 | "Sec-Fetch-Site": "same-origin" 577 | }) 578 | 579 | self.session.get( 580 | f"{self.apiurl}/fc/a/", 581 | params={ 582 | "callback": f"__jsonp_{str(int(time.time()*1000))}", 583 | "category": "loaded", 584 | "action": "game loaded", 585 | "session_token": self.token, 586 | "data[public_key]": self.sitekey, 587 | "data[site]": self.siteurl 588 | } 589 | ) 590 | logger.print("Suppressed", "Waves: 0", f.LIGHTGREEN_EX+self.token) 591 | Utils.solved+=1 592 | Utils.supc+=1 593 | 594 | return {"success":True, "err": None, "token": challenge_data["token"], "procces_time": time.time()-self.solve_time} 595 | 596 | Utils.xxsupc+=1 597 | self.session.headers.update({ 598 | "accept": "*/*", 599 | "priority": "u=1, i", 600 | "referer": referer, 601 | "sec-fetch-dest": "empty", 602 | "sec-fetch-mode": "cors", 603 | "cache-control": "no-cache", 604 | "content-type": "application/x-www-form-urlencoded; charset=UTF-8", 605 | "origin": self.apiurl, 606 | "x-newrelic-timestamp": Utils.newrelic_time(), 607 | "x-requested-with": "XMLHttpRequest" 608 | }) 609 | 610 | result=self._task_data() 611 | 612 | del self.session.headers["cache-control"] 613 | del self.session.headers["content-type"] 614 | del self.session.headers["origin"] 615 | del self.session.headers["x-newrelic-timestamp"] 616 | del self.session.headers["x-requested-with"] 617 | 618 | self.gameid=result["challengeID"] 619 | self.session_token=result["session_token"] 620 | self.callback({"sid": self.r_continent,"session_token": self.token,"analytics_tier": "40","disableCookies": "true","game_token": self.gameid,"game_type": "4","render_type": "canvas","is_compatibility_mode": "false","category": "loaded","action": "game loaded"}) 621 | 622 | answers=[] 623 | test=[] 624 | try: 625 | game=result["game_data"]["instruction_string"] 626 | except: 627 | game=result["game_data"]["game_variant"] 628 | 629 | waves=str(result["game_data"]["waves"]) 630 | 631 | if int(waves)>=10: 632 | print(game, ':', str(waves)) 633 | return {"success":False, "err": "too many waves"} 634 | 635 | if result.get("dapib_url"): 636 | self.dapibCode=self.session.get(result["dapib_url"]).text 637 | self.session.get(f"{self.apiurl}/params/sri/dapib/{result['dapib_url'].split(f'{self.r_continent}/')[1].split('.js')[0]}") 638 | 639 | else: 640 | self.dapibCode=0 641 | 642 | cs=Arkose.generate_cs() 643 | g= Arkose.generate_g() 644 | self.callback({"sid": self.r_continent,"session_token": self.token,"analytics_tier": "40","disableCookies": "true","game_token": self.gameid,"game_type": "4","render_type": "canvas","is_compatibility_mode": "false","category": "begin app", "action": "user clicked verify", "cs_": cs, "ct_": str(random.randint(10,99)), "g_": g, "h_": Arkose.generate_h(cs, g), "pt_": Arkose.generate_pt(), "aht_": Arkose.generate_aht()}) 645 | 646 | image_encryption_enabled=result["game_data"]["customGUI"].get('encrypted_mode') 647 | if image_encryption_enabled: 648 | self.image_decryption_key = self.session.post(f'{self.apiurl}/fc/ekey/', data={ 649 | 'session_token': self.session_token, 650 | 'game_token': self.gameid, 651 | 'sid': self.r_continent 652 | }).json()['decryption_key'] 653 | 654 | for img in result["game_data"]["customGUI"]["_challenge_imgs"]: 655 | if image_encryption_enabled: 656 | base64_img=Arkose.decrypt_data(self.session.get(img).json(), self.image_decryption_key).decode() 657 | else: 658 | base64_img=base64.b64encode(self.session.get(img).content).decode() 659 | 660 | index=... #Do classification urself!! 661 | 662 | if result["game_data"]["gameType"]==3: 663 | index+=1 664 | 665 | test.append(str(index)) 666 | 667 | if result["game_data"]["gameType"]==4: 668 | answers.append(json.dumps({"index":index}).replace(" ","")) 669 | 670 | elif result["game_data"]["gameType"]==3: 671 | answers.append(json.dumps(Utils.grid_answer_dict(index)).replace(" ","")) 672 | 673 | solveresult=self.answer( 674 | result=Arkose.encrypt_double(self, self.session_token, str([",".join(answers)]).replace("'","")), 675 | answers=answers, 676 | i=index 677 | ) 678 | 679 | if image_encryption_enabled: 680 | self.image_decryption_key=solveresult.get('decryption_key') 681 | 682 | if solveresult["solved"]: 683 | logger.print(game, f"Waves: {waves}", f"Answers: {str(len(test))}:[{','.join(test)}]", f.LIGHTGREEN_EX+self.token) 684 | Utils.solved+=1 685 | return {"success":True, "err": None, "token": challenge_data["token"], "procces_time": time.time()-self.solve_time} 686 | 687 | else: 688 | logger.print(game, f"Waves: {waves}", f"Answers: {str(len(test))}:[{','.join(test)}]", f.RED+"Failed to solve.") 689 | Utils.fail+=1 690 | return {"success":False, "err":"ai fail", "token": None} 691 | 692 | except Exception as err: 693 | print(traceback.format_exc()) 694 | Utils.errors+=1 695 | return {"success":False, "err": "internal error", "token": None} 696 | 697 | def _task_data(self): 698 | return self.session.post(f"{self.apiurl}/fc/gfct/",data={ 699 | 'token': self.token, 700 | 'sid': self.r_continent, 701 | 'render_type': 'canvas', 702 | 'lang': '', 703 | 'isAudioGame': 'false', 704 | 'is_compatibility_mode': 'false', 705 | 'apiBreakerVersion': 'green', 706 | 'analytics_tier': '40', 707 | }).json() 708 | 709 | def md5_hash(self, data): 710 | md5_hash = hashlib.md5() 711 | md5_hash.update(data.encode('utf-8')) 712 | return md5_hash.hexdigest() 713 | 714 | def process_fp(self, fpdata): 715 | result=[] 716 | for item in fpdata: 717 | result.append(item.split(":")[1]) 718 | return ';'.join(result) 719 | 720 | def proccess_webgl2(self, data): 721 | result=[] 722 | 723 | for item in data: 724 | result.append(item["key"]) 725 | result.append(item["value"]) 726 | 727 | return ','.join(result)+',webgl_hash_webgl,' 728 | 729 | def find(self, data, key): 730 | for item in data: 731 | if item["key"]==key: 732 | return item["value"] 733 | 734 | def random_pixel_depth(self): 735 | pixel_depths = [24, 30] 736 | return random.choice(pixel_depths) 737 | 738 | def generate_h(self): 739 | logical_core_counts = [4, 8, 12, 16, 20, 24, 28, 32, 40, 64] 740 | return random.choice(logical_core_counts) 741 | 742 | def bda(self): 743 | time_now=time.time() 744 | 745 | resolutions = [ 746 | (3440,1440,3440,1400), 747 | (1924,1007,1924,1007), 748 | (1920,1080,1920,1040), 749 | (1280,720,1280,672), 750 | (1920,1080,1920,1032), 751 | (1366,651,1366,651), 752 | (1366,768,1366,738), 753 | (1920,1080,1920,1050) 754 | ] 755 | height, width, awidth, aheight=random.choice(resolutions) 756 | 757 | canvases1=[ 758 | "1815906631", 759 | "235298495", 760 | "1850036655", 761 | "-1661048561", 762 | "823022740", 763 | "-1712985017", 764 | "679642534", 765 | "512287303", 766 | "-1570039461", 767 | "11949726", 768 | "512287303", 769 | "-479006826", 770 | "-1124974951", 771 | "1999955435", 772 | "213013447", 773 | "-1058930346", 774 | "-1291191045", 775 | "-1338001587", 776 | "-1946591325", 777 | "-70526813", 778 | "-72944365", 779 | "1456333650", 780 | "1732442814", 781 | "631151448", 782 | ] 783 | 784 | audio_fps=["124.08072766105033","124.04651710136386","124.0807279153014","124.04344968475198","124.08072784824617","124.0396717004187","35.73832903057337","124.0807277960921","124.08075528279005","124.08072790785081","124.08072256811283","124.04345259929687","124.0434496849557","124.0434806260746","124.08072782589443","64.39679384598276","124.0434485301812","124.04423786447296","124.04453790388652","124.08072786314733","124.04569787243236","124.08072787804849","124.04211016517365","124.08072793765314","124.03962087413674","124.04457049137272","124.04344884395687","35.73833402246237","124.0434474653739","124.04855314017914","124.04347524535842","35.10893232002854","124.08072787802666","124.04048140646773","28.601430902344873","35.749968223273754","35.74996031448245","124.0434752900619","124.04347657808103","124.04215029208717","124.08072781844385","124.04369539513573","124.04384341745754","124.04557180271513","35.74996626004577","124.0807470110085","124.04066697827511","124.08072783334501","124.40494026464876","124.0434488439787","35.7383295930922","124.03549310178641","124.04304748237337","124.08075643483608","124.0437401577874","124.05001448364783","124.08072795627959","124.04345808873768","124.04051324382453","124.04347527516074","124.08072796745546","124.0431715620507"] 785 | colordepth = self.random_pixel_depth() 786 | self.cfp=random.choice(canvases1) 787 | fp1=[ 788 | "DNT:unknown", 789 | f"L:{self.locale}", 790 | f"D:{colordepth}", 791 | "PR:1.100000023841858", 792 | f"S:{height},{width}", 793 | f"AS:{awidth},{aheight}", 794 | "TO:-120", 795 | "SS:true", 796 | "LS:true", 797 | "IDB:true", 798 | "B:false", 799 | "ODB:false", 800 | "CPUC:unknown", 801 | "PK:Win32", 802 | f"CFP:{self.cfp}", 803 | "FR:false", 804 | "FOS:false", 805 | "FB:false", 806 | "JSF:Arial,Arial Black,Arial Narrow,Calibri,Cambria,Cambria Math,Comic Sans MS,Consolas,Courier,Courier New,Georgia,Helvetica,Impact,Lucida Console,Lucida Sans Unicode,Microsoft Sans Serif,MS Gothic,MS PGothic,MS Sans Serif,MS Serif,Palatino Linotype,Segoe Print,Segoe Script,Segoe UI,Segoe UI Light,Segoe UI Semibold,Segoe UI Symbol,Tahoma,Times,Times New Roman,Trebuchet MS,Verdana,Wingdings", 807 | "P:Chrome PDF Viewer,Chromium PDF Viewer,Microsoft Edge PDF Viewer,PDF Viewer,WebKit built-in PDF", 808 | "T:0,false,false", 809 | f"H:{self.generate_h()}", 810 | "SWF:false" 811 | ] 812 | 813 | webgl=random.choice(random.choice(webgls)["webgl"]) 814 | enhanced_fp=[ 815 | { 816 | "key":"webgl_extensions", 817 | "value":webgl["webgl_extensions"] 818 | }, 819 | { 820 | "key":"webgl_extensions_hash", 821 | "value":webgl["webgl_extensions_hash"] 822 | }, 823 | { 824 | "key":"webgl_renderer", 825 | "value":webgl["webgl_renderer"] 826 | }, 827 | { 828 | "key":"webgl_vendor", 829 | "value":webgl["webgl_vendor"] 830 | }, 831 | { 832 | "key":"webgl_version", 833 | "value":webgl["webgl_version"] 834 | }, 835 | { 836 | "key":"webgl_shading_language_version", 837 | "value":webgl["webgl_shading_language_version"] 838 | }, 839 | { 840 | "key":"webgl_aliased_line_width_range", 841 | "value":webgl["webgl_aliased_line_width_range"] 842 | }, 843 | { 844 | "key":"webgl_aliased_point_size_range", 845 | "value":webgl["webgl_aliased_point_size_range"] 846 | }, 847 | { 848 | "key":"webgl_antialiasing", 849 | "value":"yes" 850 | }, 851 | { 852 | "key":"webgl_bits", 853 | "value":webgl["webgl_bits"] 854 | }, 855 | { 856 | "key":"webgl_max_params", 857 | "value":webgl["webgl_max_params"] 858 | }, 859 | { 860 | "key":"webgl_max_viewport_dims", 861 | "value":webgl["webgl_max_viewport_dims"] 862 | }, 863 | { 864 | "key":"webgl_unmasked_vendor", 865 | "value":webgl["webgl_unmasked_vendor"] 866 | }, 867 | { 868 | "key":"webgl_unmasked_renderer", 869 | "value":webgl["webgl_unmasked_renderer"] 870 | }, 871 | { 872 | "key":"webgl_vsf_params", 873 | "value":webgl["webgl_vsf_params"] 874 | }, 875 | { 876 | "key":"webgl_vsi_params", 877 | "value":webgl["webgl_vsi_params"] 878 | }, 879 | { 880 | "key":"webgl_fsf_params", 881 | "value":webgl["webgl_fsf_params"] 882 | }, 883 | { 884 | "key":"webgl_fsi_params", 885 | "value":webgl["webgl_fsi_params"] 886 | }] 887 | 888 | enhanced_fp.append({ 889 | "key":"webgl_hash_webgl", 890 | "value":gctx.call("x64hash128",self.proccess_webgl2(enhanced_fp)) 891 | }) 892 | 893 | enhanced_fp_more=[ 894 | { 895 | "key":"user_agent_data_brands", 896 | "value":"Chromium,Not;A=Brand,Google Chrome" 897 | }, 898 | { 899 | "key":"user_agent_data_mobile", 900 | "value":False 901 | }, 902 | { 903 | "key":"navigator_connection_downlink", 904 | "value":10 905 | }, 906 | { 907 | "key":"navigator_connection_downlink_max", 908 | "value":None 909 | }, 910 | { 911 | "key":"network_info_rtt", 912 | "value":50 913 | }, 914 | { 915 | "key":"network_info_save_data", 916 | "value":False 917 | }, 918 | { 919 | "key":"network_info_rtt_type", 920 | "value":None 921 | }, 922 | { 923 | "key":"screen_pixel_depth", 924 | "value":colordepth 925 | }, 926 | { 927 | "key":"navigator_device_memory", 928 | "value":8 929 | }, 930 | { 931 | "key":"navigator_pdf_viewer_enabled", 932 | "value":True 933 | }, 934 | { 935 | "key":"navigator_languages", 936 | "value":"en-US,en" 937 | }, 938 | { 939 | "key":"window_inner_width", 940 | "value":0 941 | }, 942 | { 943 | "key":"window_inner_height", 944 | "value":0 945 | }, 946 | { 947 | "key":"window_outer_width", 948 | "value":int(width) 949 | }, 950 | { 951 | "key":"window_outer_height", 952 | "value":int(height) 953 | }, 954 | { 955 | "key":"browser_detection_firefox", 956 | "value":False 957 | }, 958 | { 959 | "key":"browser_detection_brave", 960 | "value":False 961 | }, 962 | { 963 | "key":"browser_api_checks", 964 | "value":[ 965 | "permission_status: true", 966 | "eye_dropper: true", 967 | "audio_data: true", 968 | "writable_stream: true", 969 | "css_style_rule: true", 970 | "navigator_ua: true", 971 | "barcode_detector: false", 972 | "display_names: true", 973 | "contacts_manager: false", 974 | "svg_discard_element: false", 975 | "usb: defined", 976 | "media_device: defined", 977 | "playback_quality: true" 978 | ] 979 | }, 980 | { 981 | "key":"browser_object_checks", 982 | "value":self.md5_hash("chrome") 983 | }, 984 | { 985 | "key":"29s83ih9", 986 | "value":self.md5_hash("false")+"⁣" 987 | }, 988 | { 989 | "key":"audio_codecs", 990 | "value":"{\"ogg\":\"probably\",\"mp3\":\"probably\",\"wav\":\"probably\",\"m4a\":\"maybe\",\"aac\":\"probably\"}" 991 | }, 992 | { 993 | "key":"audio_codecs_extended_hash", 994 | "value":self.md5_hash('{"audio/mp4; codecs=\\"mp4a.40\\"":{"canPlay":"maybe","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.1\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.2\\"":{"canPlay":"probably","mediaSource":true},"audio/mp4; codecs=\\"mp4a.40.3\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.4\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.5\\"":{"canPlay":"probably","mediaSource":true},"audio/mp4; codecs=\\"mp4a.40.6\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.7\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.8\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.9\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.12\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.13\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.14\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.15\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.16\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.17\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.19\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.20\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.21\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.22\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.23\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.24\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.25\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.26\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.27\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.28\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.29\\"":{"canPlay":"probably","mediaSource":true},"audio/mp4; codecs=\\"mp4a.40.32\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.33\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.34\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.35\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.40.36\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"mp4a.66\\"":{"canPlay":"probably","mediaSource":false},"audio/mp4; codecs=\\"mp4a.67\\"":{"canPlay":"probably","mediaSource":true},"audio/mp4; codecs=\\"mp4a.68\\"":{"canPlay":"probably","mediaSource":false},"audio/mp4; codecs=\\"mp4a.69\\"":{"canPlay":"probably","mediaSource":false},"audio/mp4; codecs=\\"mp4a.6B\\"":{"canPlay":"probably","mediaSource":false},"audio/mp4; codecs=\\"mp3\\"":{"canPlay":"probably","mediaSource":false},"audio/mp4; codecs=\\"flac\\"":{"canPlay":"probably","mediaSource":true},"audio/mp4; codecs=\\"bogus\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"aac\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"ac3\\"":{"canPlay":"","mediaSource":false},"audio/mp4; codecs=\\"A52\\"":{"canPlay":"","mediaSource":false},"audio/mpeg; codecs=\\"mp3\\"":{"canPlay":"probably","mediaSource":false},"audio/wav; codecs=\\"0\\"":{"canPlay":"","mediaSource":false},"audio/wav; codecs=\\"2\\"":{"canPlay":"","mediaSource":false},"audio/wave; codecs=\\"0\\"":{"canPlay":"","mediaSource":false},"audio/wave; codecs=\\"1\\"":{"canPlay":"","mediaSource":false},"audio/wave; codecs=\\"2\\"":{"canPlay":"","mediaSource":false},"audio/x-wav; codecs=\\"0\\"":{"canPlay":"","mediaSource":false},"audio/x-wav; codecs=\\"1\\"":{"canPlay":"probably","mediaSource":false},"audio/x-wav; codecs=\\"2\\"":{"canPlay":"","mediaSource":false},"audio/x-pn-wav; codecs=\\"0\\"":{"canPlay":"","mediaSource":false},"audio/x-pn-wav; codecs=\\"1\\"":{"canPlay":"","mediaSource":false},"audio/x-pn-wav; codecs=\\"2\\"":{"canPlay":"","mediaSource":false}}') 995 | }, 996 | { 997 | "key":"video_codecs", 998 | "value":"{\"ogg\":\"\",\"h264\":\"probably\",\"webm\":\"probably\",\"mpeg4v\":\"\",\"mpeg4a\":\"\",\"theora\":\"\"}" 999 | }, 1000 | { 1001 | "key":"video_codecs_extended_hash", 1002 | "value":self.md5_hash('{"video/mp4; codecs=\\"hev1.1.6.L93.90\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"hvc1.1.6.L93.90\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"hev1.1.6.L93.B0\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"hvc1.1.6.L93.B0\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"vp09.00.10.08\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"vp09.00.50.08\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"vp09.01.20.08.01\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"vp09.01.20.08.01.01.01.01.00\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"vp09.02.10.10.01.09.16.09.01\\"":{"canPlay":"probably","mediaSource":true},"video/mp4; codecs=\\"av01.0.08M.08\\"":{"canPlay":"probably","mediaSource":true},"video/webm; codecs=\\"vorbis\\"":{"canPlay":"probably","mediaSource":true},"video/webm; codecs=\\"vp8\\"":{"canPlay":"probably","mediaSource":true},"video/webm; codecs=\\"vp8.0\\"":{"canPlay":"probably","mediaSource":false},"video/webm; codecs=\\"vp8.0, vorbis\\"":{"canPlay":"probably","mediaSource":false},"video/webm; codecs=\\"vp8, opus\\"":{"canPlay":"probably","mediaSource":true},"video/webm; codecs=\\"vp9\\"":{"canPlay":"probably","mediaSource":true},"video/webm; codecs=\\"vp9, vorbis\\"":{"canPlay":"probably","mediaSource":true},"video/webm; codecs=\\"vp9, opus\\"":{"canPlay":"probably","mediaSource":true},"video/x-matroska; codecs=\\"theora\\"":{"canPlay":"","mediaSource":false},"application/x-mpegURL; codecs=\\"avc1.42E01E\\"":{"canPlay":"","mediaSource":false},"video/ogg; codecs=\\"dirac, vorbis\\"":{"canPlay":"","mediaSource":false},"video/ogg; codecs=\\"theora, speex\\"":{"canPlay":"","mediaSource":false},"video/ogg; codecs=\\"theora, vorbis\\"":{"canPlay":"","mediaSource":false},"video/ogg; codecs=\\"theora, flac\\"":{"canPlay":"","mediaSource":false},"video/ogg; codecs=\\"dirac, flac\\"":{"canPlay":"","mediaSource":false},"video/ogg; codecs=\\"flac\\"":{"canPlay":"probably","mediaSource":false},"video/3gpp; codecs=\\"mp4v.20.8, samr\\"":{"canPlay":"","mediaSource":false}}') 1003 | }, 1004 | { 1005 | "key":"media_query_dark_mode", 1006 | "value":False 1007 | }, 1008 | { 1009 | "key":"css_media_queries", 1010 | "value":0 1011 | }, 1012 | { 1013 | "key":"css_color_gamut", 1014 | "value":"srgb" 1015 | }, 1016 | { 1017 | "key":"css_contrast", 1018 | "value":"no-preference" 1019 | }, 1020 | { 1021 | "key":"css_monochrome", 1022 | "value":False 1023 | }, 1024 | { 1025 | "key":"css_pointer", 1026 | "value":"fine" 1027 | }, 1028 | { 1029 | "key":"css_grid_support", 1030 | "value":False 1031 | }, 1032 | { 1033 | "key":"headless_browser_phantom", 1034 | "value":False 1035 | }, 1036 | { 1037 | "key":"headless_browser_selenium", 1038 | "value":False 1039 | }, 1040 | { 1041 | "key":"headless_browser_nightmare_js", 1042 | "value":False 1043 | }, 1044 | { 1045 | "key":"headless_browser_generic", 1046 | "value":4 1047 | }, 1048 | { 1049 | "key":"1l2l5234ar2", 1050 | "value":str(int(time_now*1000))+"⁣" 1051 | }, 1052 | { 1053 | "key":"document__referrer", 1054 | "value":self.siteurl+"/" 1055 | }, 1056 | { 1057 | "key":"window__ancestor_origins", 1058 | "value":self.window__ancestor_origins 1059 | }, 1060 | { 1061 | "key":"window__tree_index", 1062 | "value":self.window__tree_index 1063 | }, 1064 | { 1065 | "key":"window__tree_structure", 1066 | "value":self.window__tree_structure 1067 | }, 1068 | { 1069 | "key":"window__location_href", 1070 | "value":f"{self.apiurl}/v2/{self.capi_version}/enforcement.{self.enforcement_hash}.html" 1071 | }, 1072 | { 1073 | "key":"client_config__sitedata_location_href", 1074 | "value":self.client_config__sitedata_location_href 1075 | }, 1076 | { 1077 | "key":"client_config__language", 1078 | "value":None 1079 | }, 1080 | { 1081 | "key":"client_config__surl", 1082 | "value":self.apiurl 1083 | }, 1084 | { 1085 | "key":"c8480e29a", 1086 | "value":self.md5_hash(self.apiurl)+"⁢" 1087 | }, 1088 | { 1089 | "key":"client_config__triggered_inline", 1090 | "value":False 1091 | }, 1092 | { 1093 | "key":"mobile_sdk__is_sdk", 1094 | "value":False 1095 | }, 1096 | { 1097 | "key":"audio_fingerprint", 1098 | "value":random.choice(audio_fps) 1099 | }, 1100 | { 1101 | "key":"navigator_battery_charging", 1102 | "value":True 1103 | }, 1104 | { 1105 | "key":"media_device_kinds", 1106 | "value":["audioinput","videoinput","audiooutput"] 1107 | }, 1108 | { 1109 | "key":"media_devices_hash", 1110 | "value":"199eba60310b53c200cc783906883c67" 1111 | }, 1112 | { 1113 | "key":"navigator_permissions_hash", 1114 | "value":self.md5_hash("accelerometer|background-sync|camera|clipboard-read|clipboard-write|geolocation|gyroscope|magnetometer|microphone|midi|notifications|payment-handler|persistent-storage") 1115 | }, 1116 | { 1117 | "key":"math_fingerprint", 1118 | "value":self.md5_hash("1.4474840516030247,0.881373587019543,1.1071487177940904,0.5493061443340548,1.4645918875615231,-0.40677759702517235,-0.6534063185820197,9.199870313877772e+307,1.718281828459045,100.01040630344929,0.4828823513147936,1.9275814160560204e-50,7.888609052210102e+269,1.2246467991473532e-16,-0.7181630308570678,11.548739357257748,9.199870313877772e+307,-3.3537128705376014,0.12238344189440875") 1119 | }, 1120 | { 1121 | "key":"supported_math_functions", 1122 | "value":self.md5_hash("abs,acos,acosh,asin,asinh,atan,atanh,atan2,ceil,cbrt,expm1,clz32,cos,cosh,exp,floor,fround,hypot,imul,log,log1p,log2,log10,max,min,pow,random,round,sign,sin,sinh,sqrt,tan,tanh,trunc") 1123 | }, 1124 | { 1125 | "key":"screen_orientation", 1126 | "value":"landscape-primary" 1127 | }, 1128 | { 1129 | "key":"rtc_peer_connection", 1130 | "value":5 1131 | }, 1132 | { 1133 | "key":"4b4b269e68", 1134 | "value":str(uuid.uuid4()) #window.location.hash 1135 | }, 1136 | { 1137 | "key":"6a62b2a558", 1138 | "value":self.enforcement_hash 1139 | }, 1140 | { 1141 | "key":"speech_default_voice", 1142 | "value":"Microsoft David - English (United States) || en-US" 1143 | }, 1144 | { 1145 | "key":"speech_voices_hash", 1146 | "value":str(uuid.uuid4().hex) 1147 | }, 1148 | { 1149 | "key":"4ca87df3d1", 1150 | "value":"Ow==" 1151 | }, 1152 | { 1153 | "key":"867e25e5d4", 1154 | "value":"Ow==" 1155 | }, 1156 | { 1157 | "key":"d4a306884c", 1158 | "value":"Ow==" 1159 | }] 1160 | 1161 | for item in enhanced_fp_more: 1162 | enhanced_fp.append(item) 1163 | 1164 | fp=[ 1165 | { 1166 | "key":"api_type", 1167 | "value":"js" 1168 | }, 1169 | { 1170 | "key":"f", 1171 | "value":gctx.call("x64hash128", self.process_fp(fp1), 0) 1172 | }, 1173 | { 1174 | "key":"n", 1175 | "value":base64.b64encode(str(int(time_now)).encode()).decode() 1176 | }, 1177 | { 1178 | "key":"wh", 1179 | "value": f"{str(uuid.uuid4().hex)}|72627afbfd19a741c7da1732218301ac" 1180 | }, 1181 | { 1182 | "key":"enhanced_fp", 1183 | "value":enhanced_fp 1184 | }, 1185 | { 1186 | "key":"fe", 1187 | "value":fp1 1188 | }, 1189 | { 1190 | "key":"ife_hash", 1191 | "value": gctx.call("x64hash128", ", ".join(fp1), 38) 1192 | }, 1193 | { 1194 | "key":"jsbd", 1195 | "value":"{\"HL\":6,\"NCE\":true,\"DT\":\"\",\"NWD\":\"false\",\"DMTO\":1,\"DOTO\":1}" 1196 | } 1197 | ] 1198 | 1199 | return base64.b64encode(Arkose.make_encrypted_dict(self, json.dumps(fp, separators=(',', ':'), ensure_ascii=False)).encode()).decode() 1200 | 1201 | def _generate_challenge(self) -> None: 1202 | random.seed(random.randint(0, 2**64 -1)) 1203 | 1204 | task={ 1205 | "bda":self.bda(), 1206 | "public_key": self.sitekey, 1207 | "site": self.siteurl, 1208 | "userbrowser": self.useragent, 1209 | "capi_version": self.capi_version, 1210 | "capi_mode": "inline", 1211 | "style_theme": "default", 1212 | "rnd": str(random.uniform(0, 1)), 1213 | 'language': self.locale.split("-")[0] 1214 | } 1215 | 1216 | if self.sitekey=="747B83EC-2CA3-43AD-A7DF-701F286FBABA": 1217 | task["data[origin_page]"]="github_signup_redesign" 1218 | if self.blob: 1219 | task["data[blob]"]=self.blob 1220 | 1221 | return self.session.post( 1222 | f'{self.apiurl}/fc/gt2/public_key/{self.sitekey}', 1223 | data=task, 1224 | headers={ 1225 | 'accept': '*/*', 1226 | 'accept-language': f'en-US,en;q=0.9,{self.locale};q=0.8,{self.locale.split("-")[0]};q=0.7', 1227 | 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', 1228 | 'origin': self.apiurl, 1229 | 'priority': 'u=1, i', 1230 | 'referer': f'{self.apiurl}/v2/{self.capi_version}/enforcement.{self.enforcement_hash}.html', 1231 | 'sec-ch-ua': '"Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128"', 1232 | 'sec-ch-ua-mobile': '?0', 1233 | 'sec-ch-ua-platform': '"Windows"', 1234 | 'sec-fetch-dest': 'empty', 1235 | 'sec-fetch-mode': 'cors', 1236 | 'sec-fetch-site': 'same-origin', 1237 | 'user-agent': f'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{self.chrome_version}.0.0.0 Safari/537.36', 1238 | 'x-ark-esync-value': self.x_ark_value, 1239 | } 1240 | ).json() 1241 | 1242 | class _solver_stats: 1243 | def calc_cpm(): 1244 | while True: 1245 | try: 1246 | before=Utils.solved 1247 | time.sleep(15) 1248 | after=Utils.solved 1249 | Utils.spm = (after-before)*4 1250 | except: 1251 | Utils.spm=0 1252 | 1253 | def rate(thing,total): 1254 | try: 1255 | return str(round(thing/total*100,4)) 1256 | except: 1257 | return "unknown" 1258 | 1259 | def title(): 1260 | time.sleep(1) 1261 | os.system("cls") 1262 | second=0;minute=0;hours=0;days=0 1263 | 1264 | while True: 1265 | second+=1 1266 | if second == 60: second = 0; minute+=1 1267 | if minute == 60: minute = 0; hours+=1 1268 | if hours == 24: hours = 0; days+=1 1269 | 1270 | elapsed=f"{str(days).zfill(2)}:{str(hours).zfill(2)}:{str(minute).zfill(2)}:{str(second).zfill(2)}" 1271 | 1272 | ctypes.windll.kernel32.SetConsoleTitleW(f"Funcaptcha | solved: {str(Utils.solved)} | fail: {str(Utils.fail)} | spm: {str(Utils.spm)} | sup: {_solver_stats.rate(Utils.supc, Utils.supc+Utils.xxsupc)}% | suc: {_solver_stats.rate(Utils.solved, Utils.solved+Utils.fail)}% | errors: {str(Utils.errors)} | elapsed: {elapsed}") 1273 | time.sleep(1) 1274 | 1275 | threading.Thread(target=_solver_stats.title).start() 1276 | threading.Thread(target=_solver_stats.calc_cpm).start() 1277 | 1278 | app = Flask(__name__) 1279 | 1280 | class api: 1281 | def __init__(self) -> None: 1282 | self.pool={} 1283 | self.valid_tasks=[] 1284 | 1285 | def solve(self, task_id): 1286 | j,_=self.pool[task_id] 1287 | result=Funcaptcha( 1288 | apiurl=j["apiurl"], 1289 | siteurl=j["siteurl"], 1290 | sitekey=j["sitekey"], 1291 | chrome_version=j["chrome_version"], 1292 | data=j["data"], 1293 | proxy=j.get("proxy"), 1294 | blob=j.get("blob"), 1295 | custom_cookies=j.get('custom_cookies'), 1296 | custom_locale=j.get('custom_locale') 1297 | ).solve() 1298 | 1299 | self.pool[task_id]=0,{ 1300 | "type": "FuncaptchaTask", 1301 | "status": "completed", 1302 | "task_id": task_id, 1303 | "captcha": result 1304 | } 1305 | 1306 | class preset: 1307 | def get(): 1308 | return { 1309 | "linkedin_register":{ 1310 | "siteurl": 'https://iframe.arkoselabs.com', 1311 | "sitekey": '9E881D9A-F495-4A23-BE4B-16067FF8CC3B', 1312 | "apiurl": 'https://client-api.arkoselabs.com', 1313 | "data": { 1314 | "window__ancestor_origins": ["https://iframe.arkoselabs.com","https://www.linkedin.com","https://www.linkedin.com","https://www.linkedin.com"], 1315 | "client_config__sitedata_location_href": "https://iframe.arkoselabs.com/9E881D9A-F495-4A23-BE4B-16067FF8CC3B/index.html", 1316 | "window__tree_structure": "[[],[[[[]]]]]", 1317 | 'window__tree_index': [1,0,0,0] 1318 | } 1319 | }, 1320 | 1321 | "match_login":{ 1322 | "siteurl": "https://match.com", 1323 | "sitekey": "85800716-F435-4981-864C-8B90602D10F7", 1324 | "apiurl": "https://client-api.arkoselabs.com", 1325 | "data": { 1326 | "window__ancestor_origins":["https://match.com"], 1327 | "client_config__sitedata_location_href": "https://match.com/login", 1328 | "window__tree_structure": "[[]]", 1329 | 'window__tree_index': [0] 1330 | } 1331 | }, 1332 | 1333 | "twitter_register": { 1334 | "siteurl": "https://iframe.arkoselabs.com", 1335 | "sitekey": "2CB16598-CB82-4CF7-B332-5990DB66F3AB", 1336 | "apiurl": "https://client-api.arkoselabs.com", 1337 | "data": { 1338 | "window__ancestor_origins":["https://iframe.arkoselabs.com","https://x.com"], 1339 | "client_config__sitedata_location_href": "https://iframe.arkoselabs.com/2CB16598-CB82-4CF7-B332-5990DB66F3AB/index.html", 1340 | "window__tree_structure": "[[[]]]", 1341 | 'window__tree_index': [0,0] 1342 | } 1343 | }, 1344 | "twitter_unlock": { 1345 | "siteurl": 'https://iframe.arkoselabs.com', 1346 | "sitekey": '0152B4EB-D2DC-460A-89A1-629838B529C9', 1347 | "apiurl": 'https://client-api.arkoselabs.com', 1348 | "data": { 1349 | "window__ancestor_origins":["https://iframe.arkoselabs.com","https://x.com"], 1350 | "client_config__sitedata_location_href": "https://iframe.arkoselabs.com/0152B4EB-D2DC-460A-89A1-629838B529C9/index.html", 1351 | "window__tree_structure": "[[[]]]", 1352 | 'window__tree_index': [0,0] 1353 | } 1354 | }, 1355 | "roblox_register": { 1356 | "siteurl": "https://www.roblox.com", 1357 | "sitekey": "A2A14B1D-1AF3-C791-9BBC-EE33CC7A0A6F", 1358 | "apiurl": "https://arkoselabs.roblox.com", 1359 | "data": { 1360 | "window__ancestor_origins":["https://www.roblox.com","https://www.roblox.com"], 1361 | "client_config__sitedata_location_href": "https://www.roblox.com/arkose/iframe", 1362 | "window__tree_structure": "[[[]]]", 1363 | 'window__tree_index': [0,0] 1364 | } 1365 | }, 1366 | "roblox_login":{ 1367 | "siteurl": "https://www.roblox.com", 1368 | "sitekey": "476068BF-9607-4799-B53D-966BE98E2B81", 1369 | "apiurl": "https://arkoselabs.roblox.com", 1370 | "data": { 1371 | "window__ancestor_origins":["https://www.roblox.com","https://www.roblox.com"], 1372 | "client_config__sitedata_location_href": "https://www.roblox.com/arkose/iframe", 1373 | "window__tree_structure": "[[],[[]]]", 1374 | 'window__tree_index': [0,0] 1375 | } 1376 | }, 1377 | 1378 | "github_register": { 1379 | "siteurl": "https://octocaptcha.com", 1380 | "sitekey": "747B83EC-2CA3-43AD-A7DF-701F286FBABA", 1381 | "apiurl": "https://github-api.arkoselabs.com", 1382 | "data": { 1383 | "window__ancestor_origins":["https://octocaptcha.com","https://github.com"], 1384 | "client_config__sitedata_location_href": "https://octocaptcha.com/", 1385 | "window__tree_structure": "[[[]]]", 1386 | 'window__tree_index': [0,0] 1387 | } 1388 | }, 1389 | 1390 | "snapchat_register": { 1391 | "siteurl": "https://iframe.arkoselabs.com", 1392 | "sitekey": "EA4B65CB-594A-438E-B4B5-D0DBA28C9334", 1393 | "apiurl": "https://snap-api.arkoselabs.com", 1394 | "blob": "undefined", 1395 | "data": { 1396 | "window__ancestor_origins":["https://iframe.arkoselabs.com","https://accounts.snapchat.com"], 1397 | "client_config__sitedata_location_href": "https://iframe.arkoselabs.com/EA4B65CB-594A-438E-B4B5-D0DBA28C9334/lightbox.html", 1398 | "window__tree_structure":"[[[]]]", 1399 | 'window__tree_index': [0,0] 1400 | } 1401 | }, 1402 | 1403 | "outlook_register": { 1404 | "siteurl": "https://iframe.arkoselabs.com", 1405 | "sitekey": "B7D8911C-5CC8-A9A3-35B0-554ACEE604DA", 1406 | "apiurl": "https://client-api.arkoselabs.com", 1407 | "data": { 1408 | "window__ancestor_origins":[ 1409 | "https://iframe.arkoselabs.com", 1410 | "https://signup.live.com" 1411 | ], 1412 | "client_config__sitedata_location_href": "https://iframe.arkoselabs.com/B7D8911C-5CC8-A9A3-35B0-554ACEE604DA/index.html", 1413 | "window__tree_structure": "[[],[],[[]]]", 1414 | 'window__tree_index': [2,0] 1415 | }, 1416 | }, 1417 | "outlook_phone": { 1418 | "siteurl": "https://iframe.arkoselabs.com", 1419 | "sitekey": "B7D8911C-5CC8-A9A3-35B0-554ACEE604DA", 1420 | "apiurl": "https://client-api.arkoselabs.com", 1421 | "data": { 1422 | "window__ancestor_origins":[ 1423 | "https://iframe.arkoselabs.com", 1424 | "https://account.live.com" 1425 | ], 1426 | "client_config__sitedata_location_href": "https://iframe.arkoselabs.com/B7D8911C-5CC8-A9A3-35B0-554ACEE604DA/index.html", 1427 | "window__tree_structure": "[[[]]]", 1428 | 'window__tree_index': [0,0] 1429 | }, 1430 | } 1431 | } 1432 | 1433 | self=api() 1434 | 1435 | @app.route('/funcaptcha/getTask', methods = ["POST"]) 1436 | def getTask(): 1437 | try: 1438 | j=request.get_json() 1439 | _,task=self.pool[j["task_id"]] 1440 | 1441 | for valid_task in self.valid_tasks: 1442 | if valid_task==j["task_id"]: 1443 | threading.Thread(target=self.solve, args=[j["task_id"]]).start() 1444 | self.valid_tasks.remove(j["task_id"]) 1445 | 1446 | if task["status"]=="completed": 1447 | del self.pool[j["task_id"]] 1448 | 1449 | return task 1450 | 1451 | except Exception: 1452 | return {"success":False, "err": "invalid request"} 1453 | 1454 | @app.route('/funcaptcha/createTask', methods = ["POST"]) 1455 | def createTask(): 1456 | try: 1457 | data=request.get_json() 1458 | data={**data, **preset.get()[data["preset"]]} 1459 | del data['preset'] 1460 | 1461 | task_id=str(uuid.uuid4().hex) 1462 | self.pool[task_id]=data, { 1463 | "type": "FuncaptchaTask", 1464 | "status": "processing", 1465 | "task_id": task_id, 1466 | "result": None 1467 | } 1468 | 1469 | self.valid_tasks.append(task_id) 1470 | return {"success": True, "task_id": task_id} 1471 | 1472 | except: 1473 | return {"success":False, "err": "invalid request"} 1474 | 1475 | app.run(port="8003", host="0.0.0.0", debug=False) 1476 | --------------------------------------------------------------------------------