diff --git a/README.md b/README.md index 8fc917b..957b81f 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ To create an instance of Ninjemail, call the `Ninjemail` class with optional par ```python ninja = Ninjemail( browser="firefox", - captcha_keys={"capsolver": "YOUR_API_KEY"}, + captcha_keys={"capsolver": "YOUR_API_KEY", "nopecha": "YOUR_API_KEY"}, sms_keys={"service_name": {"user": "USERNAME", "token": "TOKEN"}}, proxies=['http://ip:port', 'http://ip2:port2'], auto_proxy=True @@ -110,7 +110,12 @@ ninja = Ninjemail( The `browser` parameter specifies the browser to be used for automation. The default value is "firefox". Currently, Ninjemail supports **Firefox, Chrome and Undetected Chrome**. The acceptable values for the browser parameter are `firefox`, `chrome` and `undetected-chrome` respectively. -The `captcha_keys` parameter is a dictionary that contains the **API keys for supported captcha solving services**, based on `config.toml`. The default value is an empty dictionary. You can provide API keys for specific captcha solving services if required. Currently, **"capsolver"** is supported. +The `captcha_keys` parameter is a dictionary that contains the **API keys for supported captcha solving services**, based on `config.toml`. The default value is an empty dictionary. You can provide API keys for specific captcha solving services if required. Currently, the following services are supported: + +- **"capsolver"** +- **"nopecha"** + +To provide the API keys for these services, you can pass a dictionary to the `captcha_keys` parameter. Each key-value pair in the dictionary corresponds to a captcha solving service and its respective API key as shown in the example above. The `sms_keys` parameter is a dictionary that contains the **API key/s for the SMS service/s**, based on `config.toml`. The default value is an empty dictionary. You can provide an API key or keys for the SMS services if required. Currently, **"getsmscode"**, **"smspool"** and **"5sim"** are supported. @@ -234,7 +239,7 @@ from ninjemail import Ninjemail # Replace "YOUR_API_KEY" and "TOKEN" with your actual API keys ninja = Ninjemail( browser="chrome", - captcha_keys={"capsolver": "YOUR_API_KEY"}, + captcha_keys={"nopecha": "YOUR_API_KEY"}, sms_keys={"smspool": {"token": "TOKEN"}}, proxies=['http://username:password@ip_address:port']) email, password = ninja.create_yahoo_account( diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/background.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/background.js new file mode 100644 index 0000000..3fdee95 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/background.js @@ -0,0 +1 @@ +(()=>{{let t=chrome.runtime.getManifest().content_scripts.filter(r=>r.js.includes("eventhook.js")).map(r=>r.matches);chrome.scripting.getRegisteredContentScripts().then(r=>{r.length||chrome.scripting.registerContentScripts([{id:"1",matches:t.flat(),js:["eventhook/loader.js"],allFrames:!0,runAt:"document_start",world:"MAIN"}])})}var a=chrome;var x="https://api.nopecha.com",i="https://www.nopecha.com",D="https://developers.nopecha.com",g={doc:{url:D,automation:{url:`${D}/guides/extension_advanced/#automation-build`}},api:{url:x,recognition:{url:`${x}/recognition`},status:{url:`${x}/status`}},www:{url:i,annoucement:{url:`${i}/json/announcement.json`},demo:{url:`${i}/demo`,hcaptcha:{url:`${i}/demo/hcaptcha`},recaptcha:{url:`${i}/demo/recaptcha`},funcaptcha:{url:`${i}/demo/funcaptcha`},awscaptcha:{url:`${i}/demo/awscaptcha`},turnstile:{url:`${i}/demo/turnstile`},textcaptcha:{url:`${i}/demo/textcaptcha`},perimeterx:{url:`${i}/demo/perimeterx`}},manage:{url:`${i}/manage`},pricing:{url:`${i}/pricing`},setup:{url:`${i}/setup`}},discord:{url:`${i}/discord`},github:{url:`${i}/github`,release:{url:`${i}/github/release`}}};var Z="en-US",ee="en";{let e=function(t,r,o,n){return{id:n,priority:1,action:{type:"redirect",redirect:{transform:{queryTransform:{addOrReplaceParams:[{key:t,value:r}]}}}},condition:{regexFilter:o,resourceTypes:["sub_frame"]}}};a.declarativeNetRequest.updateDynamicRules({addRules:[e("hl",Z,"^https?://[^\\.]*\\.(google\\.com|recaptcha\\.net)/recaptcha",1),e("lang",ee,"^https?://[^\\.]*\\.(funcaptcha\\.com?|arkoselabs\\.c(om|n)|arkose\\.com\\.cn)/fc/gc/",2)],removeRuleIds:[1,2]})}var d=new Map;chrome.tabs.onUpdated.addListener((e,t)=>{d.has(e)&&!("url"in t)||d.set(e,new Set)});chrome.tabs.onRemoved.addListener(e=>{d.delete(e)});async function U([e],t){let r=t.tab?.id;if(!r)return console.warn("[@nope/background/tabs] unable to figure out tabId");d.has(r)||d.set(r,new Set),d.get(r).add(e)}async function j(){let e=await new Promise(t=>{a.tabs.query({active:!0,currentWindow:!0},([r])=>{t(r)})});return d.has(e.id)?[...d.get(e.id)]:[]}var _={version:16,key:"",keys:[],enabled:!0,disabled_hosts:[],hcaptcha_auto_open:!0,hcaptcha_auto_solve:!0,hcaptcha_solve_delay:!0,hcaptcha_solve_delay_time:3e3,recaptcha_auto_open:!0,recaptcha_auto_solve:!0,recaptcha_solve_delay:!0,recaptcha_solve_delay_time:2e3,funcaptcha_auto_open:!0,funcaptcha_auto_solve:!0,funcaptcha_solve_delay:!0,funcaptcha_solve_delay_time:1e3,awscaptcha_auto_open:!1,awscaptcha_auto_solve:!1,awscaptcha_solve_delay:!0,awscaptcha_solve_delay_time:1e3,turnstile_auto_solve:!0,turnstile_solve_delay:!0,turnstile_solve_delay_time:1e3,perimeterx_auto_solve:!1,perimeterx_solve_delay:!0,perimeterx_solve_delay_time:1e3,textcaptcha_auto_solve:!1,textcaptcha_solve_delay:!0,textcaptcha_solve_delay_time:100,textcaptcha_image_selector:"",textcaptcha_input_selector:""};var y=a.action,S=!0;function R(e){if(e===S)return;S=e;let t=e?"":"g",r=[new Promise(o=>{y.setIcon({path:Object.fromEntries([16,32,48,128].map(n=>[n,`/icon/${n}${t}.png`]))},o)})];return w&&r.push(new Promise(o=>{y.setBadgeText({text:e?w:""},o)})),Promise.all(r)}var w="";function v(e,t){if(e!==w)return w=e,Promise.all([new Promise(r=>{if(!S)return r();y.setBadgeText({text:e},r)}),new Promise(r=>{y.setBadgeBackgroundColor({color:t},r)})])}function q(e,t){return t.tab.url}function B(){return new Promise(e=>{a.tabs.query({active:!0,currentWindow:!0},([t])=>e(t))})}async function m(){return(await B()).id}async function J(){let e=await B();return e&&e.url&&new URL(e.url).href}async function N(){let e=await B();return JSON.stringify(e)}var P=new Set,I=new Set;a.runtime.onConnect.addListener(e=>{e.name==="stream"?(P.add(e),e.onDisconnect.addListener(()=>{P.delete(e)})):e.name==="broadcast"&&(I.add(e),e.onDisconnect.addListener(()=>{I.delete(e)}))});function M(e){P.forEach(t=>t.postMessage(e))}async function F(e){let t=await m();e={data:e,event:"broadcast"},I.forEach(r=>{r.sender?.tab?.id!==void 0&&t===r.sender?.tab?.id&&r.postMessage(e)})}var A=new Promise(e=>{a.storage.local.get("settings",t=>{if(!t?.settings)return e(_);let{settings:r}=t;r.version!==_.version&&(r={..._,key:r.key}),r.enabled||R(!1),e(r)})});function k(){return A}async function O(e){let t={...await A,...e};return R(t.enabled),new Promise(r=>{a.storage.local.set({settings:t},()=>{A=Promise.resolve(t),M({event:"settingsUpdate",settings:e}),r(null)})})}function E(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var H,te=E();function L(){return te(()=>oe())}async function V(){return H}var re=a.runtime.getManifest().version;async function oe(){let e=new URLSearchParams;e.append("v",re);let t=(await k()).key;t&&e.append("key",t);let r=`${g.api.status.url}?${e.toString()}`,o,n=null;try{n=await fetch(r),o=await n.json()}catch(s){console.error("[@nope/background/api/status] failed to fetch status",n,s),o={error:-1,message:n?n.status===522?"Server not responding":n.status===502?"Server has routing issues":`Unknown server error: ${n.status}`:"Server connection failure."}}return n&&!n.ok&&(!o||!("error"in o))&&(console.error("[@nope/background/api/status] received non 2xx",n,o),o={error:-1,message:`Server error: ${n.status}`}),H=o,"error"in o?v("ERR","#FDE047"):typeof o.credit=="number"&&typeof o.quota=="number"?v(o.credit>=9999?`${Math.floor(o.credit/o.quota*100)}`:o.credit.toString(),o.credit?"#0a95ff":"#FB7185"):v("","#fff0"),o}L();function h(e){return new Promise(t=>setTimeout(t,e))}function T(e,t=2166136261){let r=t;for(let o of e)r^=o,r+=r<<1;return r>>>0}var ne=30,f=[];function $(e,t){let r;if(!t.method||t.method==="GET"){let n=new URLSearchParams(e.split("?")[1]).get("id");if(!n)return;let s=f.find(c=>{let u=c.postres[c.postres.length-1];return!u?.responseBody||!("data"in u.responseBody)?!1:u?.responseBody?.data===n});s&&(r=s.id,s.getreq={time:+new Date,url:e,options:t})}else for(r=""+[+new Date,performance.now(),Math.random()],f.push({id:r,postreq:{time:+new Date,url:e,options:t},getreq:{time:0,url:"",options:{}},postres:[],getres:[]});f.length>ne;)f.shift();return r}function b(e,t){let r=f.find(o=>o.id===e);r&&(r.getreq.time?(r.getres.push({time:+new Date,...t}),t.responseBody&&"data"in t.responseBody&&(r.answer=t.responseBody.data)):r.postres.push({time:+new Date,...t}))}function W(){return JSON.stringify(f)}var ae=[15,16,12,10,17];async function G(e){let t=new Headers;t.append("accept","application/json"),t.append("content-type","application/json");let r=typeof e.v=="string"?T(e.v.split("").map(c=>c.charCodeAt(0))):-1;e.key&&e.key!=="undefined"&&t.append("authorization",`Bearer ${e.key}`);let o;for(let c=30;c>0&&r===2385114808;c--){let u=$(g.api.url,{method:"POST",headers:t,body:e}),l=await fetch(g.api.url,{method:"POST",headers:t,body:JSON.stringify(e)});if(l.status>=500){b(u,{response:l,attempts:c}),await h(1e3);continue}let p=await l.json();if(b(u,{response:l,responseBody:p,attempts:c}),"error"in p){if(ae.includes(p.error))return p;p.error!==11&&console.warn("[@nope/background/api/recognition] unknown error",p),await h(1e3)}else{o=p.data;break}}if(!o)return{error:-1,message:"Server timeout"};t.delete("content-type");let n,s=`${g.api.url}?id=${o}&key=${e.key}`;for(let c=60;c>0;c--){n=$(s,{headers:t});let u=await fetch(s,{headers:t});if(u.status>=500){b(n,{response:u,attempts:c}),await h(1e3);continue}let l=await u.json();if(b(n,{response:u,responseBody:l,attempts:c}),"error"in l)l.error!==14&&console.warn("[@nope/background/api/recognition] unknown error",l),await h(1e3);else return l}return n&&b(n,{failed:!0}),{error:-1,message:"Server timeout"}}async function K([e,t]){let r=await fetch(e,t);return{headers:Object.fromEntries(r.headers.entries()),status:r.status,ok:r.ok,text:await r.text()}}async function X([e,t]){let r=await fetch(e,t),o=await r.blob(),n=new FileReader;return await new Promise(s=>{n.addEventListener("load",s),n.readAsDataURL(o)}),{headers:Object.fromEntries(r.headers.entries()),status:r.status,ok:r.ok,data:n.result}}function C(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(r=>r.charCodeAt(0));return Q(t)}var z=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let r=8;r--;)t=t&1?3988292384^t>>>1:t>>>1;z[e]=t}function Q(e){let t=-1;for(let r of e)t=t>>>8^z[t&255^r];return(t^-1)>>>0}async function Y(e){!e&&(e=await m(),!e)||chrome.scripting.executeScript({target:{tabId:e,allFrames:!0},files:["lib/selector.js","locate.js"],world:"ISOLATED",injectImmediately:!0})}var se={"echo::sender":(e,t)=>t,"log::getLogs":W,"settings::get":k,"settings::update":([e])=>O(e),"api::fetchStatus":L,"api::getCachedStatus":V,"api::recognition":([e])=>G(e),"tab::getCurrentId":m,"tab::getCurrentJSON":N,"tab::getCurrentURL":J,"tab::getURL":q,"tab::registerDetectedCaptcha":U,"tab::getDetectedCaptchas":j,"fetch::universalFetch":K,"fetch::asData":X,"tab::broadcast":([e])=>F(e),"locator::inject":(e,t)=>Y(t?.tab?.id)};a.runtime.onMessage.addListener((e,t,r)=>{let o=e[1],n=se[o];return Promise.resolve(n(e.slice(2),t)).then(s=>{r([C(e[0]),s])}).catch(s=>{console.error(`[@nope/background/rpc] [${o}] errored!`,e.slice(2),s),r([C(e[0]),""+s])}),!0});})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/awscaptcha.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/awscaptcha.js new file mode 100644 index 0000000..a8ced57 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/awscaptcha.js @@ -0,0 +1 @@ +(()=>{var s=chrome;var h="https://api.nopecha.com",n="https://www.nopecha.com",S="https://developers.nopecha.com",V={doc:{url:S,automation:{url:`${S}/guides/extension_advanced/#automation-build`}},api:{url:h,recognition:{url:`${h}/recognition`},status:{url:`${h}/status`}},www:{url:n,annoucement:{url:`${n}/json/announcement.json`},demo:{url:`${n}/demo`,hcaptcha:{url:`${n}/demo/hcaptcha`},recaptcha:{url:`${n}/demo/recaptcha`},funcaptcha:{url:`${n}/demo/funcaptcha`},awscaptcha:{url:`${n}/demo/awscaptcha`},turnstile:{url:`${n}/demo/turnstile`},textcaptcha:{url:`${n}/demo/textcaptcha`},perimeterx:{url:`${n}/demo/perimeterx`}},manage:{url:`${n}/manage`},pricing:{url:`${n}/pricing`},setup:{url:`${n}/setup`}},discord:{url:`${n}/discord`},github:{url:`${n}/github`,release:{url:`${n}/github/release`}}};function v(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(o=>o.charCodeAt(0));return x(t)}var M=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let o=8;o--;)t=t&1?3988292384^t>>>1:t>>>1;M[e]=t}function x(e){let t=-1;for(let o of e)t=t>>>8^M[t&255^o];return(t^-1)>>>0}async function a(e,t){let o=""+[+new Date,performance.now(),Math.random()],[u,c]=await new Promise(f=>{s.runtime.sendMessage([o,e,...t],f)});if(u===v(o))return c}function B(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var Q=B(),i;function C(){return Q(async()=>(i||(i=await a("settings::get",[])),i))}function q(e){i&&(i={...i,...e},A(i))}function m(){return i}function r(e){return new Promise(t=>setTimeout(t,e))}var H=[];function b(e,t){e.timedout=!1,H.push(e);let o,u=setInterval(async()=>{await $(e,m())||(clearTimeout(o),clearInterval(u))},400);t&&(o=setTimeout(()=>clearInterval(u),t),e.timedout=!0)}async function $(e,t){if(e.timedout)return!1;let o=e.condition(t);if(o===e.running())return!1;if(!o&&e.running())return e.quit(),!1;if(o&&!e.running()){for(;!e.ready();)await r(200);return e.start(),!1}}function A(e){H.forEach(t=>$(t,e))}function k(){s.runtime.connect({name:"stream"}).onMessage.addListener(t=>{t.event==="settingsUpdate"&&q(t.settings)})}function w(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}var j,_=!1;function L(){return!!(document.querySelector("#captcha-container")&&document.querySelector("#amzn-captcha-verify-button"))}function R(){_=!0,F()}function T(){j.disconnect(),_=!1}function E(){return _}async function F(){await r(400),document.querySelector("#amzn-captcha-verify-button")?.click()}function P(){return!!(document.querySelector("#captcha-container")||document.querySelector("#amzn-captcha-verify-button"))}async function N(e,t){let o={v:s.runtime.getManifest().version,key:K(e)};return o.url=await a("tab::getURL",[]),o}function K(e){return!e.keys||!e.keys.length?e.key:e.keys[Math.floor(Math.random()*e.keys.length)]}var d,y=!1;function z(){if(O(document))return!0;for(let e of document.querySelectorAll("awswaf-captcha")){let t=e.shadowRoot;if(O(t))return!0}return!1}function I(){y=!0;let e=t=>{t.filter(o=>o.type==="childList"&&o.addedNodes.length).map(o=>[...o.addedNodes]).flat().filter(o=>o.nodeName==="AWSWAF-CAPTCHA").map(o=>o.shadowRoot).forEach(o=>{d.observe(o,{subtree:!0,childList:!0}),l(o)}),[3,4,5].includes(t.length)?l(t[0].target.parentElement):t.length===1&&t[0].addedNodes.length&&t[0].addedNodes[0].id==="root"&&l(t[0].addedNodes[0])};d=new MutationObserver(e),d.observe(document,{subtree:!0,childList:!0}),l(document),document.querySelectorAll("awswaf-captcha").forEach(t=>{let o=t.shadowRoot;d.observe(o,{subtree:!0,childList:!0}),l(o)})}function U(){d.disconnect(),y=!1}function W(){return y}function l(e){let t=e.querySelector("#amzn-btn-audio-internal, #amzn-btn-audio");e.querySelector("audio")||t?.click(),e.querySelector("audio")&&G(e),(e.querySelector("audio")||t)&&a("tab::registerDetectedCaptcha",["awscaptcha"])}function O(e){let t=e.querySelector("#amzn-btn-audio-internal, #amzn-btn-audio");return!!(e.querySelector("audio")||t)}var D;async function G(e){let t=e.querySelector("audio").src.replace("data:audio/aac;base64,","");if(t===D||(D=t,!t))return;let o=m(),u=new Date().valueOf(),c=await a("api::recognition",[{type:"awscaptcha",audio_data:[t],...await N(o)}]);if(!c||"error"in c)return;let f=new Date().valueOf();if(o.awscaptcha_solve_delay){let p=o.awscaptcha_solve_delay_time-f+u;p>0&&await r(p)}let g=c.data[0];g?(e.querySelector("input").value=g,await r(200),e.querySelector("#amzn-btn-verify-internal").click()):e.querySelector("#amzn-btn-refresh-internal").click()}async function J(){let e=!1;for(let o=0;o<3;o++)if(await r(1e3),P()){e=!0;break}if(!e)return;k(),await C(),await a("tab::registerDetectedCaptcha",["awscaptcha"]);let t=location.hostname;b({name:"awscaptcha/auto-open",condition:o=>o.enabled&&o.awscaptcha_auto_open&&!o.disabled_hosts.includes(t),ready:L,start:R,quit:T,running:E}),b({name:"awscaptcha/auto-solve",condition:o=>o.enabled&&o.awscaptcha_auto_solve&&!o.disabled_hosts.includes(t),ready:z,start:I,quit:U,running:W})}w(J);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/funcaptcha.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/funcaptcha.js new file mode 100644 index 0000000..7a72f1e --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/funcaptcha.js @@ -0,0 +1 @@ +(()=>{function D(){if("ancestorOrigins"in location){let t=location.ancestorOrigins,n=t[1]??t[0];if(n)return n.split("/")[2]}let e=document.referrer;return e?e.split("/")[2]:location.origin}var h=chrome;var x="https://api.nopecha.com",i="https://www.nopecha.com",L="https://developers.nopecha.com",_e={doc:{url:L,automation:{url:`${L}/guides/extension_advanced/#automation-build`}},api:{url:x,recognition:{url:`${x}/recognition`},status:{url:`${x}/status`}},www:{url:i,annoucement:{url:`${i}/json/announcement.json`},demo:{url:`${i}/demo`,hcaptcha:{url:`${i}/demo/hcaptcha`},recaptcha:{url:`${i}/demo/recaptcha`},funcaptcha:{url:`${i}/demo/funcaptcha`},awscaptcha:{url:`${i}/demo/awscaptcha`},turnstile:{url:`${i}/demo/turnstile`},textcaptcha:{url:`${i}/demo/textcaptcha`},perimeterx:{url:`${i}/demo/perimeterx`}},manage:{url:`${i}/manage`},pricing:{url:`${i}/pricing`},setup:{url:`${i}/setup`}},discord:{url:`${i}/discord`},github:{url:`${i}/github`,release:{url:`${i}/github/release`}}};function E(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(n=>n.charCodeAt(0));return q(t)}var P=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let n=8;n--;)t=t&1?3988292384^t>>>1:t>>>1;P[e]=t}function q(e){let t=-1;for(let n of e)t=t>>>8^P[t&255^n];return(t^-1)>>>0}async function u(e,t){let n=""+[+new Date,performance.now(),Math.random()],[a,o]=await new Promise(r=>{h.runtime.sendMessage([n,e,...t],r)});if(a===E(n))return o}function b(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var oe=b(),m;function O(){return oe(async()=>(m||(m=await u("settings::get",[])),m))}function F(e){m&&(m={...m,...e},N(m))}function _(){return m}function l(e){return new Promise(t=>setTimeout(t,e))}var z=[];function T(e,t){e.timedout=!1,z.push(e);let n,a=setInterval(async()=>{await U(e,_())||(clearTimeout(n),clearInterval(a))},400);t&&(n=setTimeout(()=>clearInterval(a),t),e.timedout=!0)}async function U(e,t){if(e.timedout)return!1;let n=e.condition(t);if(n===e.running())return!1;if(!n&&e.running())return e.quit(),!1;if(n&&!e.running()){for(;!e.ready();)await l(200);return e.start(),!1}}function N(e){z.forEach(t=>U(t,e))}function W(){h.runtime.connect({name:"stream"}).onMessage.addListener(t=>{t.event==="settingsUpdate"&&F(t.settings)})}function S(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}var Oe=b();var re=["#home_children_button","#wrong_children_button","#wrongTimeout_children_button","button[data-theme*=verifyButton]","[class*=game-fail] .button",".error .button"],G=["#root","#app","#home","#wrong","#wrongTimeout",".container[dir]"].join(", "),k,C=!1;function V(){return!!document.querySelector(G)}function j(){C=!0;let e=()=>{ie(),document.querySelectorAll(G).forEach(t=>{k.observe(t,{childList:!0})})};k=new MutationObserver(e),e()}function Q(){k.disconnect(),C=!1}function K(){return C}async function ie(){await l(400),re.map(e=>document.querySelector(e)).filter(e=>e).map(e=>e.click())}function ce(e,t){let n=document.createElement("canvas");return n.width=e,n.height=t,n}function M(e){return e.toDataURL("image/jpeg").replace(/data:image\/[a-z]+;base64,/g,"")}function se(e){try{e.getContext("2d").getImageData(0,0,1,1)}catch{return!0}return!1}async function I(e,t,n=1e4){if(!t&&!e.complete&&!await new Promise(c=>{let d=setTimeout(()=>{c(!1)},n);e.addEventListener("load",()=>{clearTimeout(d),c(!0)})}))return;let a=ce(e.naturalWidth||t?.clientWidth,e.naturalHeight||t?.clientHeight);return a.getContext("2d").drawImage(e,0,0),!se(a)&&a}async function B(e){let n=getComputedStyle(e).backgroundImage;if(!n||n==="none")if("src"in e&&e.src)n=`url("${e.src}")`;else return;if("computedStyleMap"in e){let s=e.computedStyleMap().get("background-image");if(s instanceof CSSImageValue){let f=await I(s,e);if(f)return f}}let a=/"(.+)"/.exec(n);if(!a)return;n=a[1];let o=document.createElement("a");if(o.href=n,new URL(o.href).origin===document.location.origin){let s=new Image;s.crossOrigin="anonymous",s.src=n;let f=await I(s);if(f)return f}let r=await u("fetch::asData",[n,{}]),c=new Image;c.crossOrigin="anonymous",c.src=r.data;let d=await I(c);if(d)return d}function ue(e,t,n,a){let o=(a*t+n)*4;return[e[o],e[o+1],e[o+2]]}function le(e,t){return e.every(n=>n<=t)}function de(e,t){return e.every(n=>n>=t)}function $(e,t=0,n=230,a=.99){let o=e.getContext("2d"),r=o.canvas.width,c=o.canvas.height;if(r===0||c===0)return!0;let d=o.getImageData(0,0,r,c).data,s=0;for(let w=0;wa}function J(){return[]}function X(e){return new Promise(t=>{e.push(t)})}function g(e){e.forEach(t=>t()),e.splice(0)}async function Y(e,t){let n={v:h.runtime.getManifest().version,key:me(e)};return n.url=await u("tab::getURL",[]),n}function me(e){return!e.keys||!e.keys.length?e.key:e.keys[Math.floor(Math.random()*e.keys.length)]}var p=J(),H,y=!1;function ee(){return R()!==void 0}function te(){y=!0,g(p),H=new MutationObserver(e=>{let t=R();for(let n of e)if(n.type==="childList"&&n.removedNodes.length&&["app","game"].includes(n.target.id)){setTimeout(()=>g(p),200);return}t===1&&e.length===24&&!document.querySelector(".loading-spinner")&&setTimeout(()=>g(p),200),t===2&&[8,13].includes(e.length)&&!document.querySelector(".loading-spinner")&&setTimeout(()=>g(p),200)}),H.observe(document,{childList:!0,subtree:!0,attributes:!0}),fe()}function ne(){H.disconnect(),y=!1,g(p)}function ae(){return y}var ge={[0]:{async getTask(){let e=document.querySelector("#game_children_text h2"),t=document.querySelector("#game_challengeItem_image"),n=[...document.querySelectorAll("#game_children_challenge a")];if(!(!e||!t||n.length!==6))return{payload:{type:"funcaptcha",task:e.textContent,image_data:[t.src.replace(/data:image\/[a-z]+;base64,/g,"")]},cells:n}},async solution(e,t){e.cells.forEach((n,a)=>{t.data[a]&&n.click()})}},[1]:{async getTask(){let e=document.querySelector(".tile-game h2"),t=[...document.querySelectorAll(".challenge-container button")];if(!e||t.length!==6)return;let n=await B(t[0]);if(n&&!$(n))return{payload:{type:"funcaptcha",task:e.textContent,image_data:[M(n)]},cells:t}},async solution(e,t){e.cells.forEach((n,a)=>{t.data[a]&&n.click()})}},[2]:{async getTask(){let e=document.querySelector(".match-game h2"),t=document.querySelector(".key-frame-image");if(!e||!t)return;let n=await B(t);if(n&&!$(n))return{payload:{type:"funcaptcha_match",task:e.textContent,image_data:[M(n)]}}},async solution(e,t){let n=document.querySelector(".right-arrow"),a=t.data.indexOf(!0);for(let r=0;rdocument.querySelector(e)).map(([e,t])=>t)[0]}var Z=!1;async function fe(){if(!Z)for(Z=!0;y;){let e=R();if(e===void 0){await l(500);continue}let t=ge[e],n=await t.getTask();if(!n){await l(500);continue}let a=_(),o=new Date().valueOf(),r=await u("api::recognition",[{...n.payload,...await Y(a,!0)}]);if(!r||"error"in r){await l(2e3);continue}let c=new Date().valueOf();if(a.funcaptcha_solve_delay){let s=a.funcaptcha_solve_delay_time-c+o;s>0&&await l(s)}await t.solution(n,r);let d=setTimeout(()=>{g(p)},1e3*5);await X(p),clearTimeout(d)}}async function he(){W(),await O(),await u("tab::registerDetectedCaptcha",["funcaptcha"]);let e=D();T({name:"funcaptcha/auto-open",condition:t=>t.enabled&&t.funcaptcha_auto_open&&!t.disabled_hosts.includes(e),ready:V,start:j,quit:Q,running:K}),T({name:"funcaptcha/auto-solve",condition:t=>t.enabled&&t.funcaptcha_auto_solve&&!t.disabled_hosts.includes(e),ready:ee,start:te,quit:ne,running:ae})}S(he);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/hcaptcha.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/hcaptcha.js new file mode 100644 index 0000000..2ba266b --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/hcaptcha.js @@ -0,0 +1 @@ +(()=>{var k=chrome;var D="https://api.nopecha.com",m="https://www.nopecha.com",Y="https://developers.nopecha.com",Ee={doc:{url:Y,automation:{url:`${Y}/guides/extension_advanced/#automation-build`}},api:{url:D,recognition:{url:`${D}/recognition`},status:{url:`${D}/status`}},www:{url:m,annoucement:{url:`${m}/json/announcement.json`},demo:{url:`${m}/demo`,hcaptcha:{url:`${m}/demo/hcaptcha`},recaptcha:{url:`${m}/demo/recaptcha`},funcaptcha:{url:`${m}/demo/funcaptcha`},awscaptcha:{url:`${m}/demo/awscaptcha`},turnstile:{url:`${m}/demo/turnstile`},textcaptcha:{url:`${m}/demo/textcaptcha`},perimeterx:{url:`${m}/demo/perimeterx`}},manage:{url:`${m}/manage`},pricing:{url:`${m}/pricing`},setup:{url:`${m}/setup`}},discord:{url:`${m}/discord`},github:{url:`${m}/github`,release:{url:`${m}/github/release`}}};function Q(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(n=>n.charCodeAt(0));return j(t)}var V=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let n=8;n--;)t=t&1?3988292384^t>>>1:t>>>1;V[e]=t}function j(e){let t=-1;for(let n of e)t=t>>>8^V[t&255^n];return(t^-1)>>>0}async function h(e,t){let n=""+[+new Date,performance.now(),Math.random()],[a,r]=await new Promise(i=>{k.runtime.sendMessage([n,e,...t],i)});if(a===Q(n))return r}function I(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var ke=I(),v;function J(){return ke(async()=>(v||(v=await h("settings::get",[])),v))}function G(e){v&&(v={...v,...e},Z(v))}function B(){return v}function p(e){return new Promise(t=>setTimeout(t,e))}var ee=[];function E(e,t){e.timedout=!1,ee.push(e);let n,a=setInterval(async()=>{await te(e,B())||(clearTimeout(n),clearInterval(a))},400);t&&(n=setTimeout(()=>clearInterval(a),t),e.timedout=!0)}async function te(e,t){if(e.timedout)return!1;let n=e.condition(t);if(n===e.running())return!1;if(!n&&e.running())return e.quit(),!1;if(n&&!e.running()){for(;!e.ready();)await p(200);return e.start(),!1}}function Z(e){ee.forEach(t=>te(t,e))}function ne(){k.runtime.connect({name:"stream"}).onMessage.addListener(t=>{t.event==="settingsUpdate"&&G(t.settings)})}function R(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}var nt=I();var Se=(e,t,n)=>new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:t,screenY:n,clientX:t,clientY:n,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});function y(e,{events:t=null,x:n=null,y:a=null}={}){let r=document.querySelector(e);if(!r)return;if(n===null||a===null){let o=r.getBoundingClientRect();n=o.left+o.width/2,a=o.top+o.height/2}let i=t??["mouseover","mousedown","mouseup","click"];for(let o of i)r.dispatchEvent(Se(o,n,a))}function ae(e,t){return Math.random()*(t-e)+e}function P(e,t,n,a){let r=new MouseEvent(t,{bubbles:!0,cancelable:!0,clientX:n,clientY:a});e.dispatchEvent(r)}function oe(e,t,n,a,r,i=10,o=10,c=2){return new Promise(s=>{let d=document.querySelector(e);if(!d)return;let l=d.getBoundingClientRect();P(d,"mousedown",t+l.left,n+l.top);for(let u=1;u<=i;u++){let g=u/i,w=t+(a-t)*g,b=n+(r-n)*g,x=ae(-c,c),A=ae(-c,c);setTimeout(()=>{P(d,"mousemove",w+x+l.left,b+A+l.top)},u*o)}setTimeout(()=>{P(d,"mouseup",a+l.left,r+l.top),s()},i*o)})}var M,q=!1;function re(){return!!(document.querySelector("div.check")&&document.querySelector("#anchor"))}function ie(){q=!0;let e=document.querySelector("div.check"),t=document.querySelector("#anchor"),n=()=>{e.style.display==="block"||t.getAttribute("aria-hidden")=="true"||Ce()};M=new MutationObserver(n),M.observe(e,{attributes:!0}),M.observe(t,{attributes:!0}),n()}function se(){M.disconnect(),q=!1}function ce(){return q}async function Ce(){await p(400),y("#checkbox")}function S(e,t){let n=document.createElement("canvas");return n.width=e,n.height=t,n}function le(e){return new Promise((t,n)=>{let a=new Image;a.onload=()=>t(a),a.onerror=r=>n(r),a.src=`data:image/png;base64,${e}`})}function N(e){return e.toDataURL("image/jpeg").replace(/data:image\/[a-z]+;base64,/g,"")}function Te(e){try{e.getContext("2d").getImageData(0,0,1,1)}catch{return!0}return!1}async function O(e,t,n=1e4){if(!t&&!e.complete&&!await new Promise(o=>{let c=setTimeout(()=>{o(!1)},n);e.addEventListener("load",()=>{clearTimeout(c),o(!0)})}))return;let a=S(e.naturalWidth||t?.clientWidth,e.naturalHeight||t?.clientHeight);return a.getContext("2d").drawImage(e,0,0),!Te(a)&&a}async function ue(e){let n=getComputedStyle(e).backgroundImage;if(!n||n==="none")if("src"in e&&e.src)n=`url("${e.src}")`;else return;if("computedStyleMap"in e){let s=e.computedStyleMap().get("background-image");if(s instanceof CSSImageValue){let d=await O(s,e);if(d)return d}}let a=/"(.+)"/.exec(n);if(!a)return;n=a[1];let r=document.createElement("a");if(r.href=n,new URL(r.href).origin===document.location.origin){let s=new Image;s.crossOrigin="anonymous",s.src=n;let d=await O(s);if(d)return d}let i=await h("fetch::asData",[n,{}]),o=new Image;o.crossOrigin="anonymous",o.src=i.data;let c=await O(o);if(c)return c}function de(e,t,n,a){let r=(a*t+n)*4;return[e[r],e[r+1],e[r+2]]}function me(e,t){return e.every(n=>n<=t)}function ge(e,t){return e.every(n=>n>=t)}function z(e,t=0,n=230,a=.99){let r=e.getContext("2d"),i=r.canvas.width,o=r.canvas.height;if(i===0||o===0)return!0;let c=r.getImageData(0,0,i,o).data,s=0;for(let l=0;la}function pe(e,t=0,n=230,a=.1){let r=e.getContext("2d"),i=r.canvas.width,o=r.canvas.height,c=r.getImageData(0,0,i,o).data,s=Array(o).fill(0),d=Array(i).fill(0);for(let f=0;ff/i<1-a?_:null).filter(f=>f!==null),u=d.map((f,_)=>f/o<1-a?_:null).filter(f=>f!==null);if(l.length===0||u.length===0)return{croppedCanvas:e,coordinates:[0,0,i-1,o-1]};let g=l[0],w=l[l.length-1],b=u[0],x=u[u.length-1];if(x-b+1===1||w-g+1===1)return{croppedCanvas:null,coordinates:[0,0,0,0]};let A=r.getImageData(b,g,x-b+1,w-g+1),K=S(x-b+1,w-g+1);return K.getContext("2d").putImageData(A,0,0),{croppedCanvas:K,coordinates:[b,g,x,w]}}function U(e,t=500,n=500){let a=e.getContext("2d"),r=a.canvas.width,i=a.canvas.height,o=a.getImageData(0,0,r,i),c=o.width,s=o.height,d=c/s,l=c,u=s;if(l>t&&(l=t,u=Math.floor(l/d)),u>n&&(u=n,l=Math.floor(u*d)),l===c&&u===s)return e;let g=S(c,s);g.getContext("2d").putImageData(o,0,0);let b=S(l,u);return b.getContext("2d").drawImage(g,0,0,c,s,0,0,l,u),b}function fe(){return[]}function he(e){return new Promise(t=>{e.push(t)})}function L(e){e.forEach(t=>t()),e.splice(0)}async function be(e,t){let n={v:k.runtime.getManifest().version,key:Ie(e)};return n.url=await h("tab::getURL",[]),n}function Ie(e){return!e.keys||!e.keys.length?e.key:e.keys[Math.floor(Math.random()*e.keys.length)]}var H=fe(),$,T=!1;function _e(){let e=document.querySelector(".challenge-container");return!(!e||e.childElementCount===0||!document.querySelector(".display-error")||!document.querySelector("body.no-selection")||!document.querySelector("div.button-submit.button"))}function ve(){T=!0,L(H),$=new MutationObserver(async()=>{setTimeout(()=>L(H),200)}),$.observe(document.querySelector(".display-error"),{attributes:!0,attributeFilter:["aria-hidden"]}),$.observe(document.querySelector("div.button-submit.button"),{attributes:!0,attributeFilter:["style"]}),Ae()}function we(){$.disconnect(),T=!1,L(H)}function xe(){return T}async function Be(){document.querySelector(".display-language .text").textContent!=="EN"&&y(".language-selector .option:nth-child(23)")}async function C(e,t){let n=await ue(t);if(n&&!z(n))return e!==null&&(n=U(n,e,e)),N(n)}function F(){let e=document.querySelector("h2.prompt-text");if(e)return e.textContent.replace(/\s+/g," ").trim()}function W(){return new URLSearchParams(location.hash.substring(1)).get("sitekey")}var Me={[0]:{async getTask(){let e=F();if(!e)return;let t=[...document.querySelectorAll(".task-image")];if(t.length!==9)return;let n=(await Promise.all(t.map(i=>i.querySelector("div.image")).filter(i=>i).map(C.bind(this,128)))).filter(i=>i);if(n.length!==9)return;let a=[...document.querySelectorAll(".examples .image")],r=(await Promise.all(a.map(C.bind(this,128)))).filter(i=>i);return{cells:t,payload:{type:"hcaptcha",task:e,sitekey:W(),image_data:n,image_examples:r}}},async solution({cells:e},t){e.forEach((n,a)=>{let r=n.getAttribute("aria-pressed")=="true";t.data[a]!==r&&y(`.task:nth-child(${a+1})`)})}},[1]:{async getTask(){let e=F();if(!e)return;let t=document.querySelector(".task-image .image");if(!t)return;let n=await C(500,t);if(!n)return;let a=[...document.querySelectorAll(".challenge-answer")];if(a.length<2)return;let r=a.map(o=>o.querySelector(".text-content")?.textContent);if(r.some(o=>!o))return;let i=(await Promise.all(a.map(o=>o.querySelector("div.image")).filter(o=>o).map(C.bind(this,128)))).filter(o=>o);return{payload:{type:"hcaptcha_multiple_choice",task:e,sitekey:W(),image_data:[n],choices:r,image_choices:i}}},async solution(e,t){let n;Array.isArray(t.data)?n=t.data[0]:n=t.data;let a=e.payload.choices.indexOf(n);y(`.challenge-answer:nth-child(${a+1})`)}},[2]:{async getTask(){let e=F();if(!e)return;let t=document.querySelector(".challenge-view > canvas");if(!t||z(t))return;let{croppedCanvas:n,coordinates:a}=pe(t);if(!n)return;let r=U(n,500,500);if(!r)return;let i=N(r),o=[...document.querySelectorAll(".example-image .image")],c=(await Promise.all(o.map(C.bind(this,128)))).filter(s=>s);return{coordinates:a,payload:{type:"hcaptcha_area_select",task:e,sitekey:W(),image_data:[i],image_examples:c}}},async solution(e,t){let{x:n,y:a,w:r,h:i}=t.data,o=document.querySelector(".challenge-view > canvas"),c=e.coordinates,s=c[2]-c[0],d=c[3]-c[1];n=n/100*s+c[0],a=a/100*d+c[1],r=r/100*s,i=i/100*d;let l=o?+o.style.width.replace("px","")/+o.width:1,u=o?+o.style.height.replace("px","")/+o.height:1;r&&i?await oe(".challenge-view > canvas",n*l,a*u,(n+r)*l,(a+i)*u):y(".challenge-view > canvas",{events:["mousedown","mousemove","mouseup"],x:n*l,y:a*u})}}},Le=[[".challenge-view > .task-grid",0],[".challenge-view > .task-wrapper",1],[".challenge-view > .bounding-box-example",2]];function $e(){return Le.filter(([e])=>document.querySelector(e)).map(([e,t])=>t)[0]}async function He(e){if(e.payload.type==="hcaptcha_area_select"&&"image_data"in e.payload&&Array.isArray(e.payload.image_data)&&e.payload.image_data.length===1){let t=e.payload.image_data[0],a=S(500,500).getContext("2d"),r=await le(t);a.drawImage(r,0,0);let i=10,o=a.getImageData(0,0,500,i);return JSON.stringify({task:e.payload.task,top:o})}return JSON.stringify(e)}var ye=!1;async function Ae(){if(ye)return;ye=!0;let e;for(;T;){if(document.querySelector(".display-error[aria-hidden=false]"))for(;document.querySelector(".button-submit[title*=Submit], .button-submit[title*=Verify]");)await p(1e3);if(!document.querySelector(".challenge-container")?.childElementCount){await p(1e3);continue}await Be(),await p(500);let t,n,a=!1;for(let s=0;s<30&&T;s++){s&&await p(1e3);let d=$e();if(d!==void 0&&(t=Me[d],n=await t.getTask(),n)){let l=await He(n);if(e&&l===e)continue;e=l,a=!0;break}}if(!n||!a){y(".refresh"),await p(2e3);continue}let r=B(),i=new Date().valueOf(),o=await h("api::recognition",[{...n.payload,...await be(r)}]);if(!o||"error"in o){await p(2e3);continue}let c=new Date().valueOf();if(r.hcaptcha_solve_delay){let s=r.hcaptcha_solve_delay_time-c+i;s>0&&await p(s)}await t.solution(n,o),await p(200),y(".button-submit"),await he(H),await p(200)}}async function De(){ne(),await J(),await h("tab::registerDetectedCaptcha",["hcaptcha"]);let e=new URLSearchParams(location.hash.substring(1)),t=e.get("frame"),n=e.get("host");t==="checkbox"?E({name:"hcaptcha/auto-open",condition:a=>a.enabled&&a.hcaptcha_auto_open&&!a.disabled_hosts.includes(n),ready:re,start:ie,quit:se,running:ce}):E({name:"hcaptcha/auto-solve",condition:a=>a.enabled&&a.hcaptcha_auto_solve&&!a.disabled_hosts.includes(n),ready:_e,start:ve,quit:we,running:xe})}R(De);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/perimeterx.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/perimeterx.js new file mode 100644 index 0000000..d1e6296 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/perimeterx.js @@ -0,0 +1 @@ +(()=>{var u=chrome;var l="https://api.nopecha.com",n="https://www.nopecha.com",b="https://developers.nopecha.com",L={doc:{url:b,automation:{url:`${b}/guides/extension_advanced/#automation-build`}},api:{url:l,recognition:{url:`${l}/recognition`},status:{url:`${l}/status`}},www:{url:n,annoucement:{url:`${n}/json/announcement.json`},demo:{url:`${n}/demo`,hcaptcha:{url:`${n}/demo/hcaptcha`},recaptcha:{url:`${n}/demo/recaptcha`},funcaptcha:{url:`${n}/demo/funcaptcha`},awscaptcha:{url:`${n}/demo/awscaptcha`},turnstile:{url:`${n}/demo/turnstile`},textcaptcha:{url:`${n}/demo/textcaptcha`},perimeterx:{url:`${n}/demo/perimeterx`}},manage:{url:`${n}/manage`},pricing:{url:`${n}/pricing`},setup:{url:`${n}/setup`}},discord:{url:`${n}/discord`},github:{url:`${n}/github`,release:{url:`${n}/github/release`}}};function _(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(o=>o.charCodeAt(0));return v(t)}var h=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let o=8;o--;)t=t&1?3988292384^t>>>1:t>>>1;h[e]=t}function v(e){let t=-1;for(let o of e)t=t>>>8^h[t&255^o];return(t^-1)>>>0}async function s(e,t){let o=""+[+new Date,performance.now(),Math.random()],[a,f]=await new Promise(T=>{u.runtime.sendMessage([o,e,...t],T)});if(a===_(o))return f}function w(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var k=w(),r;function S(){return k(async()=>(r||(r=await s("settings::get",[])),r))}function x(e){r&&(r={...r,...e},y(r))}function c(){return r}function i(e){return new Promise(t=>setTimeout(t,e))}var $=[];function C(e,t){e.timedout=!1,$.push(e);let o,a=setInterval(async()=>{await B(e,c())||(clearTimeout(o),clearInterval(a))},400);t&&(o=setTimeout(()=>clearInterval(a),t),e.timedout=!0)}async function B(e,t){if(e.timedout)return!1;let o=e.condition(t);if(o===e.running())return!1;if(!o&&e.running())return e.quit(),!1;if(o&&!e.running()){for(;!e.ready();)await i(200);return e.start(),!1}}function y(e){$.forEach(t=>B(t,e))}function M(){u.runtime.connect({name:"stream"}).onMessage.addListener(t=>{t.event==="settingsUpdate"&&x(t.settings)})}function d(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}var p,m=!1;function P(){return!(!g()||!document.querySelector("[role=button]"))}function q(){m=!0,p=new MutationObserver(()=>{document.querySelector("[role=button]").dispatchEvent(new MouseEvent("mouseup"))}),p.observe(document.querySelector('[aria-label="Human challenge"], [aria-label="Press & Hold"]'),{attributes:!0,attributeFilter:["aria-label"]}),N()}function A(){m=!1,p.disconnect()}function H(){return m}function g(){try{return!!(window.top!==window&&window.top.top===window.top&&[...window.top.document.querySelectorAll("script")].some(e=>e.innerText.includes("_pxAppId"))&&document.querySelector('[aria-label="Human challenge"], [aria-label="Press & Hold"]'))}catch{return!1}}async function N(){let e=c();e.perimeterx_solve_delay&&await i(e.perimeterx_solve_delay_time),document.querySelector("[role=button]").dispatchEvent(new MouseEvent("mousedown"))}async function E(){let e=!1;for(let o=0;o<3;o++)if(await i(1e3),g()){e=!0;break}if(!e)return;M(),await S(),await s("tab::registerDetectedCaptcha",["perimeterx"]);let t=location.hostname;C({name:"perimeterx/auto-solve",condition:o=>o.enabled&&o.perimeterx_auto_solve&&!o.disabled_hosts.includes(t),ready:P,start:q,quit:A,running:H})}d(E);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/recaptcha.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/recaptcha.js new file mode 100644 index 0000000..93e41be --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/recaptcha.js @@ -0,0 +1,2 @@ +(()=>{function A(){if("ancestorOrigins"in location){let t=location.ancestorOrigins,n=t[1]??t[0];if(n)return n.split("/")[2]}let e=document.referrer;return e?e.split("/")[2]:location.origin}var b=chrome;var B="https://api.nopecha.com",r="https://www.nopecha.com",D="https://developers.nopecha.com",Me={doc:{url:D,automation:{url:`${D}/guides/extension_advanced/#automation-build`}},api:{url:B,recognition:{url:`${B}/recognition`},status:{url:`${B}/status`}},www:{url:r,annoucement:{url:`${r}/json/announcement.json`},demo:{url:`${r}/demo`,hcaptcha:{url:`${r}/demo/hcaptcha`},recaptcha:{url:`${r}/demo/recaptcha`},funcaptcha:{url:`${r}/demo/funcaptcha`},awscaptcha:{url:`${r}/demo/awscaptcha`},turnstile:{url:`${r}/demo/turnstile`},textcaptcha:{url:`${r}/demo/textcaptcha`},perimeterx:{url:`${r}/demo/perimeterx`}},manage:{url:`${r}/manage`},pricing:{url:`${r}/pricing`},setup:{url:`${r}/setup`}},discord:{url:`${r}/discord`},github:{url:`${r}/github`,release:{url:`${r}/github/release`}}};function O(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(n=>n.charCodeAt(0));return N(t)}var q=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let n=8;n--;)t=t&1?3988292384^t>>>1:t>>>1;q[e]=t}function N(e){let t=-1;for(let n of e)t=t>>>8^q[t&255^n];return(t^-1)>>>0}async function d(e,t){let n=""+[+new Date,performance.now(),Math.random()],[o,a]=await new Promise(i=>{b.runtime.sendMessage([n,e,...t],i)});if(o===O(n))return a}function y(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var de=y(),p;function V(){return de(async()=>(p||(p=await d("settings::get",[])),p))}function W(e){p&&(p={...p,...e},j(p))}function C(){return p}function l(e){return new Promise(t=>setTimeout(t,e))}var z=[];function E(e,t){e.timedout=!1,z.push(e);let n,o=setInterval(async()=>{await F(e,C())||(clearTimeout(n),clearInterval(o))},400);t&&(n=setTimeout(()=>clearInterval(o),t),e.timedout=!0)}async function F(e,t){if(e.timedout)return!1;let n=e.condition(t);if(n===e.running())return!1;if(!n&&e.running())return e.quit(),!1;if(n&&!e.running()){for(;!e.ready();)await l(200);return e.start(),!1}}function j(e){z.forEach(t=>F(t,e))}function U(){b.runtime.connect({name:"stream"}).onMessage.addListener(t=>{t.event==="settingsUpdate"&&W(t.settings)})}function $(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}var Xe=y();function J(e){postMessage({source:"nopecha",...e})}function _(e){J(e)}var T,L,H=!1;function Q(){return!!document.querySelector(".recaptcha-checkbox")}function Y(){H=!0,T=new MutationObserver(t=>{t.length===2&&X(),t.length&&t[0].target.classList.contains("recaptcha-checkbox-expired")&&window.location.reload()}),T.observe(document.querySelector(".recaptcha-checkbox"),{attributes:!0});let e=!1;L=new IntersectionObserver(()=>{e||(e=!0,X())},{threshold:0}),L.observe(document.body)}function G(){T.disconnect(),L.disconnect(),H=!1}function K(){return H}async function X(){await l(400),_({action:"click",selector:".recaptcha-checkbox"})}function ge(e,t){let n=document.createElement("canvas");return n.width=e,n.height=t,n}function Z(e){return e.toDataURL("image/jpeg").replace(/data:image\/[a-z]+;base64,/g,"")}function pe(e){try{e.getContext("2d").getImageData(0,0,1,1)}catch{return!0}return!1}async function ee(e,t,n=1e4){if(!t&&!e.complete&&!await new Promise(u=>{let c=setTimeout(()=>{u(!1)},n);e.addEventListener("load",()=>{clearTimeout(c),u(!0)})}))return;let o=ge(e.naturalWidth||t?.clientWidth,e.naturalHeight||t?.clientHeight);return o.getContext("2d").drawImage(e,0,0),!pe(o)&&o}function fe(e,t,n,o){let a=(o*t+n)*4;return[e[a],e[a+1],e[a+2]]}function he(e,t){return e.every(n=>n<=t)}function be(e,t){return e.every(n=>n>=t)}function te(e,t=0,n=230,o=.99){let a=e.getContext("2d"),i=a.canvas.width,u=a.canvas.height;if(i===0||u===0)return!0;let c=a.getImageData(0,0,i,u).data,m=0;for(let v=0;vo}function ne(){return[]}function oe(e){return new Promise(t=>{e.push(t)})}function k(e){e.forEach(t=>t()),e.splice(0)}async function ae(e,t){let n={v:b.runtime.getManifest().version,key:_e(e)};return n.url=await d("tab::getURL",[]),n}function _e(e){return!e.keys||!e.keys.length?e.key:e.keys[Math.floor(Math.random()*e.keys.length)]}var ve,S=ne(),R,w=!1;function ie(){return!!document.querySelector(".rc-imageselect, .rc-imageselect-target")}function ce(){w=!0,k(S);let e;R=new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>k(S),200)}),R.observe(document.body,{childList:!0,subtree:!0}),ke()}function se(){R.disconnect(),w=!1,k(S)}function le(){return w}function we(){return document.querySelector(".rc-doscaptcha-header")}function xe(){let e=document.querySelector("#recaptcha-verify-button");return e&&e.getAttribute("disabled")}var ye={[1]:1,[0]:3,[2]:4};async function Ce(){for(;;){await l(1e3);let e=document.querySelector(".rc-imageselect-instructions");if(!e)continue;let t=e.innerText.split(` +`),n=t.slice(0,2).join(" ").replace(/\s+/g," ").trim(),o=[...document.querySelectorAll("table tr td")];if(o.length!==9&&o.length!==16)continue;let a=o.map(c=>c.querySelector("img")).filter(c=>c).filter(c=>c.src.trim());if(a.length!==9&&a.length!==16)continue;let i=o.length===16?2:a.some(c=>c.classList.contains("rc-image-tile-11"))?1:0,u=t.length===3&&i!==2;return{task:n,type:i,cells:o,images:a,waitAfterSolve:u}}}var re=!1;async function ke(){if(!re){for(re=!0;w&&(we()||xe());)await l(1e3);for(;w;){let{task:e,type:t,cells:n,images:o,waitAfterSolve:a}=await Ce(),i=C(),u=new Date().valueOf(),c=[...n];t!==1&&(o=[o[0]]);let m=await Promise.all(o.map(s=>ee(s)));if(t===1){let s=[],x=[];for(let[M,h]of m.entries())h.width!==100||h.height!==100||(s.push(c[M]),x.push(h));c=s,m=x}if(m.length===0){_({action:"click",selector:"#recaptcha-verify-button"}),await l(3e3);continue}let I=!1;for(let s of m)if(te(s)){I=!0;break}if(I){await l(3e3);continue}let v=m.map(Z),f=ye[t],g=await d("api::recognition",[{type:"recaptcha",task:e,image_data:v,grid:[f,f].join("x"),...await ae(i)}]);if(!g||"error"in g){console.warn(`[@nope/recaptcha/${ve}]`,"api error",g),await l(2e3);continue}let ue=new Date().valueOf();if(i.recaptcha_solve_delay){let s=i.recaptcha_solve_delay_time-ue+u;s>0&&await l(s)}let P=t===2?4:3;for(c.forEach((s,x)=>{let M=s.classList.contains("rc-imageselect-tileselected"),h=n.indexOf(s);g.data[x]!==M&&_({action:"click",selector:`tr:nth-child(${Math.floor(h/P)+1}) td:nth-child(${h%P+1})`})}),(!a||!g.data.some(s=>s))&&(await l(200),_({action:"click",selector:"#recaptcha-verify-button"})),await oe(S);document.querySelectorAll(".rc-imageselect-dynamic-selected").length>0;)await l(1e3)}}}async function Se(){U(),await V(),await d("tab::registerDetectedCaptcha",["recaptcha"]);let e=A();location.pathname.endsWith("/anchor")?E({name:"recaptcha/auto-open",condition:t=>t.enabled&&t.recaptcha_auto_open&&!t.disabled_hosts.includes(e),ready:Q,start:Y,quit:G,running:K}):E({name:"recaptcha/auto-solve",condition:t=>t.enabled&&t.recaptcha_auto_solve&&!t.disabled_hosts.includes(e),ready:ie,start:ce,quit:se,running:le})}$(Se);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/textcaptcha.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/textcaptcha.js new file mode 100644 index 0000000..89c19bd --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/textcaptcha.js @@ -0,0 +1 @@ +(()=>{var p=chrome;var y="https://api.nopecha.com",i="https://www.nopecha.com",B="https://developers.nopecha.com",ie={doc:{url:B,automation:{url:`${B}/guides/extension_advanced/#automation-build`}},api:{url:y,recognition:{url:`${y}/recognition`},status:{url:`${y}/status`}},www:{url:i,annoucement:{url:`${i}/json/announcement.json`},demo:{url:`${i}/demo`,hcaptcha:{url:`${i}/demo/hcaptcha`},recaptcha:{url:`${i}/demo/recaptcha`},funcaptcha:{url:`${i}/demo/funcaptcha`},awscaptcha:{url:`${i}/demo/awscaptcha`},turnstile:{url:`${i}/demo/turnstile`},textcaptcha:{url:`${i}/demo/textcaptcha`},perimeterx:{url:`${i}/demo/perimeterx`}},manage:{url:`${i}/manage`},pricing:{url:`${i}/pricing`},setup:{url:`${i}/setup`}},discord:{url:`${i}/discord`},github:{url:`${i}/github`,release:{url:`${i}/github/release`}}};function M(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(n=>n.charCodeAt(0));return I(t)}var T=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let n=8;n--;)t=t&1?3988292384^t>>>1:t>>>1;T[e]=t}function I(e){let t=-1;for(let n of e)t=t>>>8^T[t&255^n];return(t^-1)>>>0}async function g(e,t){let n=""+[+new Date,performance.now(),Math.random()],[a,o]=await new Promise(s=>{p.runtime.sendMessage([n,e,...t],s)});if(a===M(n))return o}function H(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var G=H(),m;function $(){return G(async()=>(m||(m=await g("settings::get",[])),m))}function E(e){m&&(m={...m,...e},L(m))}function f(){return m}function r(e){return new Promise(t=>setTimeout(t,e))}var P=[];function D(e,t){e.timedout=!1,P.push(e);let n,a=setInterval(async()=>{await R(e,f())||(clearTimeout(n),clearInterval(a))},400);t&&(n=setTimeout(()=>clearInterval(a),t),e.timedout=!0)}async function R(e,t){if(e.timedout)return!1;let n=e.condition(t);if(n===e.running())return!1;if(!n&&e.running())return e.quit(),!1;if(n&&!e.running()){for(;!e.ready();)await r(200);return e.start(),!1}}function L(e){P.forEach(t=>R(t,e))}function A(){p.runtime.connect({name:"stream"}).onMessage.addListener(t=>{t.event==="settingsUpdate"&&E(t.settings)})}function C(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}function J(e,t){let n=document.createElement("canvas");return n.width=e,n.height=t,n}function q(e){return e.toDataURL("image/jpeg").replace(/data:image\/[a-z]+;base64,/g,"")}function X(e){try{e.getContext("2d").getImageData(0,0,1,1)}catch{return!0}return!1}async function h(e,t,n=1e4){if(!t&&!e.complete&&!await new Promise(c=>{let u=setTimeout(()=>{c(!1)},n);e.addEventListener("load",()=>{clearTimeout(u),c(!0)})}))return;let a=J(e.naturalWidth||t?.clientWidth,e.naturalHeight||t?.clientHeight);return a.getContext("2d").drawImage(e,0,0),!X(a)&&a}async function N(e){let n=getComputedStyle(e).backgroundImage;if(!n||n==="none")if("src"in e&&e.src)n=`url("${e.src}")`;else return;if("computedStyleMap"in e){let d=e.computedStyleMap().get("background-image");if(d instanceof CSSImageValue){let l=await h(d,e);if(l)return l}}let a=/"(.+)"/.exec(n);if(!a)return;n=a[1];let o=document.createElement("a");if(o.href=n,new URL(o.href).origin===document.location.origin){let d=new Image;d.crossOrigin="anonymous",d.src=n;let l=await h(d);if(l)return l}let s=await g("fetch::asData",[n,{}]),c=new Image;c.crossOrigin="anonymous",c.src=s.data;let u=await h(c);if(u)return u}function Y(e,t,n,a){let o=(a*t+n)*4;return[e[o],e[o+1],e[o+2]]}function Z(e,t){return e.every(n=>n<=t)}function ee(e,t){return e.every(n=>n>=t)}function U(e,t=0,n=230,a=.99){let o=e.getContext("2d"),s=o.canvas.width,c=o.canvas.height;if(s===0||c===0)return!0;let u=o.getImageData(0,0,s,c).data,d=0;for(let x=0;xa}function W(){return[]}function z(e){return new Promise(t=>{e.push(t)})}function b(e){e.forEach(t=>t()),e.splice(0)}async function O(e,t){let n={v:p.runtime.getManifest().version,key:te(e)};return n.url=await g("tab::getURL",[]),n}function te(e){return!e.keys||!e.keys.length?e.key:e.keys[Math.floor(Math.random()*e.keys.length)]}var v=W(),S,_=!1;function j(){let e=f(),t=document.querySelector(e.textcaptcha_image_selector),n=document.querySelector(e.textcaptcha_input_selector);return!t||!n?!1:(g("tab::registerDetectedCaptcha",["textcaptcha"]),!0)}function K(){_=!0,b(v),S=new MutationObserver(async()=>{setTimeout(()=>b(v),200)}),S.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),ae()}function V(){S.disconnect(),_=!1,b(v)}function Q(){return _}async function ne(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLImageElement&&(e.src||e.srcset)){let t=await h(e);if(t)return t}return await N(e)}var F=!1;async function ae(){if(F)return;F=!0;let e;for(;_;){let t=f(),n=document.querySelector(t.textcaptcha_image_selector),a=document.querySelector(t.textcaptcha_input_selector);if(!n){await r(500);continue}if(!a){await r(500);continue}if(a.click(),a.focus(),await r(200),a.value!==""){await r(500);continue}let o=await ne(n);if(!o){await r(500);continue}if(U(o)){await r(500);continue}let s=q(o);if(e===s){await r(500);continue}e=s;let c=new Date().valueOf(),u=await g("api::recognition",[{type:"textcaptcha",image_data:[s],...await O(t)}]);if(!u||"error"in u){console.warn("[@nope/textcaptcha] api error",u),await r(2e3);continue}let d=new Date().valueOf();if(t.textcaptcha_solve_delay){let l=t.textcaptcha_solve_delay_time-d+c;l>0&&await r(l)}if(u.data&&u.data.length>0&&!a.value){a.click(),a.focus(),await r(200),a.value=u.data[0];for(let l of u.data[0])a.dispatchEvent(new KeyboardEvent("keydown",{key:l})),await r(50),a.dispatchEvent(new KeyboardEvent("keypress",{key:l})),await r(50),a.dispatchEvent(new KeyboardEvent("keyup",{key:l})),await r(50)}await z(v)}}async function oe(){A(),await $(),await g("tab::registerDetectedCaptcha",["textcaptcha"]);let e=location.hostname;D({name:"textcaptcha/auto-solve",condition:t=>t.enabled&&t.textcaptcha_auto_solve&&!t.disabled_hosts.includes(e)&&!!t.textcaptcha_image_selector&&!!t.textcaptcha_input_selector,ready:j,start:K,quit:V,running:Q})}C(oe);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/turnstile.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/turnstile.js new file mode 100644 index 0000000..c0b5f64 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/captcha/turnstile.js @@ -0,0 +1 @@ +(()=>{var i=chrome;var d="https://api.nopecha.com",n="https://www.nopecha.com",b="https://developers.nopecha.com",R={doc:{url:b,automation:{url:`${b}/guides/extension_advanced/#automation-build`}},api:{url:d,recognition:{url:`${d}/recognition`},status:{url:`${d}/status`}},www:{url:n,annoucement:{url:`${n}/json/announcement.json`},demo:{url:`${n}/demo`,hcaptcha:{url:`${n}/demo/hcaptcha`},recaptcha:{url:`${n}/demo/recaptcha`},funcaptcha:{url:`${n}/demo/funcaptcha`},awscaptcha:{url:`${n}/demo/awscaptcha`},turnstile:{url:`${n}/demo/turnstile`},textcaptcha:{url:`${n}/demo/textcaptcha`},perimeterx:{url:`${n}/demo/perimeterx`}},manage:{url:`${n}/manage`},pricing:{url:`${n}/pricing`},setup:{url:`${n}/setup`}},discord:{url:`${n}/discord`},github:{url:`${n}/github`,release:{url:`${n}/github/release`}}};function h(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(o=>o.charCodeAt(0));return _(t)}var v=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let o=8;o--;)t=t&1?3988292384^t>>>1:t>>>1;v[e]=t}function _(e){let t=-1;for(let o of e)t=t>>>8^v[t&255^o];return(t^-1)>>>0}async function s(e,t){let o=""+[+new Date,performance.now(),Math.random()],[a,g]=await new Promise(N=>{i.runtime.sendMessage([o,e,...t],N)});if(a===h(o))return g}function y(){let e;return t=>e||(e=t().finally(()=>e=void 0),e)}var V=y(),r;function w(){return V(async()=>(r||(r=await s("settings::get",[])),r))}function x(e){r&&(r={...r,...e},S(r))}function c(){return r}function u(e){return new Promise(t=>setTimeout(t,e))}var C=[];function k(e,t){e.timedout=!1,C.push(e);let o,a=setInterval(async()=>{await M(e,c())||(clearTimeout(o),clearInterval(a))},400);t&&(o=setTimeout(()=>clearInterval(a),t),e.timedout=!0)}async function M(e,t){if(e.timedout)return!1;let o=e.condition(t);if(o===e.running())return!1;if(!o&&e.running())return e.quit(),!1;if(o&&!e.running()){for(;!e.ready();)await u(200);return e.start(),!1}}function S(e){C.forEach(t=>M(t,e))}function E(){i.runtime.connect({name:"stream"}).onMessage.addListener(t=>{t.event==="settingsUpdate"&&x(t.settings)})}function l(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}function $(e){postMessage({source:"nopecha",...e})}function B(e){$(e)}var p,f=!1;function L(){return!!document.querySelector("#challenge-stage")}function P(){f=!0,p=new MutationObserver(e=>{e[0].addedNodes.length>0&&H()}),p.observe(document.querySelector("#challenge-stage"),{childList:!0}),document.querySelector("#challenge-stage .ctp-checkbox-container")&&H()}function T(){p.disconnect(),f=!1}function q(){return f}var m=!1;async function H(){if(m)return;m=!0;let e=c();e.turnstile_solve_delay&&await u(e.turnstile_solve_delay_time),B({action:"click",selector:"input[type=checkbox], #cf-stage area"}),m=!1}async function O(){E(),await w(),await s("tab::registerDetectedCaptcha",["turnstile"]);let e=location.hostname;k({name:"turnstile/auto-solve",condition:t=>t.enabled&&t.turnstile_auto_solve&&!t.disabled_hosts.includes(e),ready:L,start:P,quit:T,running:q})}l(O);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/eventhook.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/eventhook.js new file mode 100644 index 0000000..8c06d32 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/eventhook.js @@ -0,0 +1 @@ +(()=>{function o(e){postMessage({source:"nopecha",...e})}function l(e){o(e)}})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/eventhook/loader.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/eventhook/loader.js new file mode 100644 index 0000000..e6f3701 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/eventhook/loader.js @@ -0,0 +1 @@ +(()=>{function g(){let i=new WeakMap,m=50+Math.floor(Math.random()*1e3),d=50+Math.floor(Math.random()*2e3);function y(e,n,t,r){return{x:e,y:n,clientX:e,clientY:n,layerX:e,layerY:n,offsetX:e-1,offsetY:n-1,pageX:e,pageY:n,screenX:t+e,screenY:r+n}}function w(e,n){i.get(e).filter(([r])=>r===n.type).forEach(([r,o])=>{o(n)})}let b={click:({selector:e,offset:n,screenOffset:t,events:r})=>{let o=document.querySelector(e);if(!o||!i.has(o))return;let a=o.getBoundingClientRect(),u=n?n[0]:Math.floor(Math.random()*a.width),s=n?n[1]:Math.floor(Math.random()*a.height),p=t?t[0]:m,c=t?t[1]:d,l=r??["click"];for(let f of l){let M=h("PointerEvent",f,{...y(u,s,p,c),composed:!0,pointerId:1,pointerType:"mouse",srcElement:o,target:o},{target:o});w(o,M)}},mousedata:({data:e,timeOffset:n})=>{let t=Date.now,r=0;Date.now=()=>r;let o=[["mm","mousemove"],["md","mousedown"],["mu","mouseup"]],a=document.body;o.forEach(([u,s])=>{e[u].forEach(([p,c,l])=>{let f=h("MouseEvent",s,{...y(p,c,0,0),composed:!0,pointerId:1,pointerType:"mouse",srcElement:a,target:a},{target:a,timestamp:n+l-performance.timeOrigin});r=Math.floor(n+l),w(a,f)})}),Date.now=t}};function h(e,n,t,r){{let o=new window[e](n,t),a={get(u,s,p){if(s==="isTrusted")return!0;if(s in r)return r[s];let c=o[s];return c instanceof Function?c.bind(o):c}};return new Proxy(o,a)}}function v(e){typeof e=="string"&&(e=JSON.parse(e)),b[e.action](e)}function k(e,n){i.has(e)||i.set(e,[]),i.get(e).push(n)}{let e=Element.prototype;e.addEventListener=new Proxy(e.addEventListener,{apply(n,t,r){return k(t,r),n.apply(t,r)}})}return v}function E(){let i=g();addEventListener("message",m=>{let d=m.data;typeof d!="object"||d.source!=="nopecha"||(m.stopImmediatePropagation(),i(d))})}E();})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/128.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/128.png new file mode 100644 index 0000000..6b3469a Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/128.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/128g.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/128g.png new file mode 100644 index 0000000..449a08d Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/128g.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/16.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/16.png new file mode 100644 index 0000000..39b0214 Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/16.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/16g.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/16g.png new file mode 100644 index 0000000..9cfab26 Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/16g.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/32.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/32.png new file mode 100644 index 0000000..cc85599 Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/32.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/32g.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/32g.png new file mode 100644 index 0000000..a3194ed Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/32g.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/48.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/48.png new file mode 100644 index 0000000..43e88dd Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/48.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/48g.png b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/48g.png new file mode 100644 index 0000000..ae5f142 Binary files /dev/null and b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/icon/48g.png differ diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/locate.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/locate.js new file mode 100644 index 0000000..5ef42f5 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/locate.js @@ -0,0 +1,76 @@ +(()=>{var g=chrome;var b="https://api.nopecha.com",d="https://www.nopecha.com",C="https://developers.nopecha.com",R={doc:{url:C,automation:{url:`${C}/guides/extension_advanced/#automation-build`}},api:{url:b,recognition:{url:`${b}/recognition`},status:{url:`${b}/status`}},www:{url:d,annoucement:{url:`${d}/json/announcement.json`},demo:{url:`${d}/demo`,hcaptcha:{url:`${d}/demo/hcaptcha`},recaptcha:{url:`${d}/demo/recaptcha`},funcaptcha:{url:`${d}/demo/funcaptcha`},awscaptcha:{url:`${d}/demo/awscaptcha`},turnstile:{url:`${d}/demo/turnstile`},textcaptcha:{url:`${d}/demo/textcaptcha`},perimeterx:{url:`${d}/demo/perimeterx`}},manage:{url:`${d}/manage`},pricing:{url:`${d}/pricing`},setup:{url:`${d}/setup`}},discord:{url:`${d}/discord`},github:{url:`${d}/github`,release:{url:`${d}/github/release`}}};function v(i){let r=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+i).split("").map(a=>a.charCodeAt(0));return P(r)}var N=new Uint32Array(256);for(let i=256;i--;){let r=i;for(let a=8;a--;)r=r&1?3988292384^r>>>1:r>>>1;N[i]=r}function P(i){let r=-1;for(let a of i)r=r>>>8^N[r&255^a];return(r^-1)>>>0}async function l(i,r){let a=""+[+new Date,performance.now(),Math.random()],[_,c]=await new Promise(u=>{g.runtime.sendMessage([a,i,...r],u)});if(_===v(a))return c}function k(){let i;return r=>i||(i=r().finally(()=>i=void 0),i)}var ee=k();function L(i){g.runtime.connect({name:"broadcast"}).onMessage.addListener(a=>{a.event==="broadcast"&&i(a.data)})}function $(i){if(document.readyState!=="loading")setTimeout(i,0);else{let r;r=()=>{removeEventListener("DOMContentLoaded",r),i()},addEventListener("DOMContentLoaded",r)}}(()=>{if("__nopecha_locate"in window)return;window.__nopecha_locate=!0;function i(){try{return window.self!==window.top}catch{return!0}}class r{constructor(e,n=!1){this.NAMESPACE="__NOPECHA__",this.MARK_RADIUS=5,this.window_id=Math.random().toString(36).slice(2),this.locate=e,this.draw_mark=n,this.update_timer,this.css_selector,this.$last,this.initialize_style(),this.initialize_elements()}initialize_style(){let e=[`#${this.NAMESPACE}_wrapper { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: transparent; + pointer-events: none; + z-index: 10000000; + }`,`.${this.NAMESPACE}_textbox { + display: flex; + flex-direction: row; + flex-wrap: wrap; + + position: absolute; + left: 0; + right: 0; + + background-color: #222; + color: #fff; + font: normal 12px/12px Helvetica, sans-serif; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); + border: 1px solid #fff; + overflow: hidden; + }`,`.${this.NAMESPACE}_textbox.${this.NAMESPACE}_header { + top: 0; + }`,`.${this.NAMESPACE}_textbox.${this.NAMESPACE}_header > div { + padding: 4px 8px; + }`,`.${this.NAMESPACE}_textbox.${this.NAMESPACE}_header > div:first-child { + flex-grow: 1; + }`,`.${this.NAMESPACE}_textbox.${this.NAMESPACE}_footer { + bottom: 0; + }`,`.${this.NAMESPACE}_textbox.${this.NAMESPACE}_footer > div { + padding: 4px 8px; + }`,`.${this.NAMESPACE}_textbox.${this.NAMESPACE}_footer > div:first-child { + flex-grow: 1; + }`,`.${this.NAMESPACE}_highlight { + position: absolute; + opacity: 0.2; + }`,`.${this.NAMESPACE}_highlight.${this.NAMESPACE}_margin { + background-color: rgba(230, 165, 18, 127); + }`,`.${this.NAMESPACE}_highlight.${this.NAMESPACE}_border { + background-color: rgba(255, 204, 121, 127); + }`,`.${this.NAMESPACE}_highlight.${this.NAMESPACE}_padding { + background-color: rgba(50, 255, 50, 127); + }`,`.${this.NAMESPACE}_highlight.${this.NAMESPACE}_content { + background-color: rgba(0, 153, 201, 127); + }`,`.${this.NAMESPACE}_mark { + position: absolute; + top: 0; + left: 0; + right: 0; + + width: ${this.MARK_RADIUS*2}px; + height: ${this.MARK_RADIUS*2}px; + background-color: #f44; + border-radius: 50%; + z-index: 2; + }`];i()||e.push(`.${this.NAMESPACE}_shadow { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(255, 255, 255, 0.1); + pointer-events: none; + z-index: 1; + }`),this.$style=document.createElement("style"),this.$style.type="text/css","styleSheet"in this.$style&&typeof this.$style.styleSheet=="object"&&"cssText"in this.$style.styleSheet?this.$style.styleSheet.cssText=e.join(` +`):this.$style.innerHTML=e.join(` +`),document.getElementsByTagName("head")[0].appendChild(this.$style)}initialize_elements(){if(this.$wrapper=document.createElement("div"),this.$wrapper.id=`${this.NAMESPACE}_wrapper`,document.body.append(this.$wrapper),this.$shadow=document.createElement("div"),this.$shadow.classList.add(`${this.NAMESPACE}_shadow`),this.$wrapper.append(this.$shadow),this.$margin_box=document.createElement("div"),this.$margin_box.classList.add(`${this.NAMESPACE}_highlight`,`${this.NAMESPACE}_margin`),this.$wrapper.append(this.$margin_box),this.$border_box=document.createElement("div"),this.$border_box.classList.add(`${this.NAMESPACE}_highlight`,`${this.NAMESPACE}_border`),this.$wrapper.append(this.$border_box),this.$padding_box=document.createElement("div"),this.$padding_box.classList.add(`${this.NAMESPACE}_highlight`,`${this.NAMESPACE}_padding`),this.$wrapper.append(this.$padding_box),this.$content_box=document.createElement("div"),this.$content_box.classList.add(`${this.NAMESPACE}_highlight`,`${this.NAMESPACE}_content`),this.$wrapper.append(this.$content_box),!i()){this.$header=document.createElement("div"),this.$header.classList.add(`${this.NAMESPACE}_textbox`,`${this.NAMESPACE}_header`);let e=this.locate==="textcaptcha_image_selector"?"Image":"Input";this.$header.innerHTML=` +
+
Click on the CAPTCHA ${e} element to generate a CSS selector.
+
Press ESC to cancel.
+
+
NopeCHA
+ `,this.$wrapper.append(this.$header),this.$footer=document.createElement("div"),this.$footer.classList.add(`${this.NAMESPACE}_textbox`,`${this.NAMESPACE}_footer`),this.$wrapper.append(this.$footer)}this.draw_mark&&(this.$mark=document.createElement("div"),this.$mark.classList.add(`${this.NAMESPACE}_mark`),this.$wrapper.append(this.$mark))}clip(e){let n={top:Math.max(0,e.top),left:Math.max(0,e.left),width:e.width+e.left>window.innerWidth?window.innerWidth-e.left:e.width,height:e.height+e.top>window.innerHeight?window.innerHeight-e.top:e.height};return e.top<0&&(n.height+=e.top),e.left<0&&(n.width+=e.left),n.width<0&&(n.width=0),n.height<0&&(n.height=0),n}computed_style(e,n){let s=window.getComputedStyle(e).getPropertyValue(n).match(/[\-]?[\d\.]+px/g);for(let p in s)s[p]=parseFloat(s[p].replace("px",""));return s.length===1&&s.push(s[0],s[0],s[0]),s.length===2&&s.push(s[0],s[1]),s.length===3&&s.push(s[1]),s}add_dim(e,n){for(let t of n)e.top-=t[0],e.left-=t[3],e.width+=t[1]+t[3],e.height+=t[0]+t[2];return e}sub_dim(e,n){for(let t of n)e.top+=t[0],e.left+=t[3],e.width-=t[1]+t[3],e.height-=t[0]+t[2];return e}set_dim(e,n){let t=this.clip(n);e.style.top=`${t.top}px`,e.style.left=`${t.left}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`}get_center(e){let n=e.getBoundingClientRect();return{x:n.left+n.width/2,y:n.top+n.height/2}}get_css(e){if("CssSelectorGenerator"in window&&typeof window.CssSelectorGenerator=="object"&&"getCssSelector"in window.CssSelectorGenerator&&typeof window.CssSelectorGenerator.getCssSelector=="function")try{return window.CssSelectorGenerator.getCssSelector(e)}catch{}else throw new Error("selector lib not found")}clear(){this.$t=null;let e={top:0,left:0,width:0,height:0};this.set_dim(this.$margin_box,e),this.set_dim(this.$border_box,e),this.set_dim(this.$padding_box,e),this.set_dim(this.$content_box,e),this.draw_mark&&(this.$mark.style.top="0px",this.$mark.style.left="0px")}update(e=null,n=10){let t=this;t.$last&&t.$last===e||(e&&(t.$t=e),t.$t&&(clearTimeout(t.update_timer),t.update_timer=setTimeout(()=>{if(!t.$t?.getBoundingClientRect)return;let s=t.$t.getBoundingClientRect(),p=t.computed_style(t.$t,"margin"),E=t.computed_style(t.$t,"border-width"),B=t.computed_style(t.$t,"padding"),m={top:s.top,left:s.left,width:s.width,height:s.height},A=JSON.parse(JSON.stringify(m)),D=JSON.parse(JSON.stringify(m)),x=JSON.parse(JSON.stringify(m)),S=JSON.parse(JSON.stringify(m));t.add_dim(A,[p]),t.sub_dim(x,[E]),t.sub_dim(S,[E,B]),t.set_dim(t.$margin_box,A),t.set_dim(t.$border_box,D),t.set_dim(t.$padding_box,x),t.set_dim(t.$content_box,S);let y=t.get_css(t.$t);if(t.update_css_selector(t.window_id,y),l("tab::broadcast",[{action:"update_locate",window_id:t.window_id,css_selector:y}]),t.draw_mark){let M=t.get_center(e);t.$mark.style.top=`${Math.floor(M.y-t.MARK_RADIUS)}px`,t.$mark.style.left=`${Math.floor(M.x-t.MARK_RADIUS)}px`}},n)))}update_css_selector(e,n){this.window_id!==e&&this.clear(),i()||(this.$footer.innerHTML=`
${n}
`)}terminate(){clearTimeout(this.update_timer),this.$style.remove(),this.$wrapper.remove()}}let a=null;function _(o,e){l("settings::update",[{[o]:e}]),h(!0)}function c(o){o.preventDefault(),o.stopPropagation();let e=o.target,n=a.get_css(e);_(a.locate,n)}function u(o){let e=o.target;a.update(e)}function f(){a.update()}function w(o){o=o||window.event;let e=!1;if("key"in o?e=o.key==="Escape"||o.key==="Esc":"keyCode"in o&&(e=o.keyCode===27),e){h(!0);return}}function T(o){a=new r(o),document.body.addEventListener("mousedown",c),document.body.addEventListener("mouseup",c),document.body.addEventListener("click",c),document.body.addEventListener("mousemove",u),document.body.addEventListener("mousewheel",f),document.body.addEventListener("keydown",w)}function h(o){try{document.body.removeEventListener("mousedown",c),document.body.removeEventListener("mouseup",c),document.body.removeEventListener("click",c),document.body.removeEventListener("mousemove",u),document.body.removeEventListener("mousewheel",f),document.body.removeEventListener("keydown",w),a.terminate(),a=null}catch{}o&&l("tab::broadcast",[{action:"stop_locate"}])}async function H(){L(o=>{o.action==="start_locate"?(h(!1),T(o.locate)):o.action==="stop_locate"?h(!1):o.action==="update_locate"&&a.update_css_selector(o.window_id,o.css_selector)})}$(H)})();})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/manifest.json b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/manifest.json new file mode 100644 index 0000000..300c965 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/manifest.json @@ -0,0 +1,3 @@ +{ +"update_url": "https://clients2.google.com/service/update2/crx", +"name":"NopeCHA: CAPTCHA Solver","version":"0.4.9","description":"Automatically solve reCAPTCHA, hCaptcha, FunCAPTCHA, AWS WAF, and text CAPTCHA using AI.","content_scripts":[{"matches":["*://*.hcaptcha.com/captcha/*"],"js":["eventhook.js","captcha/hcaptcha.js"],"run_at":"document_start","all_frames":true},{"matches":["*://*.google.com/recaptcha/*","*://*.recaptcha.net/recaptcha/*"],"js":["eventhook.js","captcha/recaptcha.js"],"run_at":"document_start","all_frames":true},{"matches":["*://*.arkoselabs.com/fc/*","*://*.funcaptcha.com/fc/*","*://*/fc/assets/*"],"js":["captcha/funcaptcha.js"],"run_at":"document_end","all_frames":true},{"matches":["*://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/*","*://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/turnstile/if/ov2/av0/*"],"js":["eventhook.js","captcha/turnstile.js"],"run_at":"document_start","all_frames":true},{"matches":["*://nopecha.com/setup"],"js":["pages/setup.js"],"run_at":"document_end","all_frames":false},{"matches":["*://nopecha.com/integrate"],"js":["pages/integrate.js"],"run_at":"document_end","all_frames":true},{"matches":["*://nopecha.com/demo/funcaptcha"],"js":["pages/funcaptcha-demo.js"],"run_at":"document_end","all_frames":false},{"matches":[""],"js":["captcha/awscaptcha.js","captcha/textcaptcha.js","captcha/perimeterx.js"],"run_at":"document_end","match_about_blank":true,"all_frames":true}],"icons":{"16":"icon/16.png","32":"icon/32.png","48":"icon/48.png","128":"icon/128.png"},"manifest_version":3,"permissions":["declarativeNetRequest","storage","scripting"],"background":{"service_worker":"background.js","type":"module"},"action":{"default_title":"NopeCHA: CAPTCHA Solver","default_icon":"icon/16.png","default_popup":"popup.html"},"host_permissions":[""],"key":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlWiyXSK0GK0nDwOfOJ2zUvRv99E2XU6LnR67zKE5RjM2icff7Cwmo6nR5i+4UukShIyEaDdQsbC+vyTpDeaJMn+bNphPYjQxGY6spIk3KV1h71Jj0dSUOYUwGrViKg3LnC4LKtENYOsbIxTmMw8JG4oH1hU1tY4KlnSzcqiwTaDLTP0X7MVdDK0WPOyypNlkL7v1HWMjPZa32EudqcrWub/EMpMFuSugTyIu8dHaAQhW13RkU77BiMRoZfZYxbcED48YPmZS8qi3KOrymjOTWCJeDMjwy/MLCqrwhjoG1Y5jDXHFbxNUPxEJYw9mxxPTN+asraML9tywlLuzZluHwwIDAQAB","minimum_chrome_version":"100.0","version_name":"v0.4.9"} \ No newline at end of file diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/funcaptcha-demo.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/funcaptcha-demo.js new file mode 100644 index 0000000..90a8737 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/funcaptcha-demo.js @@ -0,0 +1 @@ +(()=>{var I,l,re,Ie,A,ee,ie,j,We,U={},ae=[],Re=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,q=Array.isArray;function x(e,t){for(var n in t)e[n]=t[n];return e}function se(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,n){var r,i,o,u={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:u[o]=t[o];if(arguments.length>2&&(u.children=arguments.length>3?I.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)u[o]===void 0&&(u[o]=e.defaultProps[o]);return B(e,u,r,i,null)}function B(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++re};return i==null&&l.vnode!=null&&l.vnode(o),o}function W(e){return e.children}function $(e,t){this.props=e,this.context=t}function w(e,t){if(t==null)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&A.sort(j));N.__r=0}function le(e,t,n,r,i,o,u,p,f,d){var _,h,s,a,c,E,v,g=r&&r.__k||ae,C=g.length;for(n.__k=[],_=0;_0?B(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a)!=null){if(a.__=n,a.__b=n.__b+1,(s=g[_])===null||s&&a.key==s.key&&a.type===s.type)g[_]=void 0;else for(h=0;h=0;t--)if((n=e.__k[t])&&(r=pe(n)))return r}return null}function Me(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||T(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||T(e,o,t[o],n[o],r)}function ne(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Re.test(t)?n:n+"px"}function T(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ne(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ne(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?oe:_e,o):e.removeEventListener(t,o?oe:_e,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function _e(e){return this.l[e.type+!1](l.event?l.event(e):e)}function oe(e){return this.l[e.type+!0](l.event?l.event(e):e)}function O(e,t,n,r,i,o,u,p,f){var d,_,h,s,a,c,E,v,g,C,D,S,Z,P,V,k=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(f=n.__h,p=t.__e=n.__e,t.__h=null,o=[p]),(d=l.__b)&&d(t);try{e:if(typeof k=="function"){if(v=t.props,g=(d=k.contextType)&&r[d.__c],C=d?g?g.props.value:d.__:r,n.__c?E=(_=t.__c=n.__c).__=_.__E:("prototype"in k&&k.prototype.render?t.__c=_=new k(v,C):(t.__c=_=new $(v,C),_.constructor=k,_.render=Ve),g&&g.sub(_),_.props=v,_.state||(_.state={}),_.context=C,_.__n=r,h=_.__d=!0,_.__h=[],_._sb=[]),_.__s==null&&(_.__s=_.state),k.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=x({},_.__s)),x(_.__s,k.getDerivedStateFromProps(v,_.__s))),s=_.props,a=_.state,_.__v=t,h)k.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(k.getDerivedStateFromProps==null&&v!==s&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(v,C),!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(v,_.__s,C)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(_.props=v,_.state=_.__s,_.__d=!1),_.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(H){H&&(H.__=t)}),D=0;D<_._sb.length;D++)_.__h.push(_._sb[D]);_._sb=[],_.__h.length&&u.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(v,_.__s,C),_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(s,a,c)})}if(_.context=C,_.props=v,_.__P=e,S=l.__r,Z=0,"prototype"in k&&k.prototype.render){for(_.state=_.__s,_.__d=!1,S&&S(t),d=_.render(_.props,_.state,_.context),P=0;P<_._sb.length;P++)_.__h.push(_._sb[P]);_._sb=[]}else do _.__d=!1,S&&S(t),d=_.render(_.props,_.state,_.context),_.state=_.__s;while(_.__d&&++Z<25);_.state=_.__s,_.getChildContext!=null&&(r=x(x({},r),_.getChildContext())),h||_.getSnapshotBeforeUpdate==null||(c=_.getSnapshotBeforeUpdate(s,a)),le(e,q(V=d!=null&&d.type===W&&d.key==null?d.props.children:d)?V:[V],t,n,r,i,o,u,p,f),_.base=t.__e,t.__h=null,_.__h.length&&u.push(_),E&&(_.__E=_.__=null),_.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Le(n.__e,t,n,r,i,o,u,f);(d=l.diffed)&&d(t)}catch(H){t.__v=null,(f||o!=null)&&(t.__e=p,t.__h=!!f,o[o.indexOf(p)]=null),l.__e(H,t,n)}}function de(e,t){l.__c&&l.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){l.__e(r,n.__v)}})}function Le(e,t,n,r,i,o,u,p){var f,d,_,h=n.props,s=t.props,a=t.type,c=0;if(a==="svg"&&(i=!0),o!=null){for(;c=n.__.length&&n.__.push({__V:R}),n.__[e]}function F(e){return J=1,je(De,e)}function je(e,t,n){var r=we(L++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):De(void 0,t),function(p){var f=r.__N?r.__N[0]:r.__[0],d=r.t(f,p);f!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=y,!y.u)){var i=function(p,f,d){if(!r.__c.__H)return!0;var _=r.__c.__H.__.filter(function(s){return s.__c});if(_.every(function(s){return!s.__N}))return!o||o.call(this,p,f,d);var h=!1;return _.forEach(function(s){if(s.__N){var a=s.__[0];s.__=s.__N,s.__N=void 0,a!==s.__[0]&&(h=!0)}}),!(!h&&r.__c.props===p)&&(!o||o.call(this,p,f,d))};y.u=!0;var o=y.shouldComponentUpdate,u=y.componentWillUpdate;y.componentWillUpdate=function(p,f,d){if(this.__e){var _=o;o=void 0,i(p,f,d),o=_}u&&u.call(this,p,f,d)},y.shouldComponentUpdate=i}return r.__N||r.__}function Fe(e,t){var n=we(L++,3);!l.__s&&ze(n.__H,t)&&(n.__=e,n.i=t,y.__H.__h.push(n))}function qe(){for(var e;e=Se.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(M),e.__H.__h.forEach(Y),e.__H.__h=[]}catch(t){e.__H.__h=[],l.__e(t,e.__v)}}l.__b=function(e){y=null,be&&be(e)},l.__r=function(e){ke&&ke(e),L=0;var t=(y=e.__c).__H;t&&(G===y?(t.__h=[],y.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=R,n.__N=n.i=void 0})):(t.__h.forEach(M),t.__h.forEach(Y),t.__h=[],L=0)),G=y},l.diffed=function(e){Ce&&Ce(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Se.push(t)!==1&&ge===l.requestAnimationFrame||((ge=l.requestAnimationFrame)||Oe)(qe)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==R&&(n.__=n.__V),n.i=void 0,n.__V=R})),G=y=null},l.__c=function(e,t){t.some(function(n){try{n.__h.forEach(M),n.__h=n.__h.filter(function(r){return!r.__||Y(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],l.__e(r,n.__v)}}),xe&&xe(e,t)},l.unmount=function(e){Ae&&Ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{M(r)}catch(i){t=i}}),n.__H=void 0,t&&l.__e(t,n.__v))};var Ee=typeof requestAnimationFrame=="function";function Oe(e){var t,n=function(){clearTimeout(r),Ee&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Ee&&(t=requestAnimationFrame(n))}function M(e){var t=y,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),y=t}function Y(e){var t=y;e.__c=e.__(),y=t}function ze(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function De(e,t){return typeof t=="function"?t(e):t}var He=chrome;var K="https://api.nopecha.com",b="https://www.nopecha.com",Pe="https://developers.nopecha.com",Xe={doc:{url:Pe,automation:{url:`${Pe}/guides/extension_advanced/#automation-build`}},api:{url:K,recognition:{url:`${K}/recognition`},status:{url:`${K}/status`}},www:{url:b,annoucement:{url:`${b}/json/announcement.json`},demo:{url:`${b}/demo`,hcaptcha:{url:`${b}/demo/hcaptcha`},recaptcha:{url:`${b}/demo/recaptcha`},funcaptcha:{url:`${b}/demo/funcaptcha`},awscaptcha:{url:`${b}/demo/awscaptcha`},turnstile:{url:`${b}/demo/turnstile`},textcaptcha:{url:`${b}/demo/textcaptcha`},perimeterx:{url:`${b}/demo/perimeterx`}},manage:{url:`${b}/manage`},pricing:{url:`${b}/pricing`},setup:{url:`${b}/setup`}},discord:{url:`${b}/discord`},github:{url:`${b}/github`,release:{url:`${b}/github/release`}}};function Be(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(n=>n.charCodeAt(0));return Ue(t)}var $e=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let n=8;n--;)t=t&1?3988292384^t>>>1:t>>>1;$e[e]=t}function Ue(e){let t=-1;for(let n of e)t=t>>>8^$e[t&255^n];return(t^-1)>>>0}async function Ne(e,t){let n=""+[+new Date,performance.now(),Math.random()],[r,i]=await new Promise(o=>{He.runtime.sendMessage([n,e,...t],o)});if(r===Be(n))return i}function X(){let[e,t]=F(1),[n,r]=F(!1),[i,o]=F(null);return m("main",{style:{maxWidth:"100rem",padding:"1rem",margin:"0px auto",fontFamily:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"'}},m(Q,null,m("h3",null,"Select FunCAPTCHA site to test"),m("button",{onClick:()=>{r(!n),o(null)},style:{marginBottom:"1rem"}},"Render all of them (laggy!)"),m("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.125rem 0.25rem"}},z.map(u=>m("button",{onClick:()=>{r(!1),o(u)}},u.name)))),m(Q,null,m("h3",null,"How many CAPTCHAs to render at once?"),m("div",{style:{display:"flex"}},m("input",{type:"range",min:1,max:20,value:e,onChange:u=>{t(u.currentTarget.valueAsNumber)}}),e)),m(Q,null,m("h3",null,"CAPTCHAs"),!n&&!i?m("p",null,"You need to select a sitekey!"):n?z.map(u=>m(Te,{sitekey:u,amount:e})):m(Te,{sitekey:i,amount:e})))}function Q({children:e}){return m("section",{style:{margin:"2rem 0px"}},e)}function Te({sitekey:e,amount:t}){return m("div",{style:{margin:"0.25rem 0px"}},m("h4",null,e.name),m("hr",null),m("div",{style:{display:"flex",flexWrap:"wrap"}},Array(t).fill(0).map((n,r)=>m(Ge,{...e}))))}function Ge({sitekey:e,hostname:t="iframe.arkoselabs.com",dimensions:[n,r]=[320,310],loader:i=0}){let[o,u]=F();return Fe(()=>{if(i===0)u(`https://${t}/${e}/index.html?mkt=en`);else if(i===1){let p=`https://api.funcaptcha.com/fc/gt2/public_key/${e}`;Ne("fetch::universalFetch",[p,{method:"POST",body:new URLSearchParams({bda:"",site:"",public_key:e,language:"en",userbrowser:navigator.userAgent,rnd:""+Math.random()}).toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"}}]).then(({text:f})=>{let d=JSON.parse(f),_={};for(let s of d.token.split("|")){let[a,c]=s.split("=");c||([a,c]=["token",a]),a.endsWith("url")&&(c=decodeURIComponent(c)),_[a]=c}let h=new URLSearchParams(_);u(`https://api.funcaptcha.com/fc/gc/?${h.toString()}`)})}},[e,t,i]),m("div",{style:{width:`${n}px`,height:`${r}px`,border:"1px solid black"}},o?m("iframe",{src:o,style:{width:"100%",height:"100%",border:"none"}}):m("p",null,"Loading..."))}[...document.body.children].forEach(e=>e.remove());ve(m(X,{}),document.body);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/integrate.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/integrate.js new file mode 100644 index 0000000..d1b9d90 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/integrate.js @@ -0,0 +1 @@ +(()=>{var c=chrome;var o="https://api.nopecha.com",e="https://www.nopecha.com",n="https://developers.nopecha.com",i={doc:{url:n,automation:{url:`${n}/guides/extension_advanced/#automation-build`}},api:{url:o,recognition:{url:`${o}/recognition`},status:{url:`${o}/status`}},www:{url:e,annoucement:{url:`${e}/json/announcement.json`},demo:{url:`${e}/demo`,hcaptcha:{url:`${e}/demo/hcaptcha`},recaptcha:{url:`${e}/demo/recaptcha`},funcaptcha:{url:`${e}/demo/funcaptcha`},awscaptcha:{url:`${e}/demo/awscaptcha`},turnstile:{url:`${e}/demo/turnstile`},textcaptcha:{url:`${e}/demo/textcaptcha`},perimeterx:{url:`${e}/demo/perimeterx`}},manage:{url:`${e}/manage`},pricing:{url:`${e}/pricing`},setup:{url:`${e}/setup`}},discord:{url:`${e}/discord`},github:{url:`${e}/github`,release:{url:`${e}/github/release`}}};function a(r){if(document.readyState!=="loading")setTimeout(r,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),r()},addEventListener("DOMContentLoaded",t)}}function u(){document.documentElement.setAttribute("installed","yes"),document.documentElement.setAttribute("data",JSON.stringify({version:c.runtime.getManifest().version}))}a(u);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/setup.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/setup.js new file mode 100644 index 0000000..e69953a --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/pages/setup.js @@ -0,0 +1 @@ +(()=>{var g=chrome;var l="https://api.nopecha.com",r="https://www.nopecha.com",h="https://developers.nopecha.com",T={doc:{url:h,automation:{url:`${h}/guides/extension_advanced/#automation-build`}},api:{url:l,recognition:{url:`${l}/recognition`},status:{url:`${l}/status`}},www:{url:r,annoucement:{url:`${r}/json/announcement.json`},demo:{url:`${r}/demo`,hcaptcha:{url:`${r}/demo/hcaptcha`},recaptcha:{url:`${r}/demo/recaptcha`},funcaptcha:{url:`${r}/demo/funcaptcha`},awscaptcha:{url:`${r}/demo/awscaptcha`},turnstile:{url:`${r}/demo/turnstile`},textcaptcha:{url:`${r}/demo/textcaptcha`},perimeterx:{url:`${r}/demo/perimeterx`}},manage:{url:`${r}/manage`},pricing:{url:`${r}/pricing`},setup:{url:`${r}/setup`}},discord:{url:`${r}/discord`},github:{url:`${r}/github`,release:{url:`${r}/github/release`}}};function f(e){let t=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+e).split("").map(o=>o.charCodeAt(0));return y(t)}var b=new Uint32Array(256);for(let e=256;e--;){let t=e;for(let o=8;o--;)t=t&1?3988292384^t>>>1:t>>>1;b[e]=t}function y(e){let t=-1;for(let o of e)t=t>>>8^b[t&255^o];return(t^-1)>>>0}async function x(e,t){let o=""+[+new Date,performance.now(),Math.random()],[s,n]=await new Promise(c=>{g.runtime.sendMessage([o,e,...t],c)});if(s===f(o))return n}function m(e){if(document.readyState!=="loading")setTimeout(e,0);else{let t;t=()=>{removeEventListener("DOMContentLoaded",t),e()},addEventListener("DOMContentLoaded",t)}}[...document.body.children].forEach(e=>e.remove());function i(e,t,o={}){let s=document.createElement(e);return o&&Object.entries(o).forEach(([n,c])=>s[n]=c),t.appendChild(s),s}function $(){i("h1",document.body,{innerText:"Invalid URL."}),i("h2",document.body,{innerText:"Please set the URL hash and reload the page."}),i("p",document.body,{innerText:"Example: https://nopecha.com/setup#TESTKEY123"})}function w(e){return/^(true|false)$/.test(e)?e==="true":/^\d+$/.test(e)?+e:e}function _(){let e="NopeCHA Settings Import",t=document.querySelector("title");document.title!==e&&t&&(t.innerText=e);let o=document.location.hash.substring(1);if(!o)return $();let s=o.split("|"),n=Object.fromEntries(s.map(a=>a.includes("=")?a.split("="):["key",a]).map(([a,d])=>[a,w(d)]));if("disabled_hosts"in n){let a=""+n.disabled_hosts;a===""?n.disabled_hosts=[]:decodeURIComponent(a).startsWith("[")?n.disabled_hosts=JSON.parse(decodeURIComponent(a)):n.disabled_hosts=a.split(",")}"key"in n&&n.key.includes(",")&&(n.keys=n.key.split(","),delete n.key),console.log(n),i("h2",document.body,{innerText:"Imported following settings:"});let c=i("table",document.body),u=i("tr",c);i("th",u,{innerText:"Name"}),i("th",u,{innerText:"Value"}),Object.entries(n).forEach(([a,d])=>{let p=i("tr",c);i("td",p,{innerText:a}),i("td",p,{innerText:JSON.stringify(d)})}),i("h2",document.body,{innerText:"Import URL:"}),i("a",document.body,{innerText:location.href,href:location.href,style:"word-wrap: break-word"}),x("settings::update",[n])}m(_);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.css b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.css new file mode 100644 index 0000000..a03391a --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.css @@ -0,0 +1 @@ +*{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";margin:0;padding:0;border:none;box-sizing:border-box;--text: #ffffff;--background: #1a2432;--accent: rgba(255, 255, 255, .08);--muted: rgba(255, 255, 255, .5);--toggle: #0a95ff;--brand: #05b8ff;--brand-dark: #0a95ff;--warning: #fcd62e;--danger: #fc2e2e;--success: #2efc2e}*:focus-visible{outline:2px solid transparent;outline-offset:2px}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}button,svg,input{display:block;background-color:transparent;color:var(--text)}audio{width:280px}button{cursor:pointer}html{color:var(--text);background-color:var(--background);font-size:1em}body{font-size:75%}html,body{width:340px}*{scrollbar-width:thin;scrollbar-color:#fff2 transparent}::-webkit-scrollbar{width:8px;height:8px;right:2px;bottom:2px;top:2px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#fff2;border-radius:4px}#app{min-height:237px!important;overflow:hidden;padding:.25rem;transition:height ease .2s,min-height ease .2s}main{display:flex;flex-flow:column nowrap;flex:1;overflow:hidden;height:100%;position:relative;margin:0px .5rem 0px 1rem;padding-right:.5rem}.hidden{display:none!important}.center{display:flex;justify-content:center;align-items:center;text-align:center}.warning{padding:1.5rem .5rem;border:1px solid var(--warning);border-radius:.25rem;flex-direction:column}.bold{font-weight:700!important}.underline{text-decoration:underline!important}.strike{text-decoration:line-through!important}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-normal{font-size:.825rem;font-weight:400}.cursor-normal{cursor:default!important}.color-brand{color:var(--brand)!important}.color-brand-dark{color:var(--brand-dark)!important}.color-accent{color:var(--accent)!important}.color-muted{color:var(--muted)!important}.color-warning{color:var(--warning)!important}.color-danger{color:var(--danger)!important}.color-success{color:var(--success)!important}.loading-wrapper{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;text-align:center;padding:1rem 0px}.loading{display:inline-block;position:relative;width:32px;height:16px}.loading div{position:absolute;top:5px;width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.8);animation-timing-function:cubic-bezier(0,1,1,0)}.loading div:nth-child(1){left:4px;animation:loading1 .6s infinite}.loading div:nth-child(2){left:4px;animation:loading2 .6s infinite}.loading div:nth-child(3){left:16px;animation:loading2 .6s infinite}.loading div:nth-child(4){left:28px;animation:loading3 .6s infinite}@keyframes loading1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes loading3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes loading2{0%{transform:translate(0)}to{transform:translate(12px)}}ol{display:flex;flex-direction:column;margin:0 0 1rem}li>*{display:block}.icon{display:flex;width:100%;justify-content:space-between;padding:12px 2px;border-bottom:2px solid rgba(255,255,255,.05)}ol>li:last-child>.icon{border-bottom:none}.icon,.icon svg{color:#ffffff80!important;transition:.4s ease 0s,border .5s ease 0s;-webkit-font-smoothing:subpixel-antialiased}.icon svg{flex-grow:0!important}.icon:hover,.icon:hover svg{color:#fff!important}.icon>:first-child{flex-grow:1;display:flex;gap:.5rem}.no-icon{height:16px;width:16px}.value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;color:var(--brand);width:80px;min-width:80px;font-size:.825rem;font-weight:400}.auto-disabled-hint{flex-grow:0;flex-basis:0;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;min-width:60px;height:100%;opacity:.8}.auto-disabled-hint>div{width:100%;font-size:.7rem;font-weight:700;text-align:center;word-break:break-word;z-index:1;transition:.2s ease}.inline-switch{padding:0 16px}.switch.small{--xfactor: 1.5;--yfactor: 1.5;flex-shrink:0;width:calc(1.25rem * var(--xfactor));height:calc(.75rem * var(--yfactor));padding:calc(.125rem * var(--yfactor)) calc(.125rem * var(--xfactor))}.switch.small:after{width:calc(.5rem * var(--xfactor));height:calc(.5rem * var(--yfactor))}.switch.small[checked]:after{transform:translate(calc(.5rem * var(--xfactor)))}.prog-main{--font-size: .8rem;--length: 12px;--yoffset: -20px;display:flex;flex-flow:column nowrap;width:100%;padding-left:12px;padding-right:12px}.prog-main .prog-bar,.prog-main .prog-per{border-radius:8px}.prog-main .prog-bar{display:flex;flex-flow:row nowrap;background-color:var(--accent);width:100%;height:10px}.prog-main .prog-per{background:var(--brand-dark);position:relative;transition:.3s linear}.prog-main .prog-per:before,.prog-main .prog-per:after{background-color:var(--brand-dark);color:var(--text);position:absolute;right:0}.prog-main .prog-per:before{content:attr(data-per);top:calc(-10px + var(--yoffset));padding:1px 3px;font-size:var(--font-size);border-radius:2px;z-index:1;transform:translate(50%)}.prog-main .prog-per:after{content:"";top:var(--yoffset);border-radius:1px;width:var(--length);height:var(--length);transform:translate(50%) rotate(45deg)}.glow{border:none;outline:none;cursor:pointer;position:relative;z-index:0;border-radius:50%}.glow:before{content:"";background:linear-gradient(45deg,#ff0000,#ff7300,#fffb00,#48ff00,#00ffd5,#002bff,#7a00ff,#ff00c8,#ff0000);position:absolute;top:-2px;left:-2px;background-size:400%;z-index:-1;filter:blur(5px);width:calc(100% + 4px);height:calc(100% + 4px);animation:glowing 20s linear infinite;opacity:1;border-radius:50%}.glow:active:after{background:transparent}.glow:after{z-index:-1;content:"";position:absolute;width:100%;height:100%;left:0;top:0;border-radius:50%}.glow.static:before{opacity:1!important}@keyframes glowing{0%{background-position:0 0}50%{background-position:400% 0}to{background-position:0 0}}#loading{flex-direction:column;gap:1.5rem;height:400px}.status{margin:.5rem 0px}.status>*{display:flex;justify-content:space-between;align-items:center;font-size:1rem;margin:.5rem 0px}.status>*>*:first-child{font-weight:500}.status>*>span:last-child{display:flex;flex-flow:row nowrap;color:var(--brand);font-size:.825rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.status .warning{font-size:.825rem}.status .warning a{color:var(--brand)}.border-botton{border-bottom:1px solid var(--accent);padding-top:.2rem;margin-bottom:.5rem;padding-bottom:.8rem}.key-icon{display:flex;flex-flow:row nowrap;align-items:center;background-color:transparent;border-radius:2px;padding:0}.key-icon svg{margin-left:4px;transition:.3s ease}.key-icon:hover svg{opacity:.5;transform:scale(1.1)}.key-input-wrapper{flex-grow:1;display:flex;flex-flow:row nowrap;align-items:center;padding-left:0;padding-right:.5rem}.key-input{color:var(--brand);flex-grow:1;text-align:right}.spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.power{transition:.3s ease;transition-property:transform,box-shadow;border-radius:99px}.power[data-enabled=true]{box-shadow:0 0 0 2px var(--brand)}.power[data-enabled=false]{transform:rotate(-180deg)}.power svg{transition:color .3s ease}.power[data-enabled=false] svg{color:var(--warning)}footer{display:flex;justify-content:space-between;font-size:.625rem}nav{margin:.5rem 1rem;display:flex;justify-content:space-between;align-items:flex-end}nav h1{font-size:1.5rem;line-height:2rem}nav>div{height:2rem;width:2rem;background-color:var(--accent);border-radius:99px}nav>div>*{padding:.25rem}nav .invisible{visibility:hidden}nav svg{height:1.25rem;width:1.25rem}.banner{margin:.25rem 0px;padding:.5rem;display:flex;justify-content:space-between;align-items:center;background-color:var(--brand);border-radius:.25rem;text-align:center}.banner.urgent{border:1px solid var(--warning);background-color:transparent}.banner>:last-child{opacity:0;transition:.3s ease;transition-property:opacity,background-color;padding:.125rem;border-radius:99px}.banner>:last-child:hover{background-color:var(--accent)}.banner:hover>:last-child{opacity:1}#hosts{margin-top:1rem}#hosts h3{margin-bottom:.25rem}#hosts p{font-size:.75rem;color:#ddd}#hosts div{display:flex;justify-content:space-between}#hosts div button:hover{color:var(--accent)}#captcha>div{margin:1rem 0px;border:1px solid var(--accent);border-radius:8px}#captcha>div>*{padding:10px 16px 8px}#captcha>div>:first-child{background-color:var(--accent);border-radius:8px}#captcha>div>:last-child{color:var(--muted);display:flex;justify-content:space-between}#captcha>div>:last-child>input{text-align:right;margin-right:4px}.switch{height:1.5rem;width:2.5rem;padding:.25rem;align-items:center;background-color:var(--accent);border-radius:2rem;transition-property:transform,background-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.switch[checked]{background-color:var(--toggle)}.switch:after{content:"";display:block;background-color:var(--background);width:1rem;height:1rem;border-radius:99px;transition-property:transform,background-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.switch[checked]:after{background-color:var(--text);transform:translate(1rem)}input[type=number]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.7rem;width:4rem}input[type=text]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.7rem;width:8rem;padding-left:4px}.locate{display:flex;flex-flow:row nowrap;align-items:center;background-color:transparent;border-radius:4px;border:1px solid var(--accent);background-color:var(--accent);padding:2px 4px;font-size:.7rem;opacity:.7;transition:.4s ease 0s}.locate:hover{background-color:var(--muted);opacity:1}#debug{margin:1rem}#debug>*{margin:.5rem 0px;white-space:pre-wrap;word-break:break-all}#debug>*>:first{margin-bottom:.125rem}#debug button{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;background-color:var(--brand);color:#fff;width:100%;height:35px;line-height:35px;font-weight:700;padding:.5rem;border-radius:.25rem;border:none;text-align:center;cursor:pointer;transition:.2s ease 0s}#debug button:hover{background-color:var(--brand-dark)}#debug button>div{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;height:100%}#logs{margin:1rem}#logs>*{margin:.5rem 0px;white-space:pre-wrap;word-break:break-all}#logs>*>:first{margin-bottom:.125rem}#logs button{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;background-color:var(--brand);color:#fff;width:100%;height:35px;line-height:35px;font-weight:700;padding:.5rem;border-radius:.25rem;border:none;text-align:center;cursor:pointer;transition:.2s ease 0s}#logs button:hover{background-color:var(--brand-dark)}#logs button>div{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;height:100%}.log{margin-bottom:.5rem;padding:.5rem;border:1px solid rgba(255,255,255,.05)}.log>p{white-space:pre;word-break:keep-all;overflow:auto}.log>*{margin:4px 0;padding:4px 0} diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.html b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.html new file mode 100644 index 0000000..94238bc --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.html @@ -0,0 +1,19 @@ + + + + + + NopeCHA + + + + +

+ If you can see this, please make sure popup.js is not + corrupted. +

+ + + diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.js b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.js new file mode 100644 index 0000000..f6f09bc --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/popup.js @@ -0,0 +1,2 @@ +(()=>{var at,_,qt,Qe,V,Vt,Wt,_t,Ke,et={},Ft=[],Ye=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ht=Array.isArray;function D(t,e){for(var o in e)t[o]=e[o];return t}function Zt(t){var e=t.parentNode;e&&e.removeChild(t)}function n(t,e,o){var a,s,i,c={};for(i in e)i=="key"?a=e[i]:i=="ref"?s=e[i]:c[i]=e[i];if(arguments.length>2&&(c.children=arguments.length>3?at.call(arguments,2):o),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)c[i]===void 0&&(c[i]=t.defaultProps[i]);return Y(t,c,a,s,null)}function Y(t,e,o,a,s){var i={type:t,props:e,key:o,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:s??++qt};return s==null&&_.vnode!=null&&_.vnode(i),i}function y(t){return t.children}function tt(t,e){this.props=t,this.context=e}function Z(t,e){if(e==null)return t.__?Z(t.__,t.__.__k.indexOf(t)+1):null;for(var o;ee&&V.sort(_t));nt.__r=0}function Jt(t,e,o,a,s,i,c,l,u,d){var r,m,f,p,g,b,v,C=a&&a.__k||Ft,L=C.length;for(o.__k=[],r=0;r0?Y(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=o,p.__b=o.__b+1,(f=C[r])===null||f&&p.key==f.key&&p.type===f.type)C[r]=void 0;else for(m=0;m=0;e--)if((o=t.__k[e])&&(a=Qt(o)))return a}return null}function tn(t,e,o,a,s){var i;for(i in o)i==="children"||i==="key"||i in e||ot(t,i,null,o[i],a);for(i in e)s&&typeof e[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||o[i]===e[i]||ot(t,i,e[i],o[i],a)}function Nt(t,e,o){e[0]==="-"?t.setProperty(e,o??""):t[e]=o==null?"":typeof o!="number"||Ye.test(e)?o:o+"px"}function ot(t,e,o,a,s){var i;t:if(e==="style")if(typeof o=="string")t.style.cssText=o;else{if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)o&&e in o||Nt(t.style,e,"");if(o)for(e in o)a&&o[e]===a[e]||Nt(t.style,e,o[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=o,o?a||t.addEventListener(e,i?Ut:Ot,i):t.removeEventListener(e,i?Ut:Ot,i);else if(e!=="dangerouslySetInnerHTML"){if(s)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=o??"";break t}catch{}typeof o=="function"||(o==null||o===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,o))}}function Ot(t){return this.l[t.type+!1](_.event?_.event(t):t)}function Ut(t){return this.l[t.type+!0](_.event?_.event(t):t)}function vt(t,e,o,a,s,i,c,l,u){var d,r,m,f,p,g,b,v,C,L,X,F,Et,Q,gt,P=e.type;if(e.constructor!==void 0)return null;o.__h!=null&&(u=o.__h,l=e.__e=o.__e,e.__h=null,i=[l]),(d=_.__b)&&d(e);try{t:if(typeof P=="function"){if(v=e.props,C=(d=P.contextType)&&a[d.__c],L=d?C?C.props.value:d.__:a,o.__c?b=(r=e.__c=o.__c).__=r.__E:("prototype"in P&&P.prototype.render?e.__c=r=new P(v,L):(e.__c=r=new tt(v,L),r.constructor=P,r.render=nn),C&&C.sub(r),r.props=v,r.state||(r.state={}),r.context=L,r.__n=a,m=r.__d=!0,r.__h=[],r._sb=[]),r.__s==null&&(r.__s=r.state),P.getDerivedStateFromProps!=null&&(r.__s==r.state&&(r.__s=D({},r.__s)),D(r.__s,P.getDerivedStateFromProps(v,r.__s))),f=r.props,p=r.state,r.__v=e,m)P.getDerivedStateFromProps==null&&r.componentWillMount!=null&&r.componentWillMount(),r.componentDidMount!=null&&r.__h.push(r.componentDidMount);else{if(P.getDerivedStateFromProps==null&&v!==f&&r.componentWillReceiveProps!=null&&r.componentWillReceiveProps(v,L),!r.__e&&r.shouldComponentUpdate!=null&&r.shouldComponentUpdate(v,r.__s,L)===!1||e.__v===o.__v){for(e.__v!==o.__v&&(r.props=v,r.state=r.__s,r.__d=!1),r.__e=!1,e.__e=o.__e,e.__k=o.__k,e.__k.forEach(function(K){K&&(K.__=e)}),X=0;X=o.__.length&&o.__.push({__V:it}),o.__[t]}function w(t){return wt=1,on(de,t)}function on(t,e,o){var a=ue(st++,2);if(a.t=t,!a.__c&&(a.__=[o?o(e):de(void 0,e),function(l){var u=a.__N?a.__N[0]:a.__[0],d=a.t(u,l);u!==d&&(a.__N=[d,a.__[1]],a.__c.setState({}))}],a.__c=S,!S.u)){var s=function(l,u,d){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter(function(f){return f.__c});if(r.every(function(f){return!f.__N}))return!i||i.call(this,l,u,d);var m=!1;return r.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(m=!0)}}),!(!m&&a.__c.props===l)&&(!i||i.call(this,l,u,d))};S.u=!0;var i=S.shouldComponentUpdate,c=S.componentWillUpdate;S.componentWillUpdate=function(l,u,d){if(this.__e){var r=i;i=void 0,s(l,u,d),i=r}c&&c.call(this,l,u,d)},S.shouldComponentUpdate=s}return a.__N||a.__}function k(t,e){var o=ue(st++,3);!_.__s&&sn(o.__H,e)&&(o.__=t,o.i=e,S.__H.__h.push(o))}function an(){for(var t;t=ce.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rt),t.__H.__h.forEach(Ct),t.__H.__h=[]}catch(e){t.__H.__h=[],_.__e(e,t.__v)}}_.__b=function(t){S=null,oe&&oe(t)},_.__r=function(t){ae&&ae(t),st=0;var e=(S=t.__c).__H;e&&(bt===S?(e.__h=[],S.__h=[],e.__.forEach(function(o){o.__N&&(o.__=o.__N),o.__V=it,o.__N=o.i=void 0})):(e.__h.forEach(rt),e.__h.forEach(Ct),e.__h=[],st=0)),bt=S},_.diffed=function(t){ie&&ie(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ce.push(e)!==1&&ne===_.requestAnimationFrame||((ne=_.requestAnimationFrame)||rn)(an)),e.__H.__.forEach(function(o){o.i&&(o.__H=o.i),o.__V!==it&&(o.__=o.__V),o.i=void 0,o.__V=it})),bt=S=null},_.__c=function(t,e){e.some(function(o){try{o.__h.forEach(rt),o.__h=o.__h.filter(function(a){return!a.__||Ct(a)})}catch(a){e.some(function(s){s.__h&&(s.__h=[])}),e=[],_.__e(a,o.__v)}}),re&&re(t,e)},_.unmount=function(t){se&&se(t);var e,o=t.__c;o&&o.__H&&(o.__H.__.forEach(function(a){try{rt(a)}catch(s){e=s}}),o.__H=void 0,e&&_.__e(e,o.__v))};var le=typeof requestAnimationFrame=="function";function rn(t){var e,o=function(){clearTimeout(a),le&&cancelAnimationFrame(e),setTimeout(t)},a=setTimeout(o,100);le&&(e=requestAnimationFrame(o))}function rt(t){var e=S,o=t.__c;typeof o=="function"&&(t.__c=void 0,o()),S=e}function Ct(t){var e=S;t.__c=t.__(),S=e}function sn(t,e){return!t||t.length!==e.length||e.some(function(o,a){return o!==t[a]})}function de(t,e){return typeof e=="function"?e(t):e}var H=chrome,me=!0,yt="https://api.nopecha.com",A="https://www.nopecha.com",pe="https://developers.nopecha.com",x={doc:{url:pe,automation:{url:`${pe}/guides/extension_advanced/#automation-build`}},api:{url:yt,recognition:{url:`${yt}/recognition`},status:{url:`${yt}/status`}},www:{url:A,annoucement:{url:`${A}/json/announcement.json`},demo:{url:`${A}/demo`,hcaptcha:{url:`${A}/demo/hcaptcha`},recaptcha:{url:`${A}/demo/recaptcha`},funcaptcha:{url:`${A}/demo/funcaptcha`},awscaptcha:{url:`${A}/demo/awscaptcha`},turnstile:{url:`${A}/demo/turnstile`},textcaptcha:{url:`${A}/demo/textcaptcha`},perimeterx:{url:`${A}/demo/perimeterx`}},manage:{url:`${A}/manage`},pricing:{url:`${A}/pricing`},setup:{url:`${A}/setup`}},discord:{url:`${A}/discord`},github:{url:`${A}/github`,release:{url:`${A}/github/release`}}};function fe(t){let e=("6146a541f7b2046020e84d44aa2e1e120f2ad8b75ac9b6fc236f65f737a7006f"+t).split("").map(o=>o.charCodeAt(0));return _e(e)}var ge=new Uint32Array(256);for(let t=256;t--;){let e=t;for(let o=8;o--;)e=e&1?3988292384^e>>>1:e>>>1;ge[t]=e}function _e(t){let e=-1;for(let o of t)e=e>>>8^ge[e&255^o];return(e^-1)>>>0}async function h(t,e){let o=""+[+new Date,performance.now(),Math.random()],[a,s]=await new Promise(i=>{H.runtime.sendMessage([o,t,...e],i)});if(a===fe(o))return s}function he(){let t;return e=>t||(t=e().finally(()=>t=void 0),t)}function lt(t){return new Promise(e=>setTimeout(e,t))}var ln=[];async function cn(t,e){if(t.timedout)return!1;let o=t.condition(e);if(o===t.running())return!1;if(!o&&t.running())return t.quit(),!1;if(o&&!t.running()){for(;!t.ready();)await lt(200);return t.start(),!1}}function ve(t){ln.forEach(e=>cn(e,t))}var un=he(),I;function be(){return un(async()=>(I||(I=await h("settings::get",[])),I))}function we(t){I&&(I={...I,...t},ve(I))}function M(){return I}function Ce(){H.runtime.connect({name:"stream"}).onMessage.addListener(e=>{e.event==="settingsUpdate"&&we(e.settings)})}function ct({children:t}){return n("main",{id:"loading",class:"center"},n("div",{class:"glow"},n("img",{src:"/icon/32.png",alt:"NopeCHA logo"})),n("h2",null,t))}function ye(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{"fill-rule":"evenodd",d:"M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"}))}function z(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{"fill-rule":"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"}))}function R(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{"fill-rule":"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}))}function xe(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"m13.498.795.149-.149a1.207 1.207 0 1 1 1.707 1.708l-.149.148a1.5 1.5 0 0 1-.059 2.059L4.854 14.854a.5.5 0 0 1-.233.131l-4 1a.5.5 0 0 1-.606-.606l1-4a.5.5 0 0 1 .131-.232l9.642-9.642a.5.5 0 0 0-.642.056L6.854 4.854a.5.5 0 1 1-.708-.708L9.44.854A1.5 1.5 0 0 1 11.5.796a1.5 1.5 0 0 1 1.998-.001zm-.644.766a.5.5 0 0 0-.707 0L1.95 11.756l-.764 3.057 3.057-.764L14.44 3.854a.5.5 0 0 0 0-.708l-1.585-1.585z"}))}function Se(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"}))}function ke(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.707 1.5ZM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5 5 5Z"}))}function Ae(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"}))}function Me(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"}))}function Le(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M8.5 10c-.276 0-.5-.448-.5-1s.224-1 .5-1 .5.448.5 1-.224 1-.5 1z"}),n("path",{d:"M10.828.122A.5.5 0 0 1 11 .5V1h.5A1.5 1.5 0 0 1 13 2.5V15h1.5a.5.5 0 0 1 0 1h-13a.5.5 0 0 1 0-1H3V1.5a.5.5 0 0 1 .43-.495l7-1a.5.5 0 0 1 .398.117zM11.5 2H11v13h1V2.5a.5.5 0 0 0-.5-.5zM4 1.934V15h6V1.077l-6 .857z"}))}function Te(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M6 12.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5ZM3 8.062C3 6.76 4.235 5.765 5.53 5.886a26.58 26.58 0 0 0 4.94 0C11.765 5.765 13 6.76 13 8.062v1.157a.933.933 0 0 1-.765.935c-.845.147-2.34.346-4.235.346-1.895 0-3.39-.2-4.235-.346A.933.933 0 0 1 3 9.219V8.062Zm4.542-.827a.25.25 0 0 0-.217.068l-.92.9a24.767 24.767 0 0 1-1.871-.183.25.25 0 0 0-.068.495c.55.076 1.232.149 2.02.193a.25.25 0 0 0 .189-.071l.754-.736.847 1.71a.25.25 0 0 0 .404.062l.932-.97a25.286 25.286 0 0 0 1.922-.188.25.25 0 0 0-.068-.495c-.538.074-1.207.145-1.98.189a.25.25 0 0 0-.166.076l-.754.785-.842-1.7a.25.25 0 0 0-.182-.135Z"}),n("path",{d:"M8.5 1.866a1 1 0 1 0-1 0V3h-2A4.5 4.5 0 0 0 1 7.5V8a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v1a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-1a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1v-.5A4.5 4.5 0 0 0 10.5 3h-2V1.866ZM14 7.5V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7.5A3.5 3.5 0 0 1 5.5 4h5A3.5 3.5 0 0 1 14 7.5Z"}))}function Pe(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"}),n("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0z"}))}function He(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022l-.074.997zm2.004.45a7.003 7.003 0 0 0-.985-.299l.219-.976c.383.086.76.2 1.126.342l-.36.933zm1.37.71a7.01 7.01 0 0 0-.439-.27l.493-.87a8.025 8.025 0 0 1 .979.654l-.615.789a6.996 6.996 0 0 0-.418-.302zm1.834 1.79a6.99 6.99 0 0 0-.653-.796l.724-.69c.27.285.52.59.747.91l-.818.576zm.744 1.352a7.08 7.08 0 0 0-.214-.468l.893-.45a7.976 7.976 0 0 1 .45 1.088l-.95.313a7.023 7.023 0 0 0-.179-.483zm.53 2.507a6.991 6.991 0 0 0-.1-1.025l.985-.17c.067.386.106.778.116 1.17l-1 .025zm-.131 1.538c.033-.17.06-.339.081-.51l.993.123a7.957 7.957 0 0 1-.23 1.155l-.964-.267c.046-.165.086-.332.12-.501zm-.952 2.379c.184-.29.346-.594.486-.908l.914.405c-.16.36-.345.706-.555 1.038l-.845-.535zm-.964 1.205c.122-.122.239-.248.35-.378l.758.653a8.073 8.073 0 0 1-.401.432l-.707-.707z"}),n("path",{d:"M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0v1z"}),n("path",{d:"M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5z"}))}function xt(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M0 10.5a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1H.5a.5.5 0 0 1-.5-.5zM12 0H4a2 2 0 0 0-2 2v7h1V2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v7h1V2a2 2 0 0 0-2-2zm2 12h-1v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-2H2v2a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-2z"}))}function ut(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M13.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM11 2.5a2.5 2.5 0 1 1 .603 1.628l-6.718 3.12a2.499 2.499 0 0 1 0 1.504l6.718 3.12a2.5 2.5 0 1 1-.488.876l-6.718-3.12a2.5 2.5 0 1 1 0-3.256l6.718-3.12A2.5 2.5 0 0 1 11 2.5zm-8.5 4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm11 5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"}))}function ze(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{"fill-rule":"evenodd",d:"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5z"}),n("path",{d:"M1.713 11.865v-.474H2c.217 0 .363-.137.363-.317 0-.185-.158-.31-.361-.31-.223 0-.367.152-.373.31h-.59c.016-.467.373-.787.986-.787.588-.002.954.291.957.703a.595.595 0 0 1-.492.594v.033a.615.615 0 0 1 .569.631c.003.533-.502.8-1.051.8-.656 0-1-.37-1.008-.794h.582c.008.178.186.306.422.309.254 0 .424-.145.422-.35-.002-.195-.155-.348-.414-.348h-.3zm-.004-4.699h-.604v-.035c0-.408.295-.844.958-.844.583 0 .96.326.96.756 0 .389-.257.617-.476.848l-.537.572v.03h1.054V9H1.143v-.395l.957-.99c.138-.142.293-.304.293-.508 0-.18-.147-.32-.342-.32a.33.33 0 0 0-.342.338v.041zM2.564 5h-.635V2.924h-.031l-.598.42v-.567l.629-.443h.635V5z"}))}function Be(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-link-45deg",viewBox:"0 0 16 16"},n("path",{d:"M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z"}),n("path",{d:"M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z"}))}function De(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"}))}function St(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z"}))}function Ie(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M7.5 1v7h1V1h-1z"}),n("path",{d:"M3 8.812a4.999 4.999 0 0 1 2.578-4.375l-.485-.874A6 6 0 1 0 11 3.616l-.501.865A5 5 0 1 1 3 8.812z"}))}function $e(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-x-lg",viewBox:"0 0 16 16"},n("path",{d:"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"}))}function Ee(){return n("svg",{width:"16",height:"16",viewBox:"20 20 560 560"},n("path",{d:"m374.48 524.29h74.9v74.89h-74.9z",fill:"#0074bf",opacity:".502"}),n("path",{d:"m299.59 524.29h74.89v74.89h-74.89zm-74.89 0h74.89v74.89h-74.89z",fill:"#0074bf",opacity:".702"}),n("path",{d:"m149.8 524.29h74.9v74.89h-74.9z",fill:"#0074bf",opacity:".502"}),n("g",{fill:"#0082bf"},n("path",{d:"m449.39 449.39h74.9v74.9h-74.9z",opacity:".702"}),n("path",{d:"m374.48 449.39h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m299.59 449.39h74.89v74.9h-74.89zm-74.89 0h74.89v74.9h-74.89z"}),n("path",{d:"m149.8 449.39h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m74.89 449.39h74.9v74.9h-74.9z",opacity:".702"})),n("g",{fill:"#008fbf"},n("path",{d:"m524.29 374.48h74.89v74.9h-74.89z",opacity:".502"}),n("path",{d:"m449.39 374.48h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m374.48 374.48h74.9v74.9h-74.9zm-74.89 0h74.89v74.9h-74.89zm-74.89 0h74.89v74.9h-74.89z"}),n("path",{d:"m149.8 374.48h74.9v74.9h-74.9z"}),n("path",{d:"m74.89 374.48h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m0 374.48h74.89v74.9h-74.89z",opacity:".502"})),n("path",{d:"m524.29 299.59h74.89v74.89h-74.89z",fill:"#009dbf",opacity:".702"}),n("path",{d:"m449.39 299.59h74.9v74.89h-74.9zm-74.91 0h74.9v74.89h-74.9zm-74.89 0h74.89v74.89h-74.89zm-74.89 0h74.89v74.89h-74.89z",fill:"#009dbf"}),n("path",{d:"m149.8 299.59h74.9v74.89h-74.9zm-74.91 0h74.9v74.89h-74.9z",fill:"#009dbf"}),n("path",{d:"m0 299.59h74.89v74.89h-74.89z",fill:"#009dbf",opacity:".702"}),n("path",{d:"m524.29 224.7h74.89v74.89h-74.89z",fill:"#00abbf",opacity:".702"}),n("path",{d:"m449.39 224.7h74.9v74.89h-74.9zm-74.91 0h74.9v74.89h-74.9zm-74.89 0h74.89v74.89h-74.89zm-74.89 0h74.89v74.89h-74.89z",fill:"#00abbf"}),n("path",{d:"m149.8 224.7h74.9v74.89h-74.9zm-74.91 0h74.9v74.89h-74.9z",fill:"#00abbf"}),n("path",{d:"m0 224.7h74.89v74.89h-74.89z",fill:"#00abbf",opacity:".702"}),n("g",{fill:"#00b9bf"},n("path",{d:"m524.29 149.8h74.89v74.9h-74.89z",opacity:".502"}),n("path",{d:"m449.39 149.8h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m374.48 149.8h74.9v74.9h-74.9zm-74.89 0h74.89v74.9h-74.89zm-74.89 0h74.89v74.9h-74.89z"}),n("path",{d:"m149.8 149.8h74.9v74.9h-74.9z"}),n("path",{d:"m74.89 149.8h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m0 149.8h74.89v74.9h-74.89z",opacity:".502"})),n("g",{fill:"#00c6bf"},n("path",{d:"m449.39 74.89h74.9v74.9h-74.9z",opacity:".702"}),n("path",{d:"m374.48 74.89h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m299.59 74.89h74.89v74.9h-74.89zm-74.89 0h74.89v74.9h-74.89z"}),n("path",{d:"m149.8 74.89h74.9v74.9h-74.9z",opacity:".8"}),n("path",{d:"m74.89 74.89h74.9v74.9h-74.9z",opacity:".702"})),n("path",{d:"m374.48 0h74.9v74.89h-74.9z",fill:"#00d4bf",opacity:".502"}),n("path",{d:"m299.59 0h74.89v74.89h-74.89zm-74.89 0h74.89v74.89h-74.89z",fill:"#00d4bf",opacity:".702"}),n("path",{d:"m149.8 0h74.9v74.89h-74.9z",fill:"#00d4bf",opacity:".502"}),n("path",{d:"m197.2 275.96 20.87-46.71c7.61-11.97 6.6-26.64-1.72-34.96-.28-.28-.56-.55-.86-.81-.29-.26-.59-.52-.89-.76a21.043 21.043 0 0 0 -1.92-1.37 22.68 22.68 0 0 0 -4.51-2.13c-1.58-.55-3.21-.92-4.87-1.12-1.66-.19-3.34-.2-5-.03s-3.3.51-4.88 1.04c-1.79.55-3.53 1.27-5.19 2.13a32.32 32.32 0 0 0 -4.72 3.02 32.38 32.38 0 0 0 -4.12 3.82 32 32 0 0 0 -3.37 4.48c-.98 1.59-28.57 66.66-39.2 96.62s-6.39 84.91 34.61 125.99c43.48 43.48 106.43 53.41 146.58 23.28.42-.21.84-.44 1.24-.67.41-.23.81-.48 1.2-.74.4-.25.78-.52 1.16-.8.38-.27.75-.56 1.11-.86l123.73-103.32c6.01-4.97 14.9-15.2 6.92-26.88-7.79-11.39-22.55-3.64-28.57.21l-71.21 51.78c-.33.27-.72.48-1.13.6-.42.12-.85.16-1.28.11s-.85-.19-1.22-.4c-.38-.21-.71-.5-.97-.85-1.81-2.22-2.13-8.11.71-10.44l109.16-92.64c9.43-8.49 10.74-20.84 3.1-29.3-7.45-8.29-19.29-8.04-28.8.53l-98.28 76.83c-.46.38-.99.66-1.56.82s-1.17.21-1.76.13-1.15-.27-1.66-.58c-.51-.3-.96-.7-1.3-1.18-1.94-2.18-2.69-5.89-.5-8.07l111.3-108.01c2.09-1.95 3.78-4.29 4.96-6.88 1.18-2.6 1.85-5.41 1.95-8.26s-.36-5.7-1.36-8.37c-1-2.68-2.51-5.13-4.45-7.22-.97-1.03-2.05-1.95-3.2-2.75a21.14 21.14 0 0 0 -3.69-2.05c-1.3-.55-2.65-.97-4.03-1.26-1.38-.28-2.79-.42-4.2-.41-1.44-.02-2.88.1-4.29.37a21.906 21.906 0 0 0 -7.96 3.16c-1.21.78-2.34 1.68-3.38 2.68l-113.73 106.83c-2.72 2.72-8.04 0-8.69-3.18-.06-.28-.08-.57-.07-.86s.06-.58.15-.85c.08-.28.2-.55.35-.79.15-.25.33-.48.54-.68l87.05-99.12a21.38 21.38 0 0 0 6.82-15.3c.11-5.81-2.15-11.42-6.25-15.53-4.11-4.12-9.71-6.4-15.52-6.31s-11.34 2.53-15.32 6.77l-132.01 145.95c-4.73 4.73-11.7 4.97-15.02 2.22-.51-.4-.93-.9-1.24-1.46-.32-.56-.52-1.18-.6-1.82-.08-.65-.03-1.3.14-1.92s.46-1.21.85-1.72z",fill:"#fff"}))}function Ve(){return n("svg",{width:"16",height:"16",viewBox:"0 0 70 70"},n("path",{d:"M64 31.955l-.033-1.37V4.687l-7.16 7.16C50.948 4.674 42.033.093 32.05.093c-10.4 0-19.622 4.96-25.458 12.64l11.736 11.86a15.55 15.55 0 0 1 4.754-5.334c2.05-1.6 4.952-2.906 8.968-2.906.485 0 .86.057 1.135.163 4.976.393 9.288 3.14 11.828 7.124l-8.307 8.307L64 31.953",fill:"#1c3aa9"}),n("path",{d:"M31.862.094l-1.37.033H4.594l7.16 7.16C4.58 13.147 0 22.06 0 32.046c0 10.4 4.96 19.622 12.64 25.458L24.5 45.768a15.55 15.55 0 0 1-5.334-4.754c-1.6-2.05-2.906-4.952-2.906-8.968 0-.485.057-.86.163-1.135.393-4.976 3.14-9.288 7.124-11.828l8.307 8.307L31.86.095",fill:"#4285f4"}),n("path",{d:"M.001 32.045l.033 1.37v25.898l7.16-7.16c5.86 7.173 14.774 11.754 24.76 11.754 10.4 0 19.622-4.96 25.458-12.64l-11.736-11.86a15.55 15.55 0 0 1-4.754 5.334c-2.05 1.6-4.952 2.906-8.968 2.906-.485 0-.86-.057-1.135-.163-4.976-.393-9.288-3.14-11.828-7.124l8.307-8.307c-10.522.04-22.4.066-27.295-.005",fill:"#ababab"}))}function Re(){return n("svg",{width:"16",height:"16",viewBox:"18 30 37 34"},n("path",{d:"M52.107,37.991,38.249,30a3.992,3.992,0,0,0-1.919-.533A3.606,3.606,0,0,0,34.412,30L20.555,37.991a3.829,3.829,0,0,0-1.919,3.3V57.338a3.9,3.9,0,0,0,1.919,3.3l.959.533,4.423,2.558V56.326l10.393-5.969,10.393,5.969v7.355l4.423-2.558.959-.586a3.829,3.829,0,0,0,1.919-3.3V41.243A3.857,3.857,0,0,0,52.107,37.991ZM46.617,47.9,38.2,43a3.99,3.99,0,0,0-1.918-.533A3.607,3.607,0,0,0,34.359,43l-8.474,4.9V43.268l8.688-5.01a3.425,3.425,0,0,1,3.358,0l8.688,5.01Z",fill:"#50b95d"}))}function Ne(){return n("svg",{width:"16",height:"16",viewBox:"0 0 256 310"},n("path",{d:"M0 173.367l.985.52 15.49 1.762 19.455-1.082.856-.45-17.267-1.501-19.519.75z",fill:"#B6C99C"}),n("path",{d:"M128 .698L73.948 27.724V201.23L128 211.148l1.85-2.5V5.148L128 .699z",fill:"#4C612C"}),n("path",{d:"M128 .698v217.7l54.053-16.141V27.724L128 .698z",fill:"#769B3F"}),n("path",{d:"M219.214 174.117l.922.623 19.339 1.074 15.656-1.779.869-.669-19.52-.75-17.266 1.501z",fill:"#B6C99C"}),n("path",{d:"M219.214 210.153l20.27 2.627.543-.998v-35.397l-.543-1.141-20.27-1.126v36.035z",fill:"#4C612C"}),n("path",{d:"M36.786 210.153l-20.27 2.627-.342-.925v-36.001l.342-.61 20.27-1.126v36.035z",fill:"#769B3F"}),n("path",{d:"M125.748 208.651l-89.713-15.765-19.52 1.876.889.891 85.223 17.265.974-.513 22.147-3.754z",fill:"#B6C99C"}),n("path",{d:"M0 191.385v54.428L89.713 290.8v.055L128 310l1.6-3.002v-118.85l-1.6-3.746-38.287-3.753v28.888l-73.197-14.81v-19.483L0 173.367v18.018z",fill:"#4C612C"}),n("path",{d:"M128 209.026l21.771 3.754 2.804.118 85.285-17.129 1.624-1.007-19.144-1.877L128 209.026z",fill:"#B6C99C"}),n("path",{d:"M239.484 175.243v19.483l-73.196 14.811v-30.165L128 183.126V310l128-64.188v-72.446l-16.516 1.877z",fill:"#769B3F"}),n("path",{d:"M166.287 182.375L128 179.372l-38.288 3.003L128 186.13l38.287-3.754z",fill:"#B6C99C"}))}function Oe(){return n("svg",{width:"16",height:"16",viewBox:"0 0 54 54",fill:"#f38020",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M27.3146 7.26134C22.346 7.11258 17.5089 8.87182 13.7968 12.1778l1.2307-6.74308-3.1939-.58208L9.67207 16.6889 21.5124 18.8498 22.0945 15.6559l-6.0801-1.1096c2.9126-2.5542 6.6454-3.9781 10.5192-4.0126C30.4073 10.4993 34.1648 11.8565 37.1224 14.3585s4.9188 5.9826 5.5269 9.8085C43.2573 27.9929 42.4718 31.91 40.4356 35.2057c-2.0362 3.2956-5.1877 5.7509-8.8813 6.9191S23.8704 43.0965 20.3094 41.5711c-3.5609-1.5254-6.456-4.2784-8.1586-7.7582-1.7026-3.4797-2.0995-7.455-1.1185-11.2027L7.89023 21.7861c-1.02566 3.9081-.81053 8.0386.61559 11.8191C9.93194 37.3856 12.4985 40.629 15.8498 42.8861c3.3514 2.257 7.3217 3.4159 11.361 3.3162C31.2501 46.1025 35.1584 44.7491 38.3943 42.3294c3.2359-2.4196 5.6393-5.7858 6.8771-9.632C46.5092 28.8511 46.5202 24.7151 45.3029 20.8623c-1.2173-3.8528-3.6026-7.2317-6.8256-9.6685-3.2229-2.43693-7.124-3.81119-11.1627-3.93246z"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M38.8474 21.9189 35.9285 19 24.4761 30.4524l-4.5531-4.553L17 28.8224l7.4833 7.4832 2.923-2.923L27.3949 33.3713 38.8474 21.9189z"}))}function Ue(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"m2.244 13.081.943-2.803H6.66l.944 2.803H8.86L5.54 3.75H4.322L1 13.081h1.244zm2.7-7.923L6.34 9.314H3.51l1.4-4.156h.034zm9.146 7.027h.035v.896h1.128V8.125c0-1.51-1.114-2.345-2.646-2.345-1.736 0-2.59.916-2.666 2.174h1.108c.068-.718.595-1.19 1.517-1.19.971 0 1.518.52 1.518 1.464v.731H12.19c-1.647.007-2.522.8-2.522 2.058 0 1.319.957 2.18 2.345 2.18 1.06 0 1.716-.43 2.078-1.011zm-1.763.035c-.752 0-1.456-.397-1.456-1.244 0-.65.424-1.115 1.408-1.115h1.805v.834c0 .896-.752 1.525-1.757 1.525z"}))}function qe(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"20 40 220 220",fill:"#e52b50","fill-rule":"evenodd","clip-rule":"evenodd"},n("g",null,n("path",{d:"M 69.5,77.5 C 79.233,77.1091 88.8997,77.6091 98.5,79C 112.532,83.3672 120.365,92.8672 122,107.5C 122.667,124.833 122.667,142.167 122,159.5C 119.43,178.383 108.596,188.55 89.5,190C 77.1659,191.171 66.8326,187.338 58.5,178.5C 57.5007,193.152 57.1674,207.818 57.5,222.5C 51.6973,223.087 46.1973,222.42 41,220.5C 40.3333,184.167 40.3333,147.833 41,111.5C 42.4489,93.2316 51.9489,81.8983 69.5,77.5 Z M 77.5,91.5 C 92.4836,89.7086 101.65,96.0419 105,110.5C 105.667,125.833 105.667,141.167 105,156.5C 101.267,171.296 91.7671,177.462 76.5,175C 64.9759,172.125 58.8092,164.625 58,152.5C 57.3333,139.5 57.3333,126.5 58,113.5C 59.1531,101.191 65.6531,93.8582 77.5,91.5 Z"})),n("g",null,n("path",{d:"M 151.5,77.5 C 155.273,77.2633 158.94,77.7633 162.5,79C 170.65,87.9844 178.984,96.8177 187.5,105.5C 196.374,96.1272 205.374,86.9606 214.5,78C 218.782,77.0349 222.782,77.7016 226.5,80C 231.387,84.8874 236.221,89.7208 241,94.5C 242.899,98.1361 242.899,101.803 241,105.5C 231.935,114.642 223.102,123.975 214.5,133.5C 222.118,142.62 230.284,151.286 239,159.5C 242.597,163.411 243.263,167.744 241,172.5C 234.842,179.997 227.509,185.997 219,190.5C 217.5,190 216,189.5 214.5,189C 205.127,180.803 196.294,171.969 188,162.5C 178.9,170.267 170.4,178.767 162.5,188C 160.162,188.837 157.828,189.67 155.5,190.5C 153.618,189.469 151.618,188.635 149.5,188C 144,183.167 138.833,178 134,172.5C 133.146,168.375 133.48,164.375 135,160.5C 141.198,153.968 147.698,147.801 154.5,142C 162.161,138.685 170.161,137.685 178.5,139C 181.698,139.848 184.531,141.348 187,143.5C 190.071,140.352 192.904,137.019 195.5,133.5C 193.111,130.034 190.278,127.034 187,124.5C 175.405,131.295 163.905,131.128 152.5,124C 146.64,118.14 140.806,112.306 135,106.5C 133.48,102.625 133.146,98.6251 134,94.5C 139.782,88.5481 145.615,82.8814 151.5,77.5 Z M 155.5,91.5 C 163.356,98.5222 170.689,106.022 177.5,114C 170.832,117.407 164.499,116.741 158.5,112C 155.167,107.333 151.167,103.333 146.5,100C 149.396,96.9343 152.396,94.1009 155.5,91.5 Z M 218.5,91.5 C 221.751,93.3492 224.585,95.6826 227,98.5C 227.667,99.5 227.667,100.5 227,101.5C 219.707,108.628 212.54,115.961 205.5,123.5C 202.323,120.822 199.323,117.988 196.5,115C 204.064,107.384 211.397,99.5509 218.5,91.5 Z M 204.5,143.5 C 212.846,150.846 220.513,158.846 227.5,167.5C 224.804,170.273 221.971,172.94 219,175.5C 211.445,167.614 203.945,159.78 196.5,152C 199.427,149.245 202.094,146.411 204.5,143.5 Z M 166.5,150.5 C 170.463,150.089 174.13,150.922 177.5,153C 170.69,160.737 163.523,168.237 156,175.5C 153.063,172.947 150.23,170.281 147.5,167.5C 152.502,160.194 158.836,154.528 166.5,150.5 Z"})))}function kt(){let t=H.runtime.getManifest();return n("footer",null,n("a",{href:x.github.release.url,target:"_blank"},t.version_name??t.version),n("a",{href:x.www.url,target:"_blank"},"\xA9 2022 - ",new Date().getUTCFullYear()," NopeCHA"))}function T({title:t,leftAction:e,rightAction:o}){return n("nav",null,n("div",{class:e?"center":"invisible"},e),n("h1",null,t),n("div",{class:o?"center":"invisible"},o))}function At({goal:t,onGoal:e}){let[o,a]=w(We(t));return k(()=>{let s=setInterval(()=>{a(We(t))},1e3);return()=>clearInterval(s)},[t]),k(()=>{o==="00:00:00"&&e?.()},[o]),n("span",{class:"mono",title:"Time remaining"},o)}function We(t){let e=Math.max(0,t-new Date().getTime()/1e3)^0,o=e/3600^0;e%=3600;let a=e/60^0;e%=60;let s=e^0,i=Intl.NumberFormat(void 0,{minimumIntegerDigits:2});return[o,a,s].map(i.format).join(":")}var dt={icon:Le,name:"Auto-Open",description:"Automatically opens CAPTCHA challenges.",id:"auto_open",type:0},N={icon:Te,name:"Auto-Solve",description:"Automatically solves CAPTCHA challenges.",id:"auto_solve",type:0},O={icon:Pe,name:"Delay Solving",description:"Adds a delay to avoid detection.",id:"solve_delay",type:0},U={icon:He,name:"Delay Timer",description:"Milliseconds to delay solving.",placeholder:"Enter delay",id:"solve_delay_time",type:1},q=[{icon:Ee,name:"hCaptcha",id:"hcaptcha",href:x.www.demo.hcaptcha.url,options:[dt,N,O,U]},{icon:Ve,name:"reCAPTCHA",id:"recaptcha",href:x.www.demo.recaptcha.url,options:[dt,N,O,U]},{icon:Re,name:"FunCAPTCHA",id:"funcaptcha",href:x.www.demo.funcaptcha.url,options:[dt,N,O,U]},{icon:Ne,name:"AWS CAPTCHA",id:"awscaptcha",href:x.www.demo.awscaptcha.url,options:[dt,N,O,U]},{icon:Oe,name:"Cloudflare Turnstile",disclaimer:"Currently NopeCHA only clicks the button, it does not currently bypass other browser checks.",id:"turnstile",href:x.www.demo.turnstile.url,options:[N,O,U]},{icon:Ue,name:"Text CAPTCHA",id:"textcaptcha",href:x.www.demo.textcaptcha.url,options:[N,O,U,{icon:xt,name:"Image Element",description:"CSS selector for the captcha image.",placeholder:"Enter CSS",id:"image_selector",type:2},{icon:xt,name:"Input Element",description:"CSS selector for the captcha input.",placeholder:"Enter CSS",id:"input_selector",type:2}]},{icon:qe,name:"Human (PerimeterX)",disclaimer:"Currently NopeCHA only holds the button, it does not currently bypass other browser checks.",id:"perimeterx",href:x.www.demo.perimeterx.url,options:[N,O,U]}];function j(t,e){if("field"in t)return e[t.field];if("value"in t)return t.value;if("condition"in t){let s=j(t.condition,e);return t.type==="NOT"?!s:t.type==="PLUS"?+s:-s}let o=j(t.left,e);if(t.type==="AND"&&!o)return o;if(t.type==="OR"&&o)return o;let a=j(t.right,e);switch(t.type){case"EQ":return o===a;case"NEQ":return o!==a;case"LT":return oa;case"GE":return o>=a;case"AND":return o&&a;case"OR":return o||a;case"ADD":return o+a;case"SUB":return o-a;case"MULT":return o*a;case"DIV":return o/a;case"MOD":return o%a}}var pt=[];try{let t=localStorage.getItem("dismissed");t&&pt.push(...JSON.parse(t))}catch{}function dn({text:t,id:e,href:o,urgent:a}){let[s,i]=w(pt.includes(e));return e&&e.startsWith("!")&&document.documentElement?.remove(),s&&e?null:n("div",{class:`banner${a?" urgent":""}`},n("div",null),o?n("a",{target:"_blank",href:o},t):n("span",null,t),e?n("button",{onClick:()=>{i(!0),pt.push(e),localStorage.setItem("dismissed",JSON.stringify(pt))},title:"Dismiss"},n($e,null)):n("div",null))}function W({status:t,location:e}){let[o,a]=w();if(k(()=>{if(me){let u=localStorage.getItem("announcements");u&&a(JSON.parse(u));let d=localStorage.getItem("announcements:last-fetched");if(d&&+d>new Date().getTime()-36e5)return}fetch(`${x.www.annoucement.url}`).then(u=>u.json()).then(u=>{a(u),localStorage.setItem("announcements",JSON.stringify(u)),localStorage.setItem("announcements:last-fetched",""+new Date().getTime())})},[]),!o)return;let s=M(),i=H.runtime.getManifest().version.split(".").map(u=>+u);for(;i.length<4;)i.push(0);let c={bucket:pn(),time:new Date().getTime(),version:i.reverse().reduce((u,d,r)=>u|(d?d<<8*r:0),0),status:t&&!("error"in t),"flag.automation":!1,"flag.debug":!1,...t?Fe(t,"status."):[],...Fe(s,"settings.")},l=o.filter(u=>u.location===e).filter(u=>j(u.condition,c));return n(y,null,l.map(u=>n(dn,{...u.banner})))}function Fe(t,e){return Object.fromEntries(Object.entries(t).map(([o,a])=>[e+o,a]))}function pn(){let t=localStorage.getItem("bucket");if(t!==null)return+t;let e=Math.random();return localStorage.setItem("bucket",""+e),e}function Mt(t){let[e,o]=w(M().enabled);return n(y,null,n(T,{title:"NopeCHA",leftAction:n("button",{onClick:()=>t.setState([3,""]),class:"center"},n(ye,null)),rightAction:n("button",{class:"power","data-enabled":e,onClick:()=>{o(!e),h("settings::update",[{enabled:!e}])}},n(Ie,null))}),n("main",null,n(W,{status:t.status,location:"main"}),n(mn,{...t}),n(Cn,{setState:t.setState})),n(kt,null))}function mn({status:t,refreshing:e,refresh:o}){return n("div",{class:"status"},n(wn,{status:t,refreshing:e,refresh:o}),"error"in t?n("div",{class:"warning center"},t.error===12?n(y,null,n("p",null,"Your IP is ineligible for free credits."),n("p",null,n("a",{href:x.www.pricing.url,target:"_blank"},"Purchase a key")," ","to use with VPN/proxy.")):t.error===17?n(y,null,n("p",null,"You are using an outdated extension version."),n("a",{href:x.github.release.url,target:"_blank"},"Download newest release")):t.message??"Unknown error, contact support."):n(_n,{status:t,refresh:()=>!e&&o()}))}var fn=["Enterprise","Admin"],gn=["Free","GitHub","Discord"];function _n({status:t,refresh:e}){let o=mt(t),a=typeof t.duration>"u"&&typeof t.lastreset>"u",s=Ze(t),i=hn(t),c=s<=Math.max(i/100,10),l=s<=i/2,u="";return a||o?u="Refills":t.duration<0?u="Expires in":u="Refills in",k(()=>{let d=document.querySelector("#prog-credit");if(d){let m=i!==0?Math.min(Math.floor(100*s/i),100):0;(o||a)&&(m=0),d.dataset.per=`${m}%`,d.style.width=`${m}%`}let r=document.querySelector("#prog-timeleft");if(r&&typeof t.lastreset<"u"&&typeof t.duration<"u"){let m=Math.min(Math.floor(100*(1-t.ttl/Math.abs(t.duration))),100);t.duration<0&&(m=100-m),(o||a)&&(m=0),r.dataset.per=`${m}%`,r.style.width=`${m}%`}},[t]),n(y,null,n("div",null,n("span",null,"Credits"),n("span",null)),n("div",{class:"border-botton"},n("span",{class:a||o||c?"value color-danger":l?"value color-warning":"value",title:"Credits remaining"},vn(t)),n("div",{class:"prog-main"},n("div",{class:"prog-bar"},n("div",{id:"prog-credit",class:"prog-per","data-per":"0%"})))),n("div",null,n("span",null,u),n("span",null)),n("div",null,n("span",{class:a||o?"value color-danger":"value"},a||o?"Unavailable":n(At,{goal:t.ttl+Date.now()/1e3,onGoal:()=>setTimeout(e,1500)})),n("div",{class:"prog-main"},n("div",{class:"prog-bar"},n("div",{id:"prog-timeleft",class:"prog-per","data-per":"0%"})))))}function mt(t){return!("status"in t&&typeof t.status<"u"&&t.status==="Active")}function Ze(t){let e=typeof t.credit<"u";return mt(t)?0:e?t.credit:0}function hn(t){let e=typeof t.quota<"u";return mt(t)?0:e?t.quota:0}function vn(t){return`${Ze(t).toLocaleString()}`}function bn(t){return"status"in t&&typeof t.status<"u"?t.status:""}function wn({status:t,refreshing:e,refresh:o}){let[a,s]=w(!1),[i,c]=w(""),l=mt(t);return k(()=>{a&&c(M().key)},[a]),n(y,null,n("div",null,n("span",{title:"Plan name",class:"plan"in t?"":"color-danger"},"plan"in t?`${t.plan} Plan`:"Unavailable"),a?n("div",{class:"key-input-wrapper"},n("input",{class:"key-input",type:"text",value:i,autoComplete:"off",spellcheck:!1,placeholder:"Enter your key",autofocus:!0,onInput:u=>{let d=u.currentTarget.value;c(d),d.length>i.length+1&&h("settings::update",[{key:d}]).then(o)},onChange:u=>c(u.currentTarget.value),onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),s(!1),h("settings::update",[{key:u.currentTarget.value}]).then(o))},onBlur:u=>{s(!1),h("settings::update",[{key:u.currentTarget.value}]).then(o)}})):n("span",null,n("button",{class:"key-icon font-normal color-brand",title:"Click to edit",onClick:()=>{s(!0)},disabled:e,onMouseUp:()=>{setTimeout(()=>{document.querySelector(".key-input")?.select()},10)}},!("key"in t)||"key"in t&&t.key===""?"Enter your key":"Change key",n(xe,null)))),n("div",{class:"border-botton"},n("span",{class:l?"value color-danger":"value",title:"Plan status"},bn(t)),n("a",{href:x.www.manage.url,target:"_blank",class:"key-icon font-normal color-brand",title:"Manage or upgrade plan"},!("plan"in t)||gn.includes(t.plan)?"Create a key":fn.includes(t.plan)?"Manage keys":"Upgrade",n("svg",{class:"link-icon",fill:"currentColor",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16"},n("path",{d:"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"})))))}function Cn({setState:t}){let[e,o]=w({}),a=i=>{let c=!e[i];o({...e,[i]:c}),h("settings::update",[{[i]:c}])},s=i=>{let c=!((!(`${i}_auto_open`in e)||e[`${i}_auto_open`])&&(!(`${i}_auto_solve`in e)||e[`${i}_auto_solve`]));`${i}_auto_open`in e&&e[`${i}_auto_open`]!==c&&a(`${i}_auto_open`),`${i}_auto_solve`in e&&e[`${i}_auto_solve`]!==c&&a(`${i}_auto_solve`)};return k(()=>{let i=M();o({...i})}),n("ol",{class:"captchas"},q.map(i=>n("li",{key:i.name},n("button",{onClick:()=>{t([5,i.id])},class:"icon"},n("span",null,i.icon?n(i.icon,null):n("div",{class:"no-icon"}),i.name),`${i.id}_auto_open`in e||`${i.id}_auto_solve`in e?n("span",{class:"inline-switch"},n("button",{class:"switch small",checked:(!(`${i.id}_auto_open`in e)||e[`${i.id}_auto_open`])&&(!(`${i.id}_auto_solve`in e)||e[`${i.id}_auto_solve`]),onClick:c=>{c.stopPropagation(),s(i.id)}})):"",n(R,null)))))}var yn=[{name:"Documentation and Guides",href:x.doc.url,icon:Se},{name:"Homepage",href:x.www.url,icon:ke},{name:"Discord",href:x.discord.url,icon:Me},{name:"Github",href:x.github.url,icon:Ae}];function Lt({setState:t}){return n(y,null,n(T,{title:"Settings",leftAction:n("button",{onClick:()=>t([2,""]),class:"center"},n(z,null))}),n("main",null,n(W,{location:"settings"}),n("ol",null,n("li",null,n("button",{onClick:()=>t([4,""]),class:"icon"},n("span",null,n(ze,null),"Disabled Hosts"),n(R,null))),n("li",null,n("button",{onClick:()=>{let e=M(),o=Object.entries(e).map(([a,s])=>a==="key"?s:a==="version"?"":`${a}=${s}`).filter(a=>a).join("|");open(`${x.www.setup.url}#${o}`)},class:"icon"},n("span",null,n(ut,null),"Export Settings"),n(R,null))),n("li",null,n("button",{onClick:()=>t([6,""]),class:"icon"},n("span",null,n(ut,null),"Debug"),n(R,null))),n("li",null,n("button",{onClick:()=>t([7,""]),class:"icon"},n("span",null,n(ut,null),"Logs"),n(R,null)))),n("hr",null),n("h2",null,"Links"),n("ol",null,yn.map(e=>n("li",{key:e.name},n("a",{href:e.href,target:"_blank",class:"icon"},n("span",null,n(e.icon,null),e.name),n(Be,null)))))))}function xn(){return new Promise(t=>{H.tabs.query({active:!0,currentWindow:!0},([e])=>t(e))})}async function ft(){let t=await xn();return t&&t.url&&new URL(t.url).href}function Tt({setState:t}){let[e,o]=w(""),[a,s]=w(M().disabled_hosts);return k(()=>{ft().then(i=>i&&o(new URL(i).hostname))},[]),n(y,null,n(T,{title:"Disabled Hosts",leftAction:n("button",{onClick:()=>t([3,""]),class:"center"},n(z,null))}),n("main",{id:"hosts"},n("h3",null,"Current Page"),n("ol",null,n("li",null,e===""?n("button",{class:"icon cursor-normal"},"cannot disable on this page"):n("button",{class:"icon",title:a.includes(e)?"Remove disabled host":"Disable NopeCHA on this site",onClick:()=>{let i=a.includes(e)?a.filter(c=>c!==e):[...a,e];h("settings::update",[{disabled_hosts:i}]),s(i)}},e,a.includes(e)?n(St,null):n(De,null)))),n("h3",null,"Disabled Hosts"),n("ol",null,a.length===0?n("li",null,n("button",{class:"icon cursor-normal"},"no disabled hosts")):a.map(i=>n("li",{key:i},n("button",{class:"icon",title:"Remove disabled host",onClick:()=>{let c=a.filter(l=>l!==i);h("settings::update",[{disabled_hosts:c}]),s(c)}},i,n(St,null)))))))}function Pt({setState:t,captcha:e}){return n(y,null,n(T,{title:e.name,leftAction:n("button",{onClick:()=>t([2,""]),class:"center"},n(z,null)),rightAction:n("a",{href:e.href,target:"_blank"},e.icon?n(e.icon,null):n("div",{class:"no-icon"}))}),n("main",null,n(W,{location:`captcha:${e.id}`}),e.disclaimer&&n("div",{class:"warning center"},e.disclaimer),n("div",{id:"captcha"},e.options.map(o=>n(Je,{captcha:e,option:o})))))}var Sn={[0]:function({captcha:e,option:o}){let a=`${e.id}_${o.id}`,[s,i]=w(M()[a]);return n("button",{class:"switch",checked:s,onClick:()=>{i(!s),h("settings::update",[{[a]:!s}])}})},[2]:function({captcha:e,option:o}){let a=`${e.id}_${o.id}`;return n("button",{type:"button",class:"locate",onClick:async()=>{try{this.disabled=!0,await h("locator::inject",[]),await lt(500),await h("tab::broadcast",[{action:"start_locate",locate:a}])}finally{this.disabled=!1}}},"Locate on page")}};function je({captcha:t,option:e,inputType:o}){let a=`${t.id}_${e.id}`,[s,i]=w(M()[a]);return k(()=>{let c=setTimeout(()=>{h("settings::update",[{[a]:s}])},2e3);return()=>clearTimeout(c)},[s]),n("input",{type:o,autocomplete:"off",spellcheck:!1,placeholder:e.placeholder,value:s,onInput:c=>{i(c.currentTarget.value),h("settings::update",[{[a]:c.currentTarget.value}])},onKeyPress:c=>{c.key==="Enter"&&h("settings::update",[{[a]:c.currentTarget.value}])},onChange:c=>{i(c.currentTarget.value),h("settings::update",[{[a]:c.currentTarget.value}])},onBlur:c=>{h("settings::update",[{[a]:c.currentTarget.value}])}})}var kn={[1]:function({captcha:e,option:o}){return n(je,{captcha:e,option:o,inputType:"number"})},[2]:function({captcha:e,option:o}){return n(je,{captcha:e,option:o,inputType:"text"})}};function Je({captcha:t,option:e}){let o=Sn[e.type],a=kn[e.type];return n("div",null,n("div",{class:"icon"},n("h3",null,n(e.icon,null),e.name),o&&n(o,{captcha:t,option:e})),n("div",null,e.description,a&&n(a,{captcha:t,option:e})))}var Ht=H.runtime.getManifest(),Ge=[{name:"OS",value:navigator.platform},{name:"Target",value:["chromium",3]},{name:"Machine",value:["browser"in window?"firefox":"chromium",Ht.manifest_version]},{name:"Version",value:[Ht.version,Ht.version_name]},{name:"Build flags",value:[!1,!1].filter(t=>t)},{name:"User-Agent",value:navigator.userAgent}];function zt({setState:t}){let[e,o]=w([]);k(()=>{(async()=>{let s=M(),i=null;try{i=new URL(await ft()).href}catch{}let c=null;i&&(c=await h("tab::getDetectedCaptchas",[]));let l=new Date().getTime(),u=await h("api::fetchStatus",[]),d=new Date().getTime();o([{name:"Subscription key",value:s.key},{name:"Status",value:u},{name:"Status latency",value:`${Math.floor(d-l)}ms`},{name:"Enabled CAPTCHAs",value:q.filter(r=>s[`${r.id}_auto_solve`]).map(r=>r.name)},{name:"Global switch",value:s.enabled},{name:"Page URL",value:i},{name:"Detected CAPTCHAs",value:c}])})()},[]);let a=null;return n(y,null,n(T,{title:"Debug",leftAction:n("button",{onClick:()=>t([3,""]),class:"center"},n(z,null))}),n("div",{id:"debug"},n("button",{onClick:()=>{let s=[...Ge,...e].map(({name:i,value:c})=>`**${i}**: \`${JSON.stringify(c)}\``).join(` +`);navigator.clipboard.writeText(s),document.querySelector("#copy").classList.add("hidden"),document.querySelector("#copied").classList.remove("hidden"),document.querySelector("#debug button").classList.add("cursor-normal"),clearTimeout(a),a=setTimeout(()=>{document.querySelector("#copy").classList.remove("hidden"),document.querySelector("#copied").classList.add("hidden"),document.querySelector("#debug button").classList.remove("cursor-normal")},1e3)},class:"center"},e.length?n("div",{id:"copy-text"},n("div",{id:"copy"},"Copy to clipboard"),n("div",{id:"copied",class:"hidden"},"Copied!")):n("div",{id:"loading-text"},n("div",{class:"loading"},n("div",null),n("div",null),n("div",null),n("div",null)))),[...Ge,...e].map(({name:s,value:i})=>n("div",{key:s},n("h3",null,s),n("p",null,JSON.stringify(i))))))}function B(t,e){let o=document.createElement("canvas");return o.width=t,o.height=e,o}function $(t){return new Promise((e,o)=>{let a=new Image;a.onload=()=>e(a),a.onerror=s=>o(s),a.src=`data:image/png;base64,${t}`})}function E(t){return t.toDataURL("image/jpeg").replace(/data:image\/[a-z]+;base64,/g,"")}function An(t){let e={};return t.options.body&&(e.type=t.options.body.type,e.task=t.options.body.task,e.key=t.options.body.key,e.url=t.options.body.url),{...e}}async function Xe(t,e=100,o=100){let a=await $(t),s=a.width,i=a.height,c=s/i,l=s,u=i;if(l>e&&(l=e,u=Math.floor(l/c)),u>o&&(u=o,l=Math.floor(u*c)),l===s&&u===i)return{imageData:t,width:s,height:i};let d=B(s,i);d.getContext("2d").drawImage(a,0,0);let m=B(l,u);return m.getContext("2d").drawImage(d,0,0,s,i,0,0,l,u),{imageData:E(m),width:l,height:u}}async function Bt(t,e,o){let a=await $(t),i=B(a.width,a.height).getContext("2d");i.drawImage(a,0,0);let c=a.width/o,l=a.height/e,u=[];for(let d=0;dawait $(l))),i=B(100*o,100*e),c=i.getContext("2d");for(let l=0;l0&&(s.data[l+1]=Math.min(s.data[l+1]+100,255));a.putImageData(s,0,0);let i=2,c=2;return a.beginPath(),a.strokeStyle="green",a.lineWidth=i,a.rect(c,c,e.width-(i+c),e.height-(i+c)),a.stroke(),E(o)}async function Mn(t,e,o){let a=await $(t),s=B(a.width,a.height),i=s.getContext("2d");return i.drawImage(a,0,0),i.beginPath(),e=e/100*a.width,o=o/100*a.height,i.arc(e,o,10,0,2*Math.PI),i.fillStyle="red",i.fill(),E(s)}async function Ln(t,e,o,a,s){let i=await $(t),c=B(i.width,i.height),l=c.getContext("2d");return l.drawImage(i,0,0),l.beginPath(),e=e/100*i.width,o=o/100*i.height,a=a/100*i.width,s=s/100*i.height,l.rect(e,o,a,s),l.strokeStyle="red",l.lineWidth=5,l.stroke(),E(c)}function It({setState:t}){let[e,o]=w([]);async function a(){let i=await h("log::getLogs",[]),c=JSON.parse(i);c.sort((l,u)=>u.postreq.time-l.postreq.time);for(let l of c)if(l.postreq.options.method==="POST"){l.audio=null,l.images=[];let u=l.postreq.options.body.audio_data;u&&(l.audio=`data:audio/wav;base64,${u}`);let d=l.postreq.options.body.image_data;if(d){if(d.length===1){let r=await Xe(d[0],300,300),{imageData:m,width:f,height:p}=r;if(l.answer){if(typeof l.answer=="object"&&"x"in l.answer&&"y"in l.answer&&"w"in l.answer&&"h"in l.answer&&(l.answer.w>0||l.answer.h>0))m=await Ln(m,l.answer.x,l.answer.y,l.answer.w,l.answer.h);else if(typeof l.answer=="object"&&"x"in l.answer&&"y"in l.answer)m=await Mn(m,l.answer.x,l.answer.y);else if(Array.isArray(l.answer)&&"grid"in l.postreq.options.body)if(l.postreq.options.body.grid==="4x4"){let g=await Bt(m,4,4);for(let b=0;b{a()},[]);let s=null;return n(y,null,n(T,{title:"Logs",leftAction:n("button",{onClick:()=>t([3,""]),class:"center"},n(z,null))}),n("div",{id:"logs"},n("button",{class:"center",onClick:async()=>{document.querySelector("#loading-text").classList.remove("hidden"),document.querySelector("#refresh-text").classList.add("hidden"),document.querySelector("#logs button").classList.add("cursor-normal"),document.querySelector("#no-logs")?.classList?.add("hidden"),await a(),clearTimeout(s),s=setTimeout(()=>{document.querySelector("#loading-text").classList.add("hidden"),document.querySelector("#refresh-text").classList.remove("hidden"),document.querySelector("#logs button").classList.remove("cursor-normal"),document.querySelector("#no-logs")?.classList?.remove("hidden")},1e3)}},n("div",{id:"refresh-text"},"Refresh"),n("div",{id:"loading-text",class:"hidden"},n("div",{class:"loading"},n("div",null),n("div",null),n("div",null),n("div",null)))),!e.length&&n("h3",{id:"no-logs"},"No logs"),e.map(({id:i,postreq:c,audio:l,images:u,answer:d})=>n("div",{"data-id":i,key:i,class:"log"},n("h3",null,"Submitted ",((Date.now()-c.time)/1e3).toFixed(1),"s ago"),n("p",{class:"mono color-muted"},JSON.stringify(An(c),null,2)),l?n("div",{style:"width: 280px; overflow: auto;"},n("audio",{controls:!0,src:l})):"",u?n(y,null,u.map(([r,m,f])=>n("img",{src:r,width:m-20,height:f}))):"",d?n("p",{class:"mono"},JSON.stringify(d)):n("p",{class:"mono"},"solution not yet available")))))}function $t(){let[t,e]=w([0,""]),[o,a]=w(null),[s,i]=w(!0),[c,l]=w(!1),u=async()=>{i(!0);let d=await h("api::fetchStatus",[]);a(d),i(!1)};return k(()=>{if(t[0]===0){Ce();let d=setTimeout(()=>{l(!0)},2e3);return be().then(r=>{r?e([1,""]):l(!0)}),()=>{clearTimeout(d)}}t[0]===1&&h("api::getCachedStatus",[]).then(d=>{d&&(a(d),e([2,""])),u().then(()=>{d||e([2,""])})})},[t]),n("div",{id:"app"},t[0]===0?n(ct,null,c?n("div",{class:"warning center"},n("p",null,"It appears the background service has crashed."),n("a",{href:"chrome://extensions/",target:"_blank"},"Please reload the extension.")):n("span",null,"Loading your settings...")):t[0]===1?n(ct,null,"Connecting to servers..."):t[0]===2?n(Mt,{status:o,setState:e,refreshing:s,refresh:u}):t[0]===3?n(Lt,{setState:e}):t[0]===4?n(Tt,{setState:e}):t[0]===5?n(Pt,{setState:e,captcha:q.find(d=>d.id===t[1])}):t[0]===6?n(zt,{setState:e}):t[0]===7?n(It,{setState:e}):n("p",null,"How did you get here"))}[...document.body.children].forEach(t=>t.remove());ee(n($t,{}),document.body);})(); diff --git a/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/setup.html b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/setup.html new file mode 100644 index 0000000..63fb6c4 --- /dev/null +++ b/ninjemail/captcha_solvers/NopeCHA-CAPTCHA-Solver/setup.html @@ -0,0 +1,18 @@ + + + + + + NopeCHA + + + +

+ If you can see this, please make sure setup.js is not + corrupted. +

+ + + diff --git a/ninjemail/captcha_solvers/noptcha-0.4.9.xpi b/ninjemail/captcha_solvers/noptcha-0.4.9.xpi new file mode 100644 index 0000000..112bb12 Binary files /dev/null and b/ninjemail/captcha_solvers/noptcha-0.4.9.xpi differ diff --git a/ninjemail/config.toml b/ninjemail/config.toml index b57e8de..c9316b6 100644 --- a/ninjemail/config.toml +++ b/ninjemail/config.toml @@ -1,5 +1,5 @@ # config.toml -CAPTCHA_SERVICES_SUPPORTED = ["capsolver"] +CAPTCHA_SERVICES_SUPPORTED = ["capsolver", "nopecha"] DEFAULT_CAPTCHA_SERVICE = "capsolver" SMS_SERVICES_SUPPORTED = ["getsmscode", "smspool", "5sim"] DEFAULT_SMS_SERVICE = "smspool" @@ -7,8 +7,8 @@ SUPPORTED_BROWSERS = ['firefox', 'chrome', 'undetected-chrome'] [[SUPPORTED_SOLVERS_BY_EMAIL]] email_service = "outlook" -solvers = ["capsolver"] +solvers = ["capsolver", "nopecha"] [[SUPPORTED_SOLVERS_BY_EMAIL]] email_service = "yahoo" -solvers = ["capsolver"] +solvers = ["capsolver", "nopecha"] diff --git a/ninjemail/ninjemail_manager.py b/ninjemail/ninjemail_manager.py index a747918..b44ac98 100644 --- a/ninjemail/ninjemail_manager.py +++ b/ninjemail/ninjemail_manager.py @@ -123,7 +123,7 @@ def get_captcha_key(self, email_provider): """ for solver in self.supported_solvers_by_email.get(email_provider.lower(), []): if solver in self.captcha_keys: - return self.captcha_keys[solver] + return {"name": solver, "key": self.captcha_keys[solver]} logging.info(f'Supported captcha solving services for {email_provider} are: { self.supported_solvers_by_email[email_provider.lower()]}') raise ValueError(f"No captcha key provided for email provider: {email_provider}") diff --git a/ninjemail/tests/test_manager.py b/ninjemail/tests/test_manager.py index d68e40f..2944589 100644 --- a/ninjemail/tests/test_manager.py +++ b/ninjemail/tests/test_manager.py @@ -56,7 +56,7 @@ def test_get_captcha_key_valid_provider(mocker): """Tests get_captcha_key with a valid email provider and key.""" mocker.patch.dict('ninjemail_manager.SUPPORTED_SOLVERS_BY_EMAIL', {'outlook': ['solver1']}) manager = Ninjemail(captcha_keys={"solver1": "key"}) - assert manager.get_captcha_key('outlook') == "key" + assert manager.get_captcha_key('outlook') == {"name" : "solver1", "key": "key"} def test_get_captcha_key_invalid_provider(): diff --git a/ninjemail/tests/test_webdriver_utils.py b/ninjemail/tests/test_webdriver_utils.py index e540d37..f95bd01 100644 --- a/ninjemail/tests/test_webdriver_utils.py +++ b/ninjemail/tests/test_webdriver_utils.py @@ -44,6 +44,7 @@ def mock_firefox_addon(*args, **kwargs): monkeypatch.setattr('selenium.webdriver.Firefox.install_addon', mock_firefox_addon) monkeypatch.setattr('selenium.webdriver.Firefox.get', MagicMock()) monkeypatch.setattr('selenium.webdriver.Firefox.find_element', MagicMock()) + monkeypatch.setattr('selenium.webdriver.Chrome.get', MagicMock()) monkeypatch.setattr('selenium.webdriver.Chrome.quit', mock_chrome_quit) monkeypatch.setattr('undetected_chromedriver.Chrome.quit', mock_chrome_quit) @@ -66,13 +67,18 @@ def test_create_undetected_chrome_driver(): assert isinstance(driver, uc.Chrome) driver.quit() -def test_create_undetected_chrome_driver_with_proxy_and_captcha(): - driver = create_driver('undetected-chrome', captcha_extension=True, proxy='http://10.10.10.1:2020', captcha_key='test_key') +def test_create_undetected_chrome_driver_with_proxy_and_capsolver(): + driver = create_driver('undetected-chrome', captcha_extension=True, proxy='http://10.10.10.1:2020', captcha_key={'name': 'capsolver', 'key': 'test_key'}) assert isinstance(driver, uc.Chrome) driver.quit() -def test_create_undetected_chrome_driver_with_auth_proxy_and_captcha(): - driver = create_driver('undetected-chrome', captcha_extension=True, proxy='http://user:pass@10.10.10.1:2020', captcha_key='test_key') +def test_create_undetected_chrome_driver_with_proxy_and_nopecha(): + driver = create_driver('undetected-chrome', captcha_extension=True, proxy='http://10.10.10.1:2020', captcha_key={'name': 'nopecha', 'key': 'test_key'}) + assert isinstance(driver, uc.Chrome) + driver.quit() + +def test_create_undetected_chrome_driver_with_auth_proxy_and_nopecha(): + driver = create_driver('undetected-chrome', captcha_extension=True, proxy='http://user:pass@10.10.10.1:2020', captcha_key={'name': 'nopecha', 'key': 'test_key'}) assert isinstance(driver, uc.Chrome) driver.quit() @@ -104,14 +110,19 @@ def test_create_chrome_driver_with_auth_proxy(): assert isinstance(driver, Chrome) driver.quit() -def test_create_chrome_driver_with_proxy_and_captcha(): - driver = create_driver('chrome', captcha_extension=True, proxy='http://10.10.10.1:2020', captcha_key='test_key') +def test_create_chrome_driver_with_proxy_and_nopecha(): + driver = create_driver('chrome', captcha_extension=True, proxy='http://10.10.10.1:2020', captcha_key={'name': 'nopecha', 'key': 'test_key'}) + assert isinstance(driver, Chrome) + driver.quit() + +def test_create_chrome_driver_with_proxy_and_capsolver(): + driver = create_driver('chrome', captcha_extension=True, proxy='http://10.10.10.1:2020', captcha_key={'name': 'capsolver', 'key': 'test_key'}) assert isinstance(driver, Chrome) driver.quit() def test_create_firefox_driver_with_captcha_extension(): - driver = create_driver('firefox', captcha_extension=True, captcha_key='test_key') + driver = create_driver('firefox', captcha_extension=True, captcha_key={'name': 'capsolver', 'key': 'test_key'}) assert isinstance(driver, Firefox) driver.quit() diff --git a/ninjemail/utils/webdriver_utils.py b/ninjemail/utils/webdriver_utils.py index 66db9f1..eadda28 100644 --- a/ninjemail/utils/webdriver_utils.py +++ b/ninjemail/utils/webdriver_utils.py @@ -65,7 +65,7 @@ def create_background_file(background_js): return folder_path -def create_driver(browser, captcha_extension=False, proxy=None, captcha_key=None): +def create_driver(browser, captcha_extension=False, proxy=None, captcha_key={}): """ Create a WebDriver instance for the specified browser with optional configurations. @@ -73,6 +73,7 @@ def create_driver(browser, captcha_extension=False, proxy=None, captcha_key=None browser (str): The name of the browser to use. Currently supports 'firefox' and 'chrome'. captcha_extension (bool, optional): Whether to enable a captcha solving extension (default is False). proxy (str, optional): Proxy server address in the format 'http://:' or 'socks5://:'. + captcha_key (dict, optional): Dict containing the name and api key for the captcha solving service to use. Returns: WebDriver: An instance of WebDriver configured based on the provided parameters. @@ -121,17 +122,21 @@ def create_driver(browser, captcha_extension=False, proxy=None, captcha_key=None driver = webdriver.Firefox(service=FirefoxService(GeckoDriverManager().install()), options=options) if captcha_extension: - driver.install_addon(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver_captcha_solver-1.10.4.xpi')) - driver.get('https://www.google.com') - capsolver_src = driver.find_element(By.XPATH, '/html/script[2]') - capsolver_src = capsolver_src.get_attribute('src') - capsolver_ext_id = capsolver_src.split('/')[2] - driver.get(f'moz-extension://{capsolver_ext_id}/www/index.html#/popup') - time.sleep(5) - - api_key_input = driver.find_element(By.XPATH, '//input[@placeholder="Please input your API key"]') - api_key_input.send_keys(captcha_key) - driver.find_element(By.ID, 'q-app').click() + if captcha_key.get('name', None) == 'capsolver': + driver.install_addon(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver_captcha_solver-1.10.4.xpi')) + driver.get('https://www.google.com') + capsolver_src = driver.find_element(By.XPATH, '/html/script[2]') + capsolver_src = capsolver_src.get_attribute('src') + capsolver_ext_id = capsolver_src.split('/')[2] + driver.get(f'moz-extension://{capsolver_ext_id}/www/index.html#/popup') + time.sleep(5) + + api_key_input = driver.find_element(By.XPATH, '//input[@placeholder="Please input your API key"]') + api_key_input.send_keys(captcha_key.get('key', None)) + driver.find_element(By.ID, 'q-app').click() + elif captcha_key.get('name', None) == 'nopecha': + driver.install_addon(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/noptcha-0.4.9.xpi')) + driver.get(f"https://nopecha.com/setup#{captcha_key.get('key', None)}") elif browser == 'chrome': options = ChromeOptions() @@ -151,8 +156,11 @@ def create_driver(browser, captcha_extension=False, proxy=None, captcha_key=None else: options.add_argument(f'--proxy-server={proxy}') if captcha_extension: - add_capsolver_api_key(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/assets/config.js'), captcha_key) - ext_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/') + if captcha_key.get('name', None) == 'capsolver': + add_capsolver_api_key(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/assets/config.js'), captcha_key.get('key', None)) + ext_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/') + elif captcha_key.get('name', None) == 'nopecha': + ext_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/NopeCHA-CAPTCHA-Solver/') if proxy_ext: options.add_argument(f'--load-extension={ext_path},{proxy_ext}') else: @@ -160,6 +168,9 @@ def create_driver(browser, captcha_extension=False, proxy=None, captcha_key=None driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=options) + if captcha_key.get('name', None) == 'nopecha': + driver.get(f"https://nopecha.com/setup#{captcha_key.get('key', None)}") + elif browser == 'undetected-chrome': options = uc.ChromeOptions() options.add_argument('--no-sandbox') @@ -176,14 +187,20 @@ def create_driver(browser, captcha_extension=False, proxy=None, captcha_key=None else: options.add_argument(f'--proxy-server={proxy}') if captcha_extension: - add_capsolver_api_key(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/assets/config.js'), captcha_key) - ext_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/') + if captcha_key.get('name', None) == 'capsolver': + add_capsolver_api_key(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/assets/config.js'), captcha_key.get('key', None)) + ext_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/capsolver-chrome-extension/') + elif captcha_key.get('name', None) == 'nopecha': + ext_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'captcha_solvers/NopeCHA-CAPTCHA-Solver/') if proxy_ext: options.add_argument(f'--load-extension={ext_path},{proxy_ext}') else: options.add_argument(f'--load-extension={ext_path}') driver = uc.Chrome(options=options, headless=True, use_subprocess=False) + + if captcha_key.get('name', None) == 'nopecha': + driver.get(f"https://nopecha.com/setup#{captcha_key.get('key', None)}") else: raise ValueError('Unsupported browser') return driver