![]() |
|
[Release] Javascript Captcha Code - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Website Scripting & Security (https://lckb.dev/forum/forumdisplay.php?fid=197) +---- Forum: Security (https://lckb.dev/forum/forumdisplay.php?fid=164) +----- Forum: Website Security (https://lckb.dev/forum/forumdisplay.php?fid=141) +----- Thread: [Release] Javascript Captcha Code (/showthread.php?tid=1061) |
- xNiceEinzx - 08-29-2012 //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! - DarkRaver - 08-29-2012 This Download have all Scripts for a Captcha: 2 - ReturnKratos - 08-29-2012 thats is bad i will can not spam account in register script like wod's site - TheEvilAnt - 08-31-2012 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 - xNiceEinzx - 08-31-2012 I think its a simple release and it will work nice. - someone - 09-01-2012 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). - ReturnKratos - 09-02-2012 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 |