From 7fab17bedeb81254fa4bfc6e525d39373ce75174 Mon Sep 17 00:00:00 2001 From: Adrien Nguyen Date: Fri, 26 May 2023 19:37:19 +0200 Subject: [PATCH] Use DeathByCaptcha in Core --- KinanCity-captcha-deathbycaptcha/pom.xml | 2 +- KinanCity-core/pom.xml | 6 ++++++ .../src/main/java/com/kinancity/core/Configuration.java | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/KinanCity-captcha-deathbycaptcha/pom.xml b/KinanCity-captcha-deathbycaptcha/pom.xml index c2f3dc9..3071574 100644 --- a/KinanCity-captcha-deathbycaptcha/pom.xml +++ b/KinanCity-captcha-deathbycaptcha/pom.xml @@ -9,7 +9,7 @@ 4.0.0 - KinanCity-captcha-deathbycaptcha + kinancity-captcha-deathbycaptcha 8 diff --git a/KinanCity-core/pom.xml b/KinanCity-core/pom.xml index 11b1b8b..f1fdbd4 100644 --- a/KinanCity-core/pom.xml +++ b/KinanCity-core/pom.xml @@ -47,6 +47,12 @@ kinancity-captcha-anticaptcha 2.1.11-SNAPSHOT + + + com.kinancity + kinancity-captcha-deathbycaptcha + 2.1.11-SNAPSHOT + com.kinancity diff --git a/KinanCity-core/src/main/java/com/kinancity/core/Configuration.java b/KinanCity-core/src/main/java/com/kinancity/core/Configuration.java index 0b4fb55..6059639 100644 --- a/KinanCity-core/src/main/java/com/kinancity/core/Configuration.java +++ b/KinanCity-core/src/main/java/com/kinancity/core/Configuration.java @@ -12,6 +12,7 @@ import java.util.Properties; import com.kinancity.core.captcha.captchaai.CaptchaaiCaptchaProvider; +import com.kinancity.core.captcha.deathByCaptcha.DeathByCaptchaProvider; import org.apache.commons.lang.math.NumberUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -171,8 +172,8 @@ public void init() throws ConfigurationException { providerThreadName = PROVIDER_CAPTCHAAI+"/"+PROVIDER_CAPSOLVER; } else if (PROVIDER_DBC.equals(captchaProvider)) { // Add imageTypers Provider - provider = CaptchaaiCaptchaProvider.getInstance(captchaQueue, captchaKey); - providerThreadName = PROVIDER_CAPTCHAAI+"/"+PROVIDER_CAPSOLVER; + provider = DeathByCaptchaProvider.getInstance(captchaQueue, captchaKey); + providerThreadName = "DeathByCaptcha"; } else { throw new ConfigurationException("Unknown captcha provider " + captchaProvider); }