private string ProcessCaptcha(string captchaSvg) { string captchadata = ""; string captchaSource; string captchaWithoutNoise = RemoveNoiseFromCaptcha(captchaSvg); if (string.IsNullOrEmpty(captchaWithoutNoise)) { return(captchadata); } Bitmap bitmapImage = ConvertCaptchSvgToImage(captchaWithoutNoise); if (Convert.ToBoolean(_configuration["CoWinAPI:Auth:AutoReadCaptcha"])) { captchadata = GetAutoCaptcha(captchaWithoutNoise); captchaSource = "AI-AutoCaptcha"; } else { captchadata = new UI.Captcha().GetCaptchaValue(bitmapImage); captchaSource = "Manual-Captcha"; } Console.WriteLine($"[INFO] Captcha entered is from {captchaSource} and value is {captchadata}"); return(captchadata); }
private string ProcessCaptcha(string captchaSvg) { string captchaWithoutNoise = RemoveNoiseFromCaptcha(captchaSvg); Bitmap bitmapImage = ConvertCaptchSvgToImage(captchaWithoutNoise); var captchadata = new UI.Captcha().GetCaptchaValue(bitmapImage); return(captchadata); }