gepettobrowser
Version:
Puppeteer-real-browser inspired fork of puppeteer
1 lines • 7.92 kB
JavaScript
const a2_0x4384b4=a2_0x4689;function a2_0x392c(){const _0x51fd75=['now','amazon_waf','forEach','key','file_','extractFiles','service','defaultTimeout','7elSLNx','grid','getResult','5927028qqSJzB','waitForResult','lemin','push','Timeout\x20','recaptcha_audio','body','2captcha.com','2426408tpyXEX','143356SAOWrG','723kkzsjz','mapParams','res','keycaptcha','code','arkoselabs','recaptchaTimeout','3714ZuowWK','method','geetest_v4','message','apiKey','softId','audio','append','getbalance','pollingInterval','capy','/in.php','join','timeout','captchaId','header_acao','hintImg','POST','json','getTime','get','https://','normal','solve','9mdfCcd','string','geetest','606331itQKjG','27751196tpCprc','30RXTDsa','GET','object','send','request','userinfo','coordinates','reportbad','6247520QRDJrY','API_HTTP_CODE_','status','yandex','API_CONNECTION_ERROR'];a2_0x392c=function(){return _0x51fd75;};return a2_0x392c();}(function(_0x4b0624,_0x5ba4d8){const _0x15176e=a2_0x4689,_0x5dc457=_0x4b0624();while(!![]){try{const _0x557759=parseInt(_0x15176e(0x16e))/0x1+-parseInt(_0x15176e(0x153))/0x2*(parseInt(_0x15176e(0x14c))/0x3)+-parseInt(_0x15176e(0x14b))/0x4*(parseInt(_0x15176e(0x170))/0x5)+-parseInt(_0x15176e(0x142))/0x6*(parseInt(_0x15176e(0x13f))/0x7)+parseInt(_0x15176e(0x14a))/0x8*(-parseInt(_0x15176e(0x16b))/0x9)+-parseInt(_0x15176e(0x132))/0xa+parseInt(_0x15176e(0x16f))/0xb;if(_0x557759===_0x5ba4d8)break;else _0x5dc457['push'](_0x5dc457['shift']());}catch(_0x495390){_0x5dc457['push'](_0x5dc457['shift']());}}}(a2_0x392c,0x86731));function a2_0x4689(_0x17359f,_0x5b43f0){const _0x392c06=a2_0x392c();return a2_0x4689=function(_0x46893b,_0x967f28){_0x46893b=_0x46893b-0x12c;let _0x319e4d=_0x392c06[_0x46893b];return _0x319e4d;},a2_0x4689(_0x17359f,_0x5b43f0);}class TwoCaptcha{constructor(_0x47046f){const _0x5d701d=a2_0x4689;typeof _0x47046f==_0x5d701d(0x16c)&&(_0x47046f={'apiKey':_0x47046f});let _0x332cd3={'apiKey':'','service':_0x5d701d(0x149),'softId':0x0,'defaultTimeout':0x78,'recaptchaTimeout':0x258,'pollingInterval':0xa};for(let _0x1df2dc in _0x332cd3){this[_0x1df2dc]=_0x47046f[_0x1df2dc]===undefined?_0x332cd3[_0x1df2dc]:_0x47046f[_0x1df2dc];}}[a2_0x4384b4(0x169)](_0x116389){const _0x5718c2=a2_0x4384b4;return this['solve'](_0x116389,{'timeout':this[_0x5718c2(0x13e)]});}['recaptcha'](_0x1ae324){return this['solve'](_0x1ae324,{'timeout':this['recaptchaTimeout']});}[a2_0x4384b4(0x147)](_0x34aa56){const _0x523e74=a2_0x4384b4;return _0x34aa56[_0x523e74(0x154)]=_0x523e74(0x159),this[_0x523e74(0x16a)](_0x34aa56,{'timeout':this[_0x523e74(0x152)]});}[a2_0x4384b4(0x16d)](_0x3d32e6){const _0x47a784=a2_0x4384b4;return this[_0x47a784(0x16a)](_0x3d32e6);}[a2_0x4384b4(0x155)](_0x1e87f4){return this['solve'](_0x1e87f4);}[a2_0x4384b4(0x14f)](_0x2cd5a2){const _0x349a2b=a2_0x4384b4;return this[_0x349a2b(0x16a)](_0x2cd5a2);}[a2_0x4384b4(0x151)](_0x53152d){const _0x59f4e4=a2_0x4384b4;return this[_0x59f4e4(0x16a)](_0x53152d);}[a2_0x4384b4(0x144)](_0x5eeee7){const _0x25c2f5=a2_0x4384b4;return this[_0x25c2f5(0x16a)](_0x5eeee7);}[a2_0x4384b4(0x135)](_0x3ca073){const _0x5916a5=a2_0x4384b4;return this[_0x5916a5(0x16a)](_0x3ca073);}[a2_0x4384b4(0x15d)](_0x3fed5a){const _0x29d260=a2_0x4384b4;return this[_0x29d260(0x16a)](_0x3fed5a);}[a2_0x4384b4(0x138)](_0x592fd7){const _0x4ab446=a2_0x4384b4;return this[_0x4ab446(0x16a)](_0x592fd7);}['turnstile'](_0x20ece0){const _0xa9b684=a2_0x4384b4;return this[_0xa9b684(0x16a)](_0x20ece0);}['mt_captcha'](_0x460e05){return this['solve'](_0x460e05);}[a2_0x4384b4(0x130)](_0x183ff5){const _0x2f5133=a2_0x4384b4;return this[_0x2f5133(0x16a)](_0x183ff5);}[a2_0x4384b4(0x140)](_0x48c1d5){return this['solve'](_0x48c1d5,{'pollingInterval':0x1});}async['solve'](_0x381d63,_0xf9c30d){const _0x2f8a1c=a2_0x4384b4;let _0x4a76bb={};return _0x4a76bb[_0x2f8a1c(0x161)]=await this[_0x2f8a1c(0x12d)](_0x381d63),_0x4a76bb[_0x2f8a1c(0x150)]=await this['waitForResult'](_0x4a76bb[_0x2f8a1c(0x161)],_0xf9c30d),_0x4a76bb;}async[a2_0x4384b4(0x12d)](_0x5ac5a6){const _0x3b12ca=a2_0x4384b4;this['sendAttachDefaultParams'](_0x5ac5a6);let _0x381183=this[_0x3b12ca(0x13c)](_0x5ac5a6);return Config[_0x3b12ca(0x14d)](_0x5ac5a6,_0x5ac5a6[_0x3b12ca(0x154)]),Config['mapParams'](_0x381183,_0x5ac5a6[_0x3b12ca(0x154)]),await this['in'](_0x5ac5a6,_0x381183);}async[a2_0x4384b4(0x143)](_0x2535d2,_0x4685b1){const _0x55acec=a2_0x4384b4;!_0x4685b1&&(_0x4685b1={'timeout':this[_0x55acec(0x13e)],'pollingInterval':this[_0x55acec(0x15c)]});let _0x3afb83=this[_0x55acec(0x166)](),_0x883091=_0x4685b1[_0x55acec(0x160)]===undefined?this[_0x55acec(0x13e)]:_0x4685b1['timeout'],_0x14e4c8=_0x4685b1[_0x55acec(0x15c)]===undefined?this['pollingInterval']:_0x4685b1[_0x55acec(0x15c)];while(!![]){if(this[_0x55acec(0x166)]()-_0x3afb83<_0x883091)await new Promise(_0x24c8d6=>setTimeout(_0x24c8d6,_0x14e4c8*0x3e8));else break;try{let _0x3ef2b3=await this[_0x55acec(0x141)](_0x2535d2);if(_0x3ef2b3)return _0x3ef2b3;}catch(_0x4d8e5e){throw _0x4d8e5e;}}throw new Error(_0x55acec(0x146)+_0x883091+'\x20seconds\x20reached');}[a2_0x4384b4(0x166)](){const _0x79625c=a2_0x4384b4;return parseInt(Date[_0x79625c(0x137)]()/0x3e8);}async[a2_0x4384b4(0x141)](_0x3b8c91){const _0x4b3565=a2_0x4384b4;try{return await this[_0x4b3565(0x14e)]({'action':_0x4b3565(0x167),'id':_0x3b8c91});}catch(_0x2062fc){if(_0x2062fc[_0x4b3565(0x156)]==='CAPCHA_NOT_READY')return null;throw _0x2062fc;}}async['balance'](){const _0x3f1717=a2_0x4384b4;let _0x360bb0=await this['res']({'action':_0x3f1717(0x15b)});return parseFloat(_0x360bb0);}async['userInfo'](){const _0x88feea=a2_0x4384b4;return await this[_0x88feea(0x14e)]({'action':_0x88feea(0x12f)});}async['report'](_0x196edc,_0x83289d){const _0x4dd327=a2_0x4384b4;let _0x1a404d=_0x83289d?'reportgood':_0x4dd327(0x131);return await this['res']({'action':_0x1a404d,'id':_0x196edc});}['sendAttachDefaultParams'](_0x270222){const _0x2923b6=a2_0x4384b4;this[_0x2923b6(0x158)]>0x0&&(_0x270222['softId']=this['softId']);}['extractFiles'](_0x2ef47a){const _0x547bec=a2_0x4384b4;let _0x1c0995={},_0x237e93=['file',_0x547bec(0x163)];for(let _0x4e854d=0x1;_0x4e854d<0xa;_0x4e854d++){_0x237e93[_0x547bec(0x145)](_0x547bec(0x13b)+_0x4e854d);}return _0x237e93[_0x547bec(0x139)](function(_0x4340d7){_0x2ef47a[_0x4340d7]!==undefined&&(_0x1c0995[_0x4340d7]=_0x2ef47a[_0x4340d7],delete _0x2ef47a[_0x4340d7]);}),_0x1c0995;}async['in'](_0x37817f,_0x48ebea){const _0x55a3b2=a2_0x4384b4;return await this['request'](_0x55a3b2(0x164),_0x55a3b2(0x15e),_0x37817f,_0x48ebea);}async[a2_0x4384b4(0x14e)](_0x3156c3){const _0x3349cf=a2_0x4384b4;return await this[_0x3349cf(0x12e)](_0x3349cf(0x171),'/res.php',_0x3156c3);}async[a2_0x4384b4(0x12e)](_0x36f6ed,_0xce3222,_0x35626c,_0x2662e9){const _0x465131=a2_0x4384b4;_0x35626c[_0x465131(0x13a)]=this[_0x465131(0x157)],_0x35626c[_0x465131(0x162)]=0x1,_0x35626c['json']=0x1;let _0x1a837a=_0x465131(0x168)+this[_0x465131(0x13d)]+_0xce3222,_0x50ed52={'method':_0x36f6ed};if(_0x36f6ed===_0x465131(0x171)){let _0x38e03d=[];for(let _0x317399 in _0x35626c){_0x38e03d[_0x465131(0x145)](_0x317399+'='+encodeURIComponent(_0x35626c[_0x317399]));}_0x1a837a+='?'+_0x38e03d[_0x465131(0x15f)]('&');}else{let _0x3aa8e5=new FormData();for(let _0x439826 in _0x35626c){if(typeof _0x35626c[_0x439826]==_0x465131(0x12c))for(let _0x551d09 in _0x35626c[_0x439826]){_0x3aa8e5[_0x465131(0x15a)](_0x439826+'['+_0x551d09+']',_0x35626c[_0x439826][_0x551d09]);}else _0x3aa8e5[_0x465131(0x15a)](_0x439826,_0x35626c[_0x439826]);}_0x50ed52[_0x465131(0x148)]=_0x3aa8e5;}let _0x4f5e4e;try{_0x4f5e4e=await fetch(_0x1a837a,_0x50ed52);}catch(_0x34bd79){throw new Error(_0x465131(0x136));}if(!_0x4f5e4e['ok'])throw new Error(_0x465131(0x133)+_0x4f5e4e[_0x465131(0x134)]);let _0x50b8bc;try{_0x50b8bc=await _0x4f5e4e[_0x465131(0x165)]();}catch(_0x4d3ad4){throw new Error('API_INCORRECT_RESPONSE');}if(_0x50b8bc[_0x465131(0x134)]===0x0)throw new Error(_0x50b8bc[_0x465131(0x12e)]);return _0x50b8bc[_0x465131(0x12e)]||_0x50b8bc;}}