Use Captcha with Javascript (Tampermonkey)?

bernd

Новичок
Регистрация
09.01.2021
Сообщения
3
Благодарностей
0
Баллы
1
Hello,
I am using Tampermonkey scripts for quite a few sites.
This works fine so far, except for sites with captchas for obvious reasons.

so I would love to midify my script so it solves captchas with capmonster if there is any.

main problem is how to do the captcha solving.

from my very limited knowledge I already understood that i need to extract some captcha related data from the site, sent a http post request and later on do a http get request in order to receive the solution. and put that into the input field on the page.

but that's msotly what I read on the internet and I dont have the slightest idea how this works in detail.

Can someone please give me a short idiot proof walkthrough on how to do this?

Sorry in advance if this is a compelte noob question but I am not too knowledgable about computer stuff in general,
only know a bit of java and javascript.

thanks everyone in advance! :-)
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 216
Благодарностей
5 844
Баллы
113
  • Спасибо
Реакции: bernd

bernd

Новичок
Регистрация
09.01.2021
Сообщения
3
Благодарностей
0
Баллы
1
I have looked into it and am understanding the most part of it.
but there is still a bit of question left:
1. I am supposed to sent a picture there but how do I get said picture? and how do I sent it, in what form?

from what I googled elsewhere, each google captcha has some kind of id tag, that is DOM searched for and then sent to the server as a parameter of the url. is this different here?
what sort of thing am I supposed to sent to the server?

2. what do you mean, by capmonster emulates said api?
do I build the to-be-sent url just like in that article described?

3. not exactly sure how to do this in combination with juery yet.
your site basically says to put everything into the url, ids, image file, etc. everything in the url.
where in jquery with ajax, you apparently, have the parameters listed separatly and the url parameter only contains the website name like 2.captcha.com.

from what I googled, you do http requests in jquery with ajax:

which one should I use then if I wanna sent http requests with that ajax method?


Thank you again for your help!
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 216
Благодарностей
5 844
Баллы
113
I have looked into it and am understanding the most part of it.
but there is still a bit of question left:
1. I am supposed to sent a picture there but how do I get said picture? and how do I sent it, in what form?

from what I googled elsewhere, each google captcha has some kind of id tag, that is DOM searched for and then sent to the server as a parameter of the url. is this different here?
what sort of thing am I supposed to sent to the server?

2. what do you mean, by capmonster emulates said api?
do I build the to-be-sent url just like in that article described?

3. not exactly sure how to do this in combination with juery yet.
your site basically says to put everything into the url, ids, image file, etc. everything in the url.
where in jquery with ajax, you apparently, have the parameters listed separatly and the url parameter only contains the website name like 2.captcha.com.

from what I googled, you do http requests in jquery with ajax:

which one should I use then if I wanna sent http requests with that ajax method?


Thank you again for your help!
1) You should send a picture in http post request with multipart. For this you should encode picture file in bytes. Google it how to send files in multipart.
2) Emulates API means that use the same IP. All you need is to change 2captcha.com with IPcaptmonster:port.
3) didn't understand you question....
url parameter - http://capmonsterIP:port/in.php
data - other parameters from API required for captcha type.
 

bernd

Новичок
Регистрация
09.01.2021
Сообщения
3
Благодарностей
0
Баллы
1
what I meant is:
I first off have the actual captcha data, that needs to be sent, apparently in multipart format.

But then, I surely somehow have to prove to capmosnter that I am allowed to use their services,
so I have the url where to sent the captcha and I have that "protection key".
which I both need to submit as well.

so the question more or less was under what name these parameters are listed?
can I sent the protection key as value="MyProtectionKey"?

basically, I kno more or less what different things need to be sent but not what the names of the corresponding parameters are.

given that 2captcha sents it's "ip key" with the parameter value, I'd assume that capmonsters protection key would be sent with the value tag parameter too.



from what I googled, apparently multipart files can be sent or created in javascript by poutting them in some formdata thingie.
gotta read a bot on that on how to do this.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)