Giter VIP home page Giter VIP logo

2captcha's Introduction

Languages & Frameworks

RustLang  Python  TypeScript  JavaScript  Java  Lua  C++  HTML  CSS 
Docker  React  ExpressJS  NodeJS  MongoDB  SQL  Tokio 

About :

Hiya! I'm a Full Stack, primarily Backend Developer.
  • If you came here searching if this username exists, it does! And no, it's not for sale ❤️
  • 📝 If you're looking to contact me, I'm available on
  • ⚡ I specialize in API Development, Mobile-App Reverse Engineering, & request based web automation for the Sneaker & Reselling community, having experience bypassing SSL Pinning, Akamai, PerimeterX. If you're interested in any of these services, feel free to message me on a platform above for a price quote.

Dev Stats :

Github Stats

Wakatime Stats

Top Languages Used

Pay Me :

Buy Me A Coffee

2captcha's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

2captcha's Issues

Hcaptcha is always invisible: 1

the request the library sends to 2captcha always has invisible: 1 header even tho this is my code
await solver.hcaptcha("4c672d35-0701-42b2-88c3-78380b0db560", "https://discord.com/register", { invisible: 0 })

ERROR_NO_SLOT_AVAILABLE

Hi guy, I was doing some tests, and I've got this error.

APIError: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
0|api  |     at Solver.imageCaptcha (/home/ubuntu/project/node_modules/2captcha/dist/structs/2captcha.js:277:
19)
0|api  |     at runMicrotasks (<anonymous>)
0|api  |     at processTicksAndRejections (internal/process/task_queues.js:95:5) {
0|api  |   err: 'ERROR_NO_SLOT_AVAILABLE',
0|api  |   code: 0
0|api  | }

funcaptcha

hi can this be use for fun captcha also

How do I use it with Puppeteer or Playwright?

I'm trying to bypass the v2Recaptcha but only calling solver.recaptcha("6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5", "https://patrickhlauke.github.io/recaptcha/") doesn't seem working. It seems like I need to do something more to make it work but I have no clues. Can you please give me some instructions?

Reporting captcha solves doesn't work

The url to report captcha solves is http://2captcha.com/res.php so instead of this.in it should be this.res
const response = await fetch(this.in + utils.objectToURI(payload))

CAPCHA_NOT_READY

Hi guys, I was testing 2captcha API and it returns this error for the first time:

APIError: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
    at Solver.pollResponse (....\node_modules\2captcha\dist\structs\2captcha.js:106:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  err: 'CAPCHA_NOT_READY',
  name: 'APIError',
  code: 0
}

Anyone knows why this happen?

TypeError: Cannot destructure property 'data' of '(intermediate value)' as it is undefined.

For me, this error occurs every time a captcha (funcaptcha) is unsolvable.

const { data } = await solver.funCaptcha("public key here", "page url", "service url")
            ^

TypeError: Cannot destructure property 'data' of '(intermediate value)' as it is undefined.
    at Client.<anonymous> (C:\Users\USERNAME\Desktop\test\index.js:44:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Here is a code snippet (this is in an async function). Public key, page url, and service url are all correct.

const { data } = await solver.funCaptcha("public key", "page url", "service url")
    .catch(err => {
       return console.log(err);
    });

The process then exits.

TypeError: Cannot destructure property 'lastID' of '(intermediate value)' as it is undefined.

Hi, I'm getting the below error every time. I'm not able to understand how can I destructure it.
const {lastID} = await this.sqlite.run(INSERT INTO user (firstName, lastName, nickName, email, password, isTeacher) VALUES ($firstName, $lastName, $nickName, $email, $password, $isTeacher),
^
TypeError: Cannot destructure property 'lastID' of '(intermediate value)' as it is undefined.

Here is code snippet -
const {lastID} = await this.sqlite.run(INSERT INTO user (firstName, lastName, nickName, email, password, isTeacher) VALUES ($firstName, $lastName, $nickName, $email, $password, $isTeacher),
{ $firstName, $lastName, $nickName, $email, $password, $isTeacher }).then((result)=>{
if(result !=null){
console.log(result);
}
}).catch(err=>{
console.log("Email already exists");
return err;
});
return lastID;
}

Please advise.

Show private API Key in the error message!

Sometimes I get this error:

Error: request to https://2captcha.com/in.php?invisible=false&googlekey=6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5&pageurl=https%3A%2F%2Fexample.com%2F&method=userrecaptcha&key=xxxxxxxxxxxxxxxxxxx&json=1&header_acao=1&soft_id=3316 failed, reason: connect ECONNREFUSED 65.108.194.67:443

The error is not issue, Note that, the xxxxxxxxxxxxxxxxxxx in here is exactly my real private API Key! In terms of security I thinks should not show key in app.

HELP! How to pass the captcha back to Discord?

I receive the captcha response from 2captcha, that's all good.

But how does the captcha response gets passed back to Discord?

For example, when you send a message and an HCAPTCHA solving is required, 2captcha works perfectly fine and I receive the response back, but using DISCORD.JS, how do I pass it back to Discord???

THanks.

Access-Control-Allow-Origin issue

I was using your script in google browser to resolve reCaptcha v3 and always got some CORS error which said that Access-Control-Allow-Origin header is missing
On 2captcha it is said that if header_acao header is set to 1, in.php will include Access-Control-Allow-Origin header in the response. By default in your script it is set to 0. In .recaptcha method I can set header_acao to 1, but it won't change in .pollResponse method, which causes the error. Setting header_acao to 1 solved the issue for me

Also I would like to know if action header in .pollResponse request needs to be the same as action header in the request than .recaptcha sends

Anyway, thanks a lot for the script, it is really nice

Cloudflare Turnstile broken

Trying to solve a CloudFlare turnstile captcha at https://dexscreener.com/new-pairs/24h

const solver = new Captcha.Solver("myapikey")
solver.turnstile("0x4AAAAAAADnPIDROrmt1Wwj", "https://dexscreener.com/new-pairs/24h")

gives

APIError: Some parameters are missing in this request. If you're using a pre-provided function, please open up an issue on the GitHub (https://github.com/furry/2captcha)

This API call is broken, it's the same if I fetch it manually via browser. I logged the exact API call that is being done inside the turnstile function:
https://2captcha.com/in.php?key=myapikey&json=1&header_acao=1&soft_id=3316&method=turnstile&sitekey=0x4AAAAAAADnPIDROrmt1Wwj&pageurl=https%3A%2F%2Fdexscreener.com%2Fnew-pairs%2F24h

I'm not super familiar with Cloudflare Turnstile solving through 2captcha, but the API docs seem to know that some params are missing: https://2captcha.com/2captcha-api#turnstile . I'll keep trying to solve this on my own by using the third extra parameter and giving those params to the turnstile function, but some more guidance on this would be appreciated.

Problem

Hello,what is an api key ?

Captcha unsolvable

Hey,

I am currently having an issue with using your great work. I tried to use your example which worked perfectly but after I have changed it to my website i would like to solve it nearly always stucks in an infinity loop or i get this error:

{"status":0,"request":"ERROR_CAPTCHA_UNSOLVABLE"}
APIError: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
    at Solver.pollResponse (C:\GitProjects\DS_Timer_JS\node_modules\2captcha\dist\structs\2captcha.js:94:19)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at async Minion.solveCaptcha (C:\GitProjects\DS_Timer_JS\minion.js:41:3)
    at async Minion.place (C:\GitProjects\DS_Timer_JS\minion.js:87:5)
    at async process.<anonymous> (C:\GitProjects\DS_Timer_JS\schedule.js:23:11) {
  err: '{"status":0,"request":"ERROR_CAPTCHA_UNSOLVABLE"}',
  code: 0
}

6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5
https://de178.die-staemme.de/game.php?village=1&screen=botcheck/

the 2 important informations.

Please add CHANGELOG

It's not clear what changes are made, especially when major version bumps.

Usually, a major version bump signals breaking change.

I see there is v3 released, but I have no idea what needs to be changed to make it work.

Thanks!

Google Captcha iFrame

Hello,

I am getting token from 2Captcha but when i hit submit button then still Google Recaptcha iframe is showing.....
Screenshot 2022-09-19 19 50 29

Defautl variable "action"

Does the "action" variable always have to be "get"? It depends on the action on the site for which we are performing a specific action, for example "login". The above is the corrected code.

const payload = {
   invisible: false,
   header_acao: false,
   action: "get",
   ...extra,
   googlekey: googlekey,
   pageurl: pageurl,
   method: "userrecaptcha",
   ...this.defaultPayload
}

ApiError

I got this error recently and I don't know what it means and how to solve it or avoid it

APIError: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
at Solver.recaptcha (/Users/rushika/node_modules/2captcha/dist/structs/2captcha.js:149:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
err: 'Not Found',
name: 'APIError',
code: 0
}

hsw script is supported ?

Hi, I'm using this package in order to solve a hcaptcha in this site sso.acesso.gov.br/login, the problem is that about 4 days ago it was working as expected but yesterday all requests started to fail, there is one different step between what I have implemented vs what the page does, the page performs the load of hsw.js script which send different data from the window as context for hcaptcha token generation, my question is: is hsw approach supported in this lib as some parameter or via 2captcha API?

this is the response I receive from the page that implements hcaptcha
image

and this is the one I receive using this package
image

and this is the code of my implementation

const TWO_CAPTCHA_API_KEY =  process.env.TWOCAPTCHAKEY
const solver = new Solver(TWO_CAPTCHA_API_KEY)

const captcha = await captchaSolver(solver)
export async function captchaSolver(solver) {
    return solver.hcaptcha("xxxxxxx-d46c-400a-ba07-xxxxxxxx", "sso.acesso.gov.br")
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.