How to integration with C#?

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8
Hello,
How can I integration Monstercap V2 with C#
Please help me with simple example
Thanks so much!
regards
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
Really I'm not pretty good on Http client
Anyway, may you tell rostonix to help me in TeamViewer I will pay for that for sure!
Thanks
Rostonix not in support any more.
Could you please explain more clearly what you need? I don't quite understand what are you asking. C# is programming laguage. it can't be integrated into CapMonster.
 

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8
Rostonix not in support any more.
Could you please explain more clearly what you need? I don't quite understand what are you asking. C# is programming laguage. it can't be integrated into CapMonster.
I read the article but not understand how can I integrated I really want to buy the service but still not understand how can I do that with C# if you know anyone can help me with that I will talk with him to help me with that as a work for sure!
Thanks admin
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
I read the article but not understand how can I integrated I really want to buy the service but still not understand how can I do that with C# if you know anyone can help me with that I will talk with him to help me with that as a work for sure!
Thanks admin
What do you mean by "integrate with C#"?
 

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

amyboose

Client
Регистрация
21.04.2016
Сообщения
2 312
Благодарностей
1 191
Баллы
113
Change imageData.ImageMain to your image
Код:
string content = new StringBuilder(1024).Append(@"----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""method""

post
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""key""

").Append(SecretKey).Append(@"
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""recaptcha""

1
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""CapMonsterModule""

ZennoLab.ReCaptcha2
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""Task""

").Append(imageData.TextInstruction).Append(@"
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""file""; filename=""Captcha.jpg""
Content-Type: image/jpg

").ToString();

            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(CapmonsterURL + "/in.php");
            req.Proxy = null;
            req.AllowAutoRedirect = false;
            req.Method = "POST";
            req.ServicePoint.Expect100Continue = false;
            req.Timeout = 20000;
            req.ContentType = "multipart/form-data; boundary=--8d373f8bt2f4cf3";

            using (Stream reqStream = req.GetRequestStream())
            {
                byte[] buffer = Encoding.GetEncoding(1251).GetBytes(content);
                reqStream.Write(buffer, 0, buffer.Length);
                imageData.ImageMain.Save(reqStream, imageData.ImageMain.RawFormat);
                buffer = Encoding.GetEncoding(1251).GetBytes("\r\n----8d373f8bt2f4cf3--");
                reqStream.Write(buffer, 0, buffer.Length);
            }

            string post;
            using (WebResponse resp = req.GetResponse())
            using (Stream respStream = resp.GetResponseStream())
            using (StreamReader sr = new StreamReader(respStream))
                post = sr.ReadToEnd();
 

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8
Change imageData.ImageMain to your image
Код:
string content = new StringBuilder(1024).Append(@"----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""method""

post
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""key""

").Append(SecretKey).Append(@"
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""recaptcha""

1
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""CapMonsterModule""

ZennoLab.ReCaptcha2
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""Task""

").Append(imageData.TextInstruction).Append(@"
----8d373f8bt2f4cf3
Content-Disposition: form-data; name=""file""; filename=""Captcha.jpg""
Content-Type: image/jpg

").ToString();

            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(CapmonsterURL + "/in.php");
            req.Proxy = null;
            req.AllowAutoRedirect = false;
            req.Method = "POST";
            req.ServicePoint.Expect100Continue = false;
            req.Timeout = 20000;
            req.ContentType = "multipart/form-data; boundary=--8d373f8bt2f4cf3";

            using (Stream reqStream = req.GetRequestStream())
            {
                byte[] buffer = Encoding.GetEncoding(1251).GetBytes(content);
                reqStream.Write(buffer, 0, buffer.Length);
                imageData.ImageMain.Save(reqStream, imageData.ImageMain.RawFormat);
                buffer = Encoding.GetEncoding(1251).GetBytes("\r\n----8d373f8bt2f4cf3--");
                reqStream.Write(buffer, 0, buffer.Length);
            }

            string post;
            using (WebResponse resp = req.GetResponse())
            using (Stream respStream = resp.GetResponseStream())
            using (StreamReader sr = new StreamReader(respStream))
                post = sr.ReadToEnd();
Thanks, it's not dependent ZennoPoster?
 

amyboose

Client
Регистрация
21.04.2016
Сообщения
2 312
Благодарностей
1 191
Баллы
113

qais

Пользователь
Регистрация
12.09.2017
Сообщения
72
Благодарностей
6
Баллы
8

amyboose

Client
Регистрация
21.04.2016
Сообщения
2 312
Благодарностей
1 191
Баллы
113
  • Спасибо
Реакции: tumguy

tumguy

Новичок
Регистрация
07.12.2018
Сообщения
11
Благодарностей
0
Баллы
1

amyboose

Client
Регистрация
21.04.2016
Сообщения
2 312
Благодарностей
1 191
Баллы
113
Hey amyboose, can you tell clearly what do i need to do if i want to use capmonster with other programs? Like i have own program which does solve recaptcha ver2 usin 2captcha api but i want to use capmonster. What do i need to do?
1) emulate 2captcha
2) send recaptcha to 2captcha.com
3) get token
 

tumguy

Новичок
Регистрация
07.12.2018
Сообщения
11
Благодарностей
0
Баллы
1
1) emulate 2captcha
2) send recaptcha to 2captcha.com
3) get token

I added
127.0.0.1 2captcha.com
in hosts file


scenario:

capmonster running - port 127.0.0.3
I send data to 2captcha as usual and i get error in fiddler - resp is 512 send failure. Can you please PM me so can get some help?
Everything is working with zennoposter but not with external c# apps.

Thank You
 

tumguy

Новичок
Регистрация
07.12.2018
Сообщения
11
Благодарностей
0
Баллы
1
Final report on how to use capmonster with external c# program :

1. Add

127.0.0.1 2captcha.com

to your host file

2. Run capmonster on default mode which is 127.0.0.3

3. send GET request as you would do for solving recaptcha with 2captcha.com ( watch their reference API page )

4. send GET or POST to get the solved response

5. Use the answer as you want

Should work.


Thanks to @amyboose
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
Final report on how to use capmonster with external c# program :

1. Add

127.0.0.1 2captcha.com

to your host file

2. Run capmonster on default mode which is 127.0.0.3

3. send GET request as you would do for solving recaptcha with 2captcha.com ( watch their reference API page )

4. send GET or POST to get the solved response

5. Use the answer as you want

Should work.


Thanks to @amyboose
And what about C# there?
What steps are not decsribed here - http://zennolab.com/wiki/en:addons:capmonster:work-with-other
where is said to modify hosts file and send captchas to recognizing by captcha-service API?
 

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