Exemplo n.º 1
0
        public void captcha1(string tag, string atr, string text, string search_type, int number)
        {
            project.Variables["action"].Value = "captcha1 " + text;
            string cps = "RuCaptcha.dll";

            if (project.Variables["cp_srv"].Value == "antigate")
            {
                cps = "Anti-Captcha.dll";
            }
            HtmlElement he     = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByTag("form", 1).FindChildByAttribute(tag, atr, text, search_type, number);
            var         result = ZennoPoster.CaptchaRecognition(cps, he.DrawToBitmap(false), "");
            var         tmp    = result.Split(new [] { "-|-" }, StringSplitOptions.None);

            if (tmp.Length > 1)
            {
                project.Variables["captcha"].Value     = tmp[0];
                project.Variables["bad_captcha"].Value = tmp[1];
            }
        }