All Downloads are FREE. Search and download functionalities are using the official Maven repository.

stalkr.captcha.dbc.DeadByCaptchaClientProducer Maven / Gradle / Ivy

The newest version!
package stalkr.captcha.dbc;

import trip.spi.Producer;
import trip.spi.Singleton;

import com.deathbycaptcha.Client;
import com.deathbycaptcha.SocketClient;

@Singleton
public class DeadByCaptchaClientProducer {

	final String username = System.getProperty( "dbc-username", "" );
	final String password = System.getProperty( "dbc-password", "" );

	@Producer
	public Client produceClient() {
		if ( username.isEmpty() || password.isEmpty() )
			throw new IllegalArgumentException( "Credentials for DeadByCaptcha are not set" );
		return new SocketClient( username, password );
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy