mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-11-25 20:16:05 -05:00
@@ -16,6 +16,10 @@ public class FontFunCaptcha implements ChallengeProvider {
|
||||
return "FontFunCaptcha";
|
||||
}
|
||||
|
||||
public void configure(String config) {
|
||||
// TODO: Add custom config
|
||||
}
|
||||
|
||||
private String getFontName(String path, String level) {
|
||||
File file = new File(path + level + "/");
|
||||
FilenameFilter txtFileFilter =
|
||||
|
||||
@@ -48,6 +48,10 @@ public class GifCaptcha implements ChallengeProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void configure(String config) {
|
||||
// TODO: Add custom config
|
||||
}
|
||||
|
||||
public Challenge returnChallenge() {
|
||||
String secret = HelperFunctions.randomString(6);
|
||||
return new Challenge(gifCaptcha(secret), "image/gif", secret.toLowerCase());
|
||||
|
||||
@@ -20,6 +20,10 @@ public class ShadowTextCaptcha implements ChallengeProvider {
|
||||
return "ShadowTextCaptcha";
|
||||
}
|
||||
|
||||
public void configure(String config) {
|
||||
// TODO: Add custom config
|
||||
}
|
||||
|
||||
public boolean checkAnswer(String secret, String answer) {
|
||||
return answer.toLowerCase().equals(secret);
|
||||
}
|
||||
|
||||
@@ -7,5 +7,5 @@ public interface ChallengeProvider {
|
||||
|
||||
public boolean checkAnswer(String secret, String answer);
|
||||
|
||||
// TODO: def configure(): Unit
|
||||
public void configure(String config);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user