UNPKG

gepettobrowser

Version:

Puppeteer-real-browser inspired fork of puppeteer

1 lines 6.3 kB
(function(_0x3a2bc6,_0x4965a0){const _0xb65cfd=a26_0x319f,_0x392f89=_0x3a2bc6();while(!![]){try{const _0x39943b=-parseInt(_0xb65cfd(0x19f))/0x1+-parseInt(_0xb65cfd(0x1af))/0x2+-parseInt(_0xb65cfd(0x1c3))/0x3+-parseInt(_0xb65cfd(0x1b0))/0x4+-parseInt(_0xb65cfd(0x189))/0x5+-parseInt(_0xb65cfd(0x1b2))/0x6+parseInt(_0xb65cfd(0x193))/0x7*(parseInt(_0xb65cfd(0x1a1))/0x8);if(_0x39943b===_0x4965a0)break;else _0x392f89['push'](_0x392f89['shift']());}catch(_0x2988ac){_0x392f89['push'](_0x392f89['shift']());}}}(a26_0x59eb,0x796fd));function a26_0x59eb(){const _0x2ce441=['loadTaintedImageInBackgroundFrame','isCaptchaWidgetRegistered','length','1608525zKsMQU','body','closest','get','onload','createElement','location','children','height','sendMessage','133yadyfH','host','getBase64FromTaintedImage','getContext','taintedImageBase64','set','getBase64','then','indexOf','name','toDataURL','src','308706nSVVow','input','1159432pZxJXg','replace','appendChild','evaluate','image/png','call','naturalWidth','now','image','forEach','naturalHeight','form','local','in-progress','690370YJsTjD','1395576EeMrwg','normal','2852574jgEepF','removeDataPrefix','complete','href','top','iframe','1px','self','normal-captcha-answer-','getBase64FromSrc','getAll','normal-captcha-container-','normal-captcha-','image-reader','catch','storage','FIRST_ORDERED_NODE_TYPE','1368981bpjkDU','runtime','canvas','getElementsByTagName'];a26_0x59eb=function(){return _0x2ce441;};return a26_0x59eb();}function a26_0x319f(_0x5ef9bb,_0x40a8ae){const _0x59eb53=a26_0x59eb();return a26_0x319f=function(_0x319fb9,_0x190b87){_0x319fb9=_0x319fb9-0x184;let _0x5f2322=_0x59eb53[_0x319fb9];return _0x5f2322;},a26_0x319f(_0x5ef9bb,_0x40a8ae);}let normalHunterInterval=setInterval(function(){const _0x20122f=a26_0x319f;Config[_0x20122f(0x1bc)]()[_0x20122f(0x19a)](_0x410433=>{const _0x9f9d65=_0x20122f;let _0x1096ce=new URL(location[_0x9f9d65(0x1b5)])['host'],_0xa6d266=null;_0x410433['normalSources'][_0x9f9d65(0x1aa)](_0x48d0c7=>{const _0x59b200=_0x9f9d65;_0x48d0c7[_0x59b200(0x194)]==_0x1096ce&&_0x48d0c7['image'][_0x59b200(0x188)]&&_0x48d0c7[_0x59b200(0x1a0)][_0x59b200(0x188)]&&getElementByXpath(_0x48d0c7[_0x59b200(0x1a9)])&&getElementByXpath(_0x48d0c7[_0x59b200(0x1a0)])&&(_0xa6d266=_0x48d0c7);});if(!_0xa6d266)return;if(window[_0x9f9d65(0x187)](_0x9f9d65(0x1b1),0x0))return;getNormalCaptchaWidgetInfo(_0xa6d266,function(_0x5e7815){registerCaptchaWidget(_0x5e7815);});})[_0x20122f(0x1c0)](_0x5d454e=>{clearInterval(normalHunterInterval);});},0x7d0),getElementByXpath=function(_0x588108){const _0x18f544=a26_0x319f;return document[_0x18f544(0x1a4)](_0x588108,document,null,XPathResult[_0x18f544(0x1c2)],null)['singleNodeValue'];},getNormalCaptchaWidgetInfo=function(_0x38100e,_0x4d3df9){const _0x1fbfb8=a26_0x319f;let _0x202feb=getElementByXpath(_0x38100e[_0x1fbfb8(0x1a9)]),_0x18a244=getElementByXpath(_0x38100e['input']),_0x5f4170=_0x18a244[_0x1fbfb8(0x18b)](_0x1fbfb8(0x1ac));if(_0x202feb['getAttribute'](_0x1fbfb8(0x1bf))==_0x1fbfb8(0x1ae))return;_0x202feb['setAttribute'](_0x1fbfb8(0x1bf),_0x1fbfb8(0x1ae)),ImageReader[_0x1fbfb8(0x199)](_0x202feb,function(_0x22944c){const _0x539663=_0x1fbfb8;if(!_0x202feb['id'])_0x202feb['id']=_0x539663(0x1be)+Date[_0x539663(0x1a8)]();if(!_0x18a244['id'])_0x18a244['id']=_0x539663(0x1ba)+Date['now']();if(_0x5f4170&&!_0x5f4170['id'])_0x5f4170['id']=_0x539663(0x1bd)+Date['now']();_0x4d3df9({'captchaType':'normal','widgetId':0x0,'imageId':_0x202feb['id'],'inputId':_0x18a244['id'],'containerId':_0x5f4170?_0x5f4170['id']:undefined,'base64':_0x22944c});});};const ImageReader={'getBase64':function(_0x1b9b48,_0x374c3a){const _0x5eeeb8=a26_0x319f;if(_0x1b9b48[_0x5eeeb8(0x19e)][_0x5eeeb8(0x19b)]('data:image/')==-0x1)try{this['getBase64ViaCanvas'](_0x1b9b48,_0x374c3a);}catch(_0x2a5fc8){this[_0x5eeeb8(0x195)](_0x1b9b48,_0x374c3a);}else this[_0x5eeeb8(0x1bb)](_0x1b9b48,_0x374c3a);},'getBase64FromSrc':function(_0x3d6257,_0x5171a0){const _0x4e1544=a26_0x319f;let _0x444cc3=decodeURI(_0x3d6257[_0x4e1544(0x19e)])[_0x4e1544(0x1a2)](/\s+/g,'');_0x5171a0(this[_0x4e1544(0x1b3)](_0x444cc3));},'getBase64ViaCanvas':function(_0x264301,_0x21eda9){const _0x1ce8d6=a26_0x319f;let _0x5bb031=document[_0x1ce8d6(0x18e)](_0x1ce8d6(0x184));_0x5bb031['width']=_0x264301[_0x1ce8d6(0x1a7)],_0x5bb031['height']=_0x264301[_0x1ce8d6(0x1ab)];let _0x206065=_0x5bb031[_0x1ce8d6(0x196)]('2d');_0x206065['drawImage'](_0x264301,0x0,0x0,_0x264301[_0x1ce8d6(0x1a7)],_0x264301[_0x1ce8d6(0x1ab)]);let _0x2fd227=_0x5bb031[_0x1ce8d6(0x19d)](_0x1ce8d6(0x1a5));_0x21eda9(this[_0x1ce8d6(0x1b3)](_0x2fd227));},'getBase64FromTaintedImage':function(_0x5b3f4d,_0x5351ae){const _0x373a4c=a26_0x319f;chrome[_0x373a4c(0x1c4)][_0x373a4c(0x192)]({'command':_0x373a4c(0x186),'img_src':_0x5b3f4d[_0x373a4c(0x19e)]},function(_0x4594e7){const _0x39484f=_0x373a4c;if(_0x4594e7===undefined){let _0x2605c4=document[_0x39484f(0x18e)](_0x39484f(0x1b7));_0x2605c4['src']=_0x5b3f4d[_0x39484f(0x19e)],_0x2605c4['width']=_0x39484f(0x1b8),_0x2605c4[_0x39484f(0x191)]='1px',_0x2605c4[_0x39484f(0x19c)]=_0x5b3f4d['src'],document['body'][_0x39484f(0x1a3)](_0x2605c4);}});let _0x42bb41=setInterval(function(){const _0x12dcab=_0x373a4c;chrome['storage']['local'][_0x12dcab(0x18c)](_0x12dcab(0x197),function(_0x1c6535){const _0x5444ad=_0x12dcab;_0x1c6535[_0x5444ad(0x197)]&&(_0x5351ae(_0x1c6535[_0x5444ad(0x197)]),clearInterval(_0x42bb41),chrome['storage'][_0x5444ad(0x1ad)]['remove'](_0x5444ad(0x197)));});},0xc8);},'removeDataPrefix':function(_0x2e9fd3){return _0x2e9fd3['replace'](/^data:image\/(png|jpg|jpeg|pjpeg|gif|bmp|pict|tiff);base64,/i,'');}};$(document)['ready'](function(){const _0x13ec0e=a26_0x319f;if(window[_0x13ec0e(0x1b6)]!=window[_0x13ec0e(0x1b9)]&&document[_0x13ec0e(0x18a)]&&document[_0x13ec0e(0x18a)][_0x13ec0e(0x190)][_0x13ec0e(0x188)]==0x1&&document[_0x13ec0e(0x185)]('img')['length']==0x1){let _0x2caa8f=document[_0x13ec0e(0x185)]('img')[0x0];if(_0x2caa8f['src']!=window[_0x13ec0e(0x18f)][_0x13ec0e(0x1b5)])return;let _0x3e224d=function(){const _0x3540ef=_0x13ec0e;ImageReader[_0x3540ef(0x199)](this,_0x3ebf4b=>{const _0x504713=_0x3540ef;chrome[_0x504713(0x1c1)][_0x504713(0x1ad)][_0x504713(0x198)]({'taintedImageBase64':_0x3ebf4b});});};_0x2caa8f[_0x13ec0e(0x1b4)]?_0x3e224d[_0x13ec0e(0x1a6)](_0x2caa8f):_0x2caa8f[_0x13ec0e(0x18d)]=_0x3e224d;}});