Capmonster and Mutithreading

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Hey, 2 nice features of Zennoposter are the Capmonster and the use of multiple threads.

Ok, i want to use the code from CodeCreator in VS 2008. Is it possible to do multithreading and use Capmonster in VS 2008 too or do i have to run the template in Zennoposter?

thx
 

fthomas137

Client
Регистрация
18.06.2011
Сообщения
91
Благодарностей
11
Баллы
0
That's a great question Player. Finding some way to attach to other zp functions - also the proxying. May all be much but am interested.

Frank
 

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Anyone??
 

darkdiver

Administrator
Команда форума
Регистрация
13.01.2009
Сообщения
2 284
Благодарностей
2 728
Баллы
113
Hello everyone, sorry for long delay with response. This thread just somehow lost my attention.
Some bullets, CapMonster is designed to work with the ZennoPoster, and it will not work standalone.
In Visual Studio you can create a DLL which will recognize captchas via CapMonster.
If your are using dll as a registration template for example just replace MonkeyEnter.dll in code to the CapMonster module filename.
If your are trying to recognize external image file you can load it in such way

JavaScript:
using System;
using System.IO;
using Zennolab.CommandCenter;

namespace BlankTemplate
{
    internal class Step1
    {
        public static int Execute(Instance instance)
        {
            try
            {
                var base64str = Convert.ToBase64String(File.ReadAllBytes("d:\\image.jpg"));
                var recogized = ZennoPoster.CaptchaRecognition(instance, "MySuperModule.capmonster", 
                                    new [] {base64str}, string.Empty);
                File.WriteAllText("d:\\result.txt", recogized);
            }
            catch (Exception ex)
            {
                
            }
            return 0;
        }
    }
}
One note. Each capmonster module works in a separate thread, and all requests to one module are queued, this means if you have 4 core processors to load all 4 cores, just cope your module 4 times with different file names, it was made in the ZennoPoster to get more processor time to the instances, because they require much more operations compare with captcha recognition.

That's a great question Player. Finding some way to attach to other zp functions - also the proxying. May all be much but am interested.
Frank
To get new proxies look at this function http://help.zennolab.com/en/v3/zennoposter/codecreator/Zennolab.CommandCenter~Zennolab.CommandCenter.ZennoPoster~GetProxy.html
 
  • Спасибо
Реакции: CaptainObvious и player

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