[Release] Javascript Captcha Code
#1


//Captcha Script
function checkform(theform){
var why = "";

if(theform.txtInput.value == ""){
why += "Security code should not be empty.\n";
}
if(theform.txtInput.value != ""){
if(ValidCaptcha(theform.txtInput.value) == false){
why += "Security code did not match.\n";
}
}
if(why != ""){
alert(why);
return false;
}
}
//Generates the captcha function
var a = Math.ceil(Math.random() * 9)+ '';
var b = Math.ceil(Math.random() * 9)+ '';
var c = Math.ceil(Math.random() * 9)+ '';
var d = Math.ceil(Math.random() * 9)+ '';
var e = Math.ceil(Math.random() * 9)+ '';
var f = Math.ceil(Math.random() * 9)+ '';
var g = Math.ceil(Math.random() * 9)+ '';

var code = a + b + c + d + e + f + g;
document.getElementById("txtCaptcha").value = code;
document.getElementById("txtCaptchaDiv").innerHTML = code;
// Validate the Entered input aganist the generated security code function
function ValidCaptcha(){
var str1 = removeSpaces(document.getElementById('txtCaptcha').value);
var str2 = removeSpaces(document.getElementById('txtInput').value);
if (str1 == str2){
return true;
}else{
return false;
}
}
// Remove the spaces from the entered and generated code
function removeSpaces(string){
return string.split(' ').join('');
}

 

 

It should help you for make your Homepage more safer!

#2
This Download have all Scripts for a Captcha: 2

#3
thats is bad i will can not spam account in register script like wod's site

#4


thats is bad i will can not spam account in register script like wod's site

Idk if you are the one that enjoy doing it on all server anyway [CeNsOrEd] you nif you do it in mine

#5
I think its a simple release and it will work nice.

#6

The problem with this Captcha is it can be bypassed pretty easily(javascript runs on client, not on server), Suggest making it PHP and using it with AJAX.

 

Another problem with your Captcha is that you are giving the user the result:

var code = a + b + c + d + e + f + g;
document.getElementById("txtCaptcha").value = code;//why did you put the result available
document.getElementById("txtCaptchaDiv").innerHTML = code;

For example I could just parse the document using an XML parser(getting the info from txtCaptchaDiv), and send the Captcha as input to the txtCaptcha.

 

I think it would be nice to generate a image, with the result, and add some filters afterwards(on black background images, are hard to recognize).

#7


Idk if you are the one that enjoy doing it on all server anyway [CeNsOrEd] you nif you do it in mine

 

evilant i did on atomic lastchaos about 6k account spammed is not my business if all ep1 site go a simple register script i publicated a hold release on epvp idk if anyone downloaded and try to spam some server ;D i will add to my new tool ( not public ), the register script and login script with some features :OOOOO



Forum Jump:


Users browsing this thread: 2 Guest(s)