CaptchaRecognition - parameters

zennmike

Новичок
Регистрация
16.06.2016
Сообщения
14
Благодарностей
1
Баллы
1
Hi,
I think, I have problems with sending additional parameters to DeathByCaptcha (I want to recognize ReCaptcha2). The picture which I send is ok, this already i have checked. But I still got strange answer like some letters like "kk", "lkk", "picture". Answer "?" means that picture which I send is incorrect, but when I check on their site, it seams ok. So I assume that I send wrong parameters. (when I contact with deathbycaptcha, they sad that I use bad API, but API which You atached to Zennoposter work correct with diffrent type of captcha - of course without additional parameters).

Example below
In Project Maker
upload_2016-7-4_12-39-4.png

In Code Creator

ZennoPoster.CaptchaRecognition("DeathByCaptcha.dll", JpegBase64String,
"type=3&banner_text=Select all images with rivers.&grid=3x3" );
My question is:
1. Is this form of sending additional parameters are correct (what about white spaces)? If not, can You post example? What I do wrong?
2. Adding more parameters is the same for diffrent type of of captcha recognized modules, like AntiCaptcha, etc.?
3. Can I send text of question to MonkeyEnter.dll, and it will be visible on popup window with picture?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
1-2 parameters should not have white spaces.
This seems correct: type=3&banner_text=Select all images with rivers.&grid=3x3
3) no
 
  • Спасибо
Реакции: zennmike

zennmike

Новичок
Регистрация
16.06.2016
Сообщения
14
Благодарностей
1
Баллы
1
type=3&banner_text=Select all images with rivers.&grid=3x3
So if there shouldn't be white spaces, that I should correct upper text for like this:
In Code Creator
1. type=3&banner_text=Select&#32all&#32images&#32with&#32rivers.&grid=3x3
or
2. type=3&banner_text='Select all images with rivers.'&grid=3x3
?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
i think
type=3&banner_text=Select all images with rivers.&grid=3x3
 

zennmike

Новичок
Регистрация
16.06.2016
Сообщения
14
Благодарностей
1
Баллы
1
I think I found some idea.
On site http://www.deathbycaptcha.com/user/api/newrecaptcha write that to solve recaptcha, or recaptcha2 we need to use form like this.

if we use original API (I try but it's not want to work with zennoposter)
Captcha captcha = client.Decode(captchaFileName, timeout,
new Hashtable (){
{ "type", 3 },
{"banner_text", "Select all images with meat"},
{"banner", bannerFileName},
{"grid", "4x2"}});

So I try to do:

answer = ZennoPoster.CaptchaRecognition(captchaModule, JpegBase64String,

new Hashtable (){
{ "type", 3 },
{"banner_text", "Select all images with meat"},
{"banner", bannerFileName},
{"grid", "4x2"}});

but there is error "cannot convert hashtable to string" which is obvious.

Question is:
1. How to write/convert type Hashtable to string, that deathbycaptcha will see it as good parameter?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
// search for element with captcha
HtmlElement he = instance.ActiveTab.FindElementByTag("form", 0);

// send it to service
string res = ZennoPoster.CaptchaRecognition("DeathByCaptcha.dll", he.DrawToBitmap(true), "type=3&banner_text=Select all images with rivers.&grid=3x3");
return res;
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113

zennmike

Новичок
Регистрация
16.06.2016
Сообщения
14
Благодарностей
1
Баллы
1
The picture is not a problem, but parameters. I checked it on DBC.
Unfortunately I can see only what picture DBC get, and answer from them.
Example below

When I'm sending like this:
ZennoPoster.CaptchaRecognition("DeathByCaptcha.dll", JpegBase64String, "type=3&banner_text=Select all images with front of shop.&grid=2x4");

JpegBase64String is variable with picture in Jpeg converted to Base64String.
grid is alway corect recognized


Tue Jul 5 08:50:37 2016 answer from DBC:"stop"
[TBODY] [/TBODY]
They realy often answers are: "kk", "lkk", "picture" or similar.
sometimes i get answer "?" - which means that picture is incorect, but when I go and check, the picture looks ok. So I asume that the parameters are wrong.
I rarely get good answer which should look like that "2,3,4,5".
When I contact with service, they said, that it's problem by software side.

So I read more and found that for Recaptcha2, they use difrent form of sending parameters, by using Hashtable (it's in original DBC api in C#).
I try to implement it in Zennoposter:
answer = ZennoPoster.CaptchaRecognition(captchaModule, JpegBase64String,
new Hashtable (){
{ "type", 3 },
{"banner_text", "Select all images with meat"},
{"banner", bannerFileName},
{"grid", "4x2"}});

but there is error "cannot convert hashtable to string" which is obvious because in ZennoPoster.CaptchaRecognition, parameter is string type.

Question is:
1. How to write/convert type Hashtable to string, that deathbycaptcha will see it as good parameter? Or how it should by writen in string? because I asume they use post or get method, so they can only send a string, not variable like Hashtable.

2. Or maybe someone have working example?
 

zennmike

Новичок
Регистрация
16.06.2016
Сообщения
14
Благодарностей
1
Баллы
1
I found whats wrong, but it's by Yours side.
Like someone from DBC said, that's problem by Yours side. You have old DeathByCaptcha.dll library.
Look for the size of file.
upload_2016-7-6_17-28-37.png


When I'm changing Yours original file for this from DBC. My C# code work good.

But then Yours original element
upload_2016-7-6_17-33-1.png
from Project Maker not working, if there is chosen "DeathByCaptcha.dll".

When I'm trying to fix it, by:
- remain original file deathbycaptcha.dll in catalog progs
- and then adding GAC reference with new DeathByCaptcha.dll library from DBC.
This also not working, because I think the "namespace" in both file are the same, and when I'm calling

DeathByCaptcha.Client client = (DeathByCaptcha.Client)(new DeathByCaptcha.SocketClient("xxxxxxxxx", "xxxxxxxxxx"));

It's call original (old from Project Maker) library, not new from DBC, which I try to include.

Question:
1. How to fix it?
2. How to read user name, and password of service for example DBC, without reading file DeathByCaptcha.dll.config?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Please attach new dll taht you meantioned plesae. I will show to developers
 

zennmike

Новичок
Регистрация
16.06.2016
Сообщения
14
Благодарностей
1
Баллы
1
It's 4.4 version.
If You want to download by yourself, the file is on http://www.deathbycaptcha.com/user/api . Dll library is in file dbc_api_v4_4_dotnet.zip which You can download after clicking ".NET" link.
The source of file is after clicking "C" link.

The page is available after register on site, and if You have some amount of cash on Yours account.
 

Вложения

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